Struct LlmAttributes
Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.
Bitflags that modify LLM-call behavior and observability.
Implementations
impl LlmAttributes
impl LlmAttributes
STATEFUL
pub const STATEFUL: Self
Marks the request as stateful from the runtime’s perspective.
STREAMING
pub const STREAMING: Self
Marks the request as streaming.
impl LlmAttributes
impl LlmAttributes
empty
pub const fn empty() -> Self
Get a flags value with all bits unset.
all
pub const fn all() -> Self
Get a flags value with all known bits set.
bits
pub const fn bits(&self) -> u32
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
from_bits
pub const fn from_bits(bits: u32) -> Option<Self>
Convert from a bits value.
This method will return None if any unknown bits are set.
from_bits_truncate
pub const fn from_bits_truncate(bits: u32) -> Self
Convert from a bits value, unsetting any unknown bits.
from_bits_retain
pub const fn from_bits_retain(bits: u32) -> Self
Convert from a bits value exactly.
from_name
pub fn from_name(name: &str) -> Option<Self>
Get a flags value with the bits of a flag with the given name set.
This method will return None if name is empty or doesn’t correspond to any named flag.
is_empty
pub const fn is_empty(&self) -> bool
Whether all bits in this flags value are unset.
is_all
pub const fn is_all(&self) -> bool
Whether all known bits in this flags value are set.
intersects
pub const fn intersects(&self, other: Self) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
contains
pub const fn contains(&self, other: Self) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
insert
pub fn insert(&mut self, other: Self)
The bitwise or (|) of the bits in two flags values.
remove
pub fn remove(&mut self, other: Self)
The intersection of a source flags value with the complement of a target flags value (&!).
This method is not equivalent to self & !other when other has unknown bits set. remove won’t truncate other, but the ! operator will.
toggle
pub fn toggle(&mut self, other: Self)
The bitwise exclusive-or (^) of the bits in two flags values.
set
pub fn set(&mut self, other: Self, value: bool)
Call insert when value is true or remove when value is false.
intersection
pub const fn intersection(self, other: Self) -> Self
The bitwise and (&) of the bits in two flags values.
union
pub const fn union(self, other: Self) -> Self
The bitwise or (|) of the bits in two flags values.
difference
pub const fn difference(self, other: Self) -> Self
The intersection of a source flags value with the complement of a target flags value (&!).
This method is not equivalent to self & !other when other has unknown bits set. difference won’t truncate other, but the ! operator will.
symmetric_difference
pub const fn symmetric_difference(self, other: Self) -> Self
The bitwise exclusive-or (^) of the bits in two flags values.
complement
pub const fn complement(self) -> Self
The bitwise negation (!) of the bits in a flags value, truncating the result.
impl LlmAttributes
impl LlmAttributes
iter
pub const fn iter(&self) -> Iter<LlmAttributes>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
iter_names
pub const fn iter_names(&self) -> IterNames<LlmAttributes>
Yield a set of contained named flags values.
This method is like iter, except only yields bits in contained named flags. Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations
impl Binary for LlmAttributes
impl Binary for LlmAttributes
fmt
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl BitAnd for LlmAttributes
impl BitAnd for LlmAttributes
bitand
fn bitand(self, other: Self) -> Self
The bitwise and (&) of the bits in two flags values.
Output
type Output = LlmAttributes
impl BitAndAssign for LlmAttributes
impl BitAndAssign for LlmAttributes
bitand_assign
fn bitand_assign(&mut self, other: Self)
The bitwise and (&) of the bits in two flags values.
impl BitOr for LlmAttributes
impl BitOr for LlmAttributes
bitor
fn bitor(self, other: LlmAttributes) -> Self
The bitwise or (|) of the bits in two flags values.
Output
type Output = LlmAttributes
impl BitOrAssign for LlmAttributes
impl BitOrAssign for LlmAttributes
bitor_assign
fn bitor_assign(&mut self, other: Self)
The bitwise or (|) of the bits in two flags values.
impl BitXor for LlmAttributes
impl BitXor for LlmAttributes
bitxor
fn bitxor(self, other: Self) -> Self
The bitwise exclusive-or (^) of the bits in two flags values.
Output
type Output = LlmAttributes
impl BitXorAssign for LlmAttributes
impl BitXorAssign for LlmAttributes
bitxor_assign
fn bitxor_assign(&mut self, other: Self)
The bitwise exclusive-or (^) of the bits in two flags values.
impl Clone for LlmAttributes
impl Clone for LlmAttributes
clone
fn clone(&self) -> LlmAttributes
clone_from
fn clone_from(&mut self, source: &Self)
impl Debug for LlmAttributes
impl Debug for LlmAttributes
fmt
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<'de> Deserialize<'de> for LlmAttributes
impl<'de> Deserialize<'de> for LlmAttributes
deserialize
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Extend<LlmAttributes> for LlmAttributes
impl Extend<LlmAttributes> for LlmAttributes
extend
fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
The bitwise or (|) of the bits in each flags value.
extend_one
fn extend_one(&mut self, item: A)
extend_reserve
fn extend_reserve(&mut self, additional: usize)
impl Flags for LlmAttributes
impl Flags for LlmAttributes
FLAGS
const FLAGS: &'static [Flag<LlmAttributes>]
Bits
type Bits = u32
bits
fn bits(&self) -> u32
from_bits_retain
fn from_bits_retain(bits: u32) -> LlmAttributes
empty
fn empty() -> Self
all
fn all() -> Self
known_bits
fn known_bits(&self) -> Self::Bits
unknown_bits
fn unknown_bits(&self) -> Self::Bits
contains_unknown_bits
fn contains_unknown_bits(&self) -> bool
from_bits
fn from_bits(bits: Self::Bits) -> Option<Self>
from_bits_truncate
fn from_bits_truncate(bits: Self::Bits) -> Self
from_name
fn from_name(name: &str) -> Option<Self>
iter
fn iter(&self) -> Iter<Self>
iter_names
fn iter_names(&self) -> IterNames<Self>
iter_defined_names
fn iter_defined_names() -> IterDefinedNames<Self>
is_empty
fn is_empty(&self) -> bool
is_all
fn is_all(&self) -> bool
intersects
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
contains
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
truncate
fn truncate(&mut self)where
Self: Sized,
insert
fn insert(&mut self, other: Self)where
Self: Sized,
remove
fn remove(&mut self, other: Self)where
Self: Sized,
toggle
fn toggle(&mut self, other: Self)where
Self: Sized,
set
fn set(&mut self, other: Self, value: bool)where
Self: Sized,
clear
fn clear(&mut self)where
Self: Sized,
intersection
fn intersection(self, other: Self) -> Self
union
fn union(self, other: Self) -> Self
difference
fn difference(self, other: Self) -> Self
symmetric_difference
fn symmetric_difference(self, other: Self) -> Self
complement
fn complement(self) -> Self
impl FromIterator<LlmAttributes> for LlmAttributes
impl FromIterator<LlmAttributes> for LlmAttributes
from_iter
fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
The bitwise or (|) of the bits in each flags value.
impl Hash for LlmAttributes
impl Hash for LlmAttributes
hash
fn hash<__H: Hasher>(&self, state: &mut __H)
hash_slice
fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
Self: Sized,
impl IntoIterator for LlmAttributes
impl IntoIterator for LlmAttributes
Item
type Item = LlmAttributes
IntoIter
type IntoIter = Iter<LlmAttributes>
into_iter
fn into_iter(self) -> Self::IntoIter
impl LowerHex for LlmAttributes
impl LowerHex for LlmAttributes
fmt
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Not for LlmAttributes
impl Not for LlmAttributes
not
fn not(self) -> Self
The bitwise negation (!) of the bits in a flags value, truncating the result.
Output
type Output = LlmAttributes
impl Octal for LlmAttributes
impl Octal for LlmAttributes
fmt
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl PartialEq for LlmAttributes
impl PartialEq for LlmAttributes
eq
fn eq(&self, other: &LlmAttributes) -> bool
ne
fn ne(&self, other: &Rhs) -> bool
impl PublicFlags for LlmAttributes
impl PublicFlags for LlmAttributes
Primitive
type Primitive = u32
Internal
type Internal = InternalBitFlags
impl Serialize for LlmAttributes
impl Serialize for LlmAttributes
serialize
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
impl Sub for LlmAttributes
impl Sub for LlmAttributes
sub
fn sub(self, other: Self) -> Self
The intersection of a source flags value with the complement of a target flags value (&!).
This method is not equivalent to self & !other when other has unknown bits set. difference won’t truncate other, but the ! operator will.
Output
type Output = LlmAttributes
impl SubAssign for LlmAttributes
impl SubAssign for LlmAttributes
sub_assign
fn sub_assign(&mut self, other: Self)
The intersection of a source flags value with the complement of a target flags value (&!).
This method is not equivalent to self & !other when other has unknown bits set. difference won’t truncate other, but the ! operator will.
impl UpperHex for LlmAttributes
impl UpperHex for LlmAttributes
fmt
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Copy for LlmAttributes
impl Copy for LlmAttributes
impl Eq for LlmAttributes
impl Eq for LlmAttributes
impl StructuralPartialEq for LlmAttributes
impl StructuralPartialEq for LlmAttributes