pub struct VariableNamespaceMut<'env, F: Float> { /* private fields */ }Expand description
Mutable version of VariableNamespace.
You can register a new variable array with this namespace using slot method.
Implementations§
Source§impl<F: Float> VariableNamespaceMut<'_, F>
impl<F: Float> VariableNamespaceMut<'_, F>
Source§impl<'ns, 'env, F: Float> VariableNamespaceMut<'env, F>
impl<'ns, 'env, F: Float> VariableNamespaceMut<'env, F>
Sourcepub fn slot(&'ns mut self) -> VariableSlot<'ns, 'env, F>
pub fn slot(&'ns mut self) -> VariableSlot<'ns, 'env, F>
Makes a temporary slot for registering a variable array in this namespace.
Trait Implementations§
Source§impl<F: Float> NamespaceTrait<F> for VariableNamespaceMut<'_, F>
impl<F: Float> NamespaceTrait<F> for VariableNamespaceMut<'_, F>
Source§fn env(&self) -> &VariableEnvironment<F>
fn env(&self) -> &VariableEnvironment<F>
A reference to the
VariableEnvironment.Source§fn get_array_by_id(&self, vid: VariableID) -> &RefCell<NdArray<F>>
fn get_array_by_id(&self, vid: VariableID) -> &RefCell<NdArray<F>>
Returns a reference to the variable array
Source§fn get_array_by_name<S: AsRef<str>>(
&self,
name: S,
) -> Option<&RefCell<NdArray<F>>>
fn get_array_by_name<S: AsRef<str>>( &self, name: S, ) -> Option<&RefCell<NdArray<F>>>
Returns a reference to the variable array with the specified name. Read more
Source§fn current_var_ids(&self) -> Vec<VariableID>
fn current_var_ids(&self) -> Vec<VariableID>
Lists all the IDs of the variable arrays in this namespace.
Source§fn current_var_names(&self) -> Vec<&str>
fn current_var_names(&self) -> Vec<&str>
Lists all the names of the variable arrays in this namespace.
Auto Trait Implementations§
impl<'env, F> Freeze for VariableNamespaceMut<'env, F>
impl<'env, F> !RefUnwindSafe for VariableNamespaceMut<'env, F>
impl<'env, F> Send for VariableNamespaceMut<'env, F>
impl<'env, F> !Sync for VariableNamespaceMut<'env, F>
impl<'env, F> Unpin for VariableNamespaceMut<'env, F>
impl<'env, F> !UnwindSafe for VariableNamespaceMut<'env, F>
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