Struct Tool Attributes
Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.
Bitflags that modify tool-call behavior and observability.
Implementations
impl ToolAttributes
impl ToolAttributes
REMOTE
pub const REMOTE: Self
Marks the tool as executing out-of-process.
impl ToolAttributes
impl ToolAttributes
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 ToolAttributes
impl ToolAttributes
iter
pub const fn iter(&self) -> Iter<ToolAttributes>
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<ToolAttributes>
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 ToolAttributes
impl Binary for ToolAttributes
fmt
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl BitAnd for ToolAttributes
impl BitAnd for ToolAttributes
bitand
fn bitand(self, other: Self) -> Self
The bitwise and (&) of the bits in two flags values.
Output
type Output = ToolAttributes
impl BitAndAssign for ToolAttributes
impl BitAndAssign for ToolAttributes
bitand_assign
fn bitand_assign(&mut self, other: Self)
The bitwise and (&) of the bits in two flags values.
impl BitOr for ToolAttributes
impl BitOr for ToolAttributes
bitor
fn bitor(self, other: ToolAttributes) -> Self
The bitwise or (|) of the bits in two flags values.
Output
type Output = ToolAttributes
impl BitOrAssign for ToolAttributes
impl BitOrAssign for ToolAttributes
bitor_assign
fn bitor_assign(&mut self, other: Self)
The bitwise or (|) of the bits in two flags values.
impl BitXor for ToolAttributes
impl BitXor for ToolAttributes
bitxor
fn bitxor(self, other: Self) -> Self
The bitwise exclusive-or (^) of the bits in two flags values.
Output
type Output = ToolAttributes
impl BitXorAssign for ToolAttributes
impl BitXorAssign for ToolAttributes
bitxor_assign
fn bitxor_assign(&mut self, other: Self)
The bitwise exclusive-or (^) of the bits in two flags values.
impl Clone for ToolAttributes
impl Clone for ToolAttributes
clone
fn clone(&self) -> ToolAttributes
clone_from
fn clone_from(&mut self, source: &Self)
impl Debug for ToolAttributes
impl Debug for ToolAttributes
fmt
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<'de> Deserialize<'de> for ToolAttributes
impl<'de> Deserialize<'de> for ToolAttributes
deserialize
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Extend<ToolAttributes> for ToolAttributes
impl Extend<ToolAttributes> for ToolAttributes
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 ToolAttributes
impl Flags for ToolAttributes
FLAGS
const FLAGS: &'static [Flag<ToolAttributes>]
Bits
type Bits = u32
bits
fn bits(&self) -> u32
from_bits_retain
fn from_bits_retain(bits: u32) -> ToolAttributes
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<ToolAttributes> for ToolAttributes
impl FromIterator<ToolAttributes> for ToolAttributes
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 ToolAttributes
impl Hash for ToolAttributes
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 ToolAttributes
impl IntoIterator for ToolAttributes
Item
type Item = ToolAttributes
IntoIter
type IntoIter = Iter<ToolAttributes>
into_iter
fn into_iter(self) -> Self::IntoIter
impl LowerHex for ToolAttributes
impl LowerHex for ToolAttributes
fmt
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Not for ToolAttributes
impl Not for ToolAttributes
not
fn not(self) -> Self
The bitwise negation (!) of the bits in a flags value, truncating the result.
Output
type Output = ToolAttributes
impl Octal for ToolAttributes
impl Octal for ToolAttributes
fmt
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl PartialEq for ToolAttributes
impl PartialEq for ToolAttributes
eq
fn eq(&self, other: &ToolAttributes) -> bool
ne
fn ne(&self, other: &Rhs) -> bool
impl PublicFlags for ToolAttributes
impl PublicFlags for ToolAttributes
Primitive
type Primitive = u32
Internal
type Internal = InternalBitFlags
impl Serialize for ToolAttributes
impl Serialize for ToolAttributes
serialize
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
impl Sub for ToolAttributes
impl Sub for ToolAttributes
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 = ToolAttributes
impl SubAssign for ToolAttributes
impl SubAssign for ToolAttributes
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 ToolAttributes
impl UpperHex for ToolAttributes
fmt
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Copy for ToolAttributes
impl Copy for ToolAttributes
impl Eq for ToolAttributes
impl Eq for ToolAttributes
impl StructuralPartialEq for ToolAttributes
impl StructuralPartialEq for ToolAttributes