pub struct EffectRow(/* private fields */);Expand description
Required handler keys and their effect families, ordered by key.
Self::is_subset_of validates the requirements against handler descriptors.
Implementations§
Source§impl EffectRow
impl EffectRow
Sourcepub fn insert(
&mut self,
key: HandlerKey,
family: EffectFamily,
) -> Option<EffectFamily>
pub fn insert( &mut self, key: HandlerKey, family: EffectFamily, ) -> Option<EffectFamily>
Name key as family; a key already named is re-named.
Sourcepub fn insert_if_absent(&mut self, key: HandlerKey, family: EffectFamily)
pub fn insert_if_absent(&mut self, key: HandlerKey, family: EffectFamily)
Name key as family unless the row already names it.
Sourcepub fn remove(&mut self, key: &HandlerKey) -> Option<EffectFamily>
pub fn remove(&mut self, key: &HandlerKey) -> Option<EffectFamily>
Remove key from the row; the family it named, if it was there.
Sourcepub fn get(&self, key: &HandlerKey) -> Option<&EffectFamily>
pub fn get(&self, key: &HandlerKey) -> Option<&EffectFamily>
The family the row names key as.
Sourcepub fn contains_key(&self, key: &HandlerKey) -> bool
pub fn contains_key(&self, key: &HandlerKey) -> bool
Whether the row names key.
Sourcepub fn keys(&self) -> impl Iterator<Item = &HandlerKey>
pub fn keys(&self) -> impl Iterator<Item = &HandlerKey>
The keys, in order.
Sourcepub fn iter(&self) -> impl Iterator<Item = (&HandlerKey, &EffectFamily)>
pub fn iter(&self) -> impl Iterator<Item = (&HandlerKey, &EffectFamily)>
The entries, in key order.
Sourcepub fn is_subset_of(&self, handlers: &[HandlerDescriptor]) -> Result<(), RowGap>
pub fn is_subset_of(&self, handlers: &[HandlerDescriptor]) -> Result<(), RowGap>
Validates that every key is served with the required family, returning the first gap in key order. Uses the first descriptor matching each key.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EffectRow
impl<'de> Deserialize<'de> for EffectRow
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EffectRow, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EffectRow, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for EffectRow
Source§impl FromIterator<(HandlerKey, EffectFamily)> for EffectRow
impl FromIterator<(HandlerKey, EffectFamily)> for EffectRow
Source§impl<'a> IntoIterator for &'a EffectRow
impl<'a> IntoIterator for &'a EffectRow
Source§type Item = (&'a HandlerKey, &'a EffectFamily)
type Item = (&'a HandlerKey, &'a EffectFamily)
The type of the elements being iterated over.
Source§type IntoIter = Iter<'a, HandlerKey, EffectFamily>
type IntoIter = Iter<'a, HandlerKey, EffectFamily>
Which kind of iterator are we turning this into?
Source§impl IntoIterator for EffectRow
impl IntoIterator for EffectRow
Source§type Item = (HandlerKey, EffectFamily)
type Item = (HandlerKey, EffectFamily)
The type of the elements being iterated over.
Source§type IntoIter = IntoIter<HandlerKey, EffectFamily>
type IntoIter = IntoIter<HandlerKey, EffectFamily>
Which kind of iterator are we turning this into?
Source§impl Serialize for EffectRow
impl Serialize for EffectRow
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for EffectRow
Auto Trait Implementations§
impl Freeze for EffectRow
impl RefUnwindSafe for EffectRow
impl Send for EffectRow
impl Sync for EffectRow
impl Unpin for EffectRow
impl UnsafeUnpin for EffectRow
impl UnwindSafe for EffectRow
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
Source§fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
Convert this value without routing structured data through a string.