pub struct VariableSlot<'ns, 'env, F: Float> { /* private fields */ }Expand description
Anonymous slot to register a variable
The registered variable array will be kept in the associated namespace.
Use VariableNamespaceMut::slot to instantiate this.
Implementations§
Source§impl<'ns, 'env, F: Float> VariableSlot<'ns, 'env, F>
impl<'ns, 'env, F: Float> VariableSlot<'ns, 'env, F>
Sourcepub fn set<D: Dimension>(self, v: Array<F, D>) -> VariableID
pub fn set<D: Dimension>(self, v: Array<F, D>) -> VariableID
Registers the given array with the specified namespace.
Sourcepub fn name<S: Into<String>>(
self,
name: S,
) -> NamedVariableSlot<'ns, 'env, F, S>
pub fn name<S: Into<String>>( self, name: S, ) -> NamedVariableSlot<'ns, 'env, F, S>
Specifies the name for the array that will be registered.
Auto Trait Implementations§
impl<'ns, 'env, F> Freeze for VariableSlot<'ns, 'env, F>
impl<'ns, 'env, F> !RefUnwindSafe for VariableSlot<'ns, 'env, F>
impl<'ns, 'env, F> Send for VariableSlot<'ns, 'env, F>
impl<'ns, 'env, F> !Sync for VariableSlot<'ns, 'env, F>
impl<'ns, 'env, F> Unpin for VariableSlot<'ns, 'env, F>
impl<'ns, 'env, F> !UnwindSafe for VariableSlot<'ns, '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