pub struct VariableStore { /* private fields */ }Expand description
A VarStore is used to store variables used by one or multiple layers. It specifies a single device where all variables are stored.
Implementations§
Source§impl VariableStore
impl VariableStore
pub fn root(&self) -> VariableName<'_>
Sourcepub fn div_name<T: ToString>(&self, names: &[String], new: T) -> Vec<String>
pub fn div_name<T: ToString>(&self, names: &[String], new: T) -> Vec<String>
Create a new variable name if not exist, or reuse existence variable.
Sourcepub fn add_name<T: ToString>(
&self,
old: &VariableName<'_>,
new: T,
) -> VariableName<'_>
pub fn add_name<T: ToString>( &self, old: &VariableName<'_>, new: T, ) -> VariableName<'_>
Create a new variable in any case.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VariableStore
impl !RefUnwindSafe for VariableStore
impl Send for VariableStore
impl Sync for VariableStore
impl Unpin for VariableStore
impl UnwindSafe for VariableStore
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