pub struct NamedRegistry { /* private fields */ }Expand description
A named registry for storing values (functions, patterns, etc.)
Used by custom annotations (e.g. @strategy, @feature)
Implementations§
Source§impl NamedRegistry
impl NamedRegistry
pub fn new() -> Self
pub fn set(&mut self, key: String, value: ValueWord)
pub fn contains(&self, key: &str) -> bool
pub fn remove(&mut self, key: &str) -> Option<ValueWord>
pub fn keys(&self) -> impl Iterator<Item = &String>
Sourcepub fn values(&self) -> impl Iterator<Item = &ValueWord>
pub fn values(&self) -> impl Iterator<Item = &ValueWord>
Iterate over values as ValueWord references
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for NamedRegistry
impl Clone for NamedRegistry
Source§fn clone(&self) -> NamedRegistry
fn clone(&self) -> NamedRegistry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NamedRegistry
impl Debug for NamedRegistry
Source§impl Default for NamedRegistry
impl Default for NamedRegistry
Source§fn default() -> NamedRegistry
fn default() -> NamedRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NamedRegistry
impl RefUnwindSafe for NamedRegistry
impl Send for NamedRegistry
impl Sync for NamedRegistry
impl Unpin for NamedRegistry
impl UnsafeUnpin for NamedRegistry
impl UnwindSafe for NamedRegistry
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,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more