pub struct Param<T> {
pub value: T,
/* private fields */
}
Expand description
A simple wrapper for a module parameter.
Fields§
§value: T
The value of the parameter.
Implementations§
Trait Implementations§
Source§impl Parameter for Param<Array>
impl Parameter for Param<Array>
Source§fn is_frozen(&self) -> Option<bool>
fn is_frozen(&self) -> Option<bool>
Check if the parameter is frozen. Returns
None
if the parameter is a module that has no
parameters.Source§fn as_nested_value<'a>(&self) -> NestedValue<Rc<str>, &Array>
fn as_nested_value<'a>(&self) -> NestedValue<Rc<str>, &Array>
Get the parameter as a nested value.
Source§fn as_nested_value_mut<'a>(&mut self) -> NestedValue<Rc<str>, &mut Array>
fn as_nested_value_mut<'a>(&mut self) -> NestedValue<Rc<str>, &mut Array>
Get the parameter as a mutable nested value.
Source§fn as_trainable_nested_value<'a>(&self) -> Option<NestedValue<Rc<str>, &Array>>
fn as_trainable_nested_value<'a>(&self) -> Option<NestedValue<Rc<str>, &Array>>
Get the parameter as a nested value if it is trainable.
Source§impl Parameter for Param<Option<Array>>
impl Parameter for Param<Option<Array>>
Source§fn is_frozen(&self) -> Option<bool>
fn is_frozen(&self) -> Option<bool>
Check if the parameter is frozen. Returns
None
if the parameter is a module that has no
parameters.Source§fn as_nested_value(&self) -> NestedValue<Rc<str>, &Array>
fn as_nested_value(&self) -> NestedValue<Rc<str>, &Array>
Get the parameter as a nested value.
Source§fn as_nested_value_mut(&mut self) -> NestedValue<Rc<str>, &mut Array>
fn as_nested_value_mut(&mut self) -> NestedValue<Rc<str>, &mut Array>
Get the parameter as a mutable nested value.
Source§fn as_trainable_nested_value(&self) -> Option<NestedValue<Rc<str>, &Array>>
fn as_trainable_nested_value(&self) -> Option<NestedValue<Rc<str>, &Array>>
Get the parameter as a nested value if it is trainable.
Auto Trait Implementations§
impl<T> Freeze for Param<T>where
T: Freeze,
impl<T> RefUnwindSafe for Param<T>where
T: RefUnwindSafe,
impl<T> Send for Param<T>where
T: Send,
impl<T> Sync for Param<T>where
T: Sync,
impl<T> Unpin for Param<T>where
T: Unpin,
impl<T> UnwindSafe for Param<T>where
T: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Convert into an
Option
.