pub struct CodeGateProtoAccessor<'a> { /* private fields */ }Implementations§
Source§impl<'a> CodeGateProtoAccessor<'a>
impl<'a> CodeGateProtoAccessor<'a>
Sourcepub fn get<I>(&self, id: I) -> Option<&'a CodeGateProtoEntry>where
I: TryInto<CodeGateProtoTemplateId>,
pub fn get<I>(&self, id: I) -> Option<&'a CodeGateProtoEntry>where
I: TryInto<CodeGateProtoTemplateId>,
Look up an entry by its templateId. Accepts either the typed
CodeGateProtoTemplateId enum variant (compile-time validated) or
&str (runtime-parsed via FromStr). Returns None if the string
fails to parse OR no entry exists for the ID.
pub fn has<I>(&self, id: I) -> boolwhere
I: TryInto<CodeGateProtoTemplateId>,
pub fn iter(&self) -> impl Iterator<Item = &'a CodeGateProtoEntry> + '_
pub fn template_ids(&self) -> impl Iterator<Item = CodeGateProtoTemplateId> + '_
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Auto Trait Implementations§
impl<'a> Freeze for CodeGateProtoAccessor<'a>
impl<'a> RefUnwindSafe for CodeGateProtoAccessor<'a>
impl<'a> Send for CodeGateProtoAccessor<'a>
impl<'a> Sync for CodeGateProtoAccessor<'a>
impl<'a> Unpin for CodeGateProtoAccessor<'a>
impl<'a> UnsafeUnpin for CodeGateProtoAccessor<'a>
impl<'a> UnwindSafe for CodeGateProtoAccessor<'a>
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