pub struct VariableRegistry { /* private fields */ }Expand description
A registry to store variables in during macro execution.
Implementations§
Source§impl VariableRegistry
impl VariableRegistry
Sourcepub fn load<'slf, 'name>(&'slf self, name: &'name [u8]) -> Option<&'slf [u8]>
pub fn load<'slf, 'name>(&'slf self, name: &'name [u8]) -> Option<&'slf [u8]>
Loads a variable of a given name.
Sourcepub fn load_mut<'slf, 'name>(
&'slf mut self,
name: &'name [u8],
) -> Option<&'slf mut [u8]>
pub fn load_mut<'slf, 'name>( &'slf mut self, name: &'name [u8], ) -> Option<&'slf mut [u8]>
Loads a variable of a given name, giving a mutable reference to it.
Auto Trait Implementations§
impl Freeze for VariableRegistry
impl RefUnwindSafe for VariableRegistry
impl Send for VariableRegistry
impl Sync for VariableRegistry
impl Unpin for VariableRegistry
impl UnwindSafe for VariableRegistry
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> 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