pub struct ParamsBase<S, D = Dim<[usize; 2]>>{ /* private fields */ }
Expand description
The ParamsBase
struct is a generic container for a set of weights and biases for a
model where the bias tensor is always n-1
dimensions smaller than the weights
tensor.
Consequently, this constrains the ParamsBase
implementation to only support dimensions
that can be reduced by one axis (i.e. $\mbox{rank}(D)>0
$), which is typically the “zero-th” axis.
Implementations§
Source§impl<A, S, D> ParamsBase<S, D>
impl<A, S, D> ParamsBase<S, D>
Sourcepub const fn new(
bias: ArrayBase<S, <D as Dimension>::Smaller>,
weights: ArrayBase<S, D>,
) -> ParamsBase<S, D>
pub const fn new( bias: ArrayBase<S, <D as Dimension>::Smaller>, weights: ArrayBase<S, D>, ) -> ParamsBase<S, D>
create a new instance of the ParamsBase
with the given bias and weights
Sourcepub fn init_from_fn<Sh, F>(shape: Sh, init: F) -> ParamsBase<S, D>
pub fn init_from_fn<Sh, F>(shape: Sh, init: F) -> ParamsBase<S, D>
returns a new instance of the ParamsBase
using the initialization routine
Sourcepub fn from_shape_fn<Sh, F>(shape: Sh, f: F) -> ParamsBase<S, D>
pub fn from_shape_fn<Sh, F>(shape: Sh, f: F) -> ParamsBase<S, D>
returns a new instance of the ParamsBase
initialized use the given shape_function
Sourcepub fn from_bias<Sh>(
shape: Sh,
bias: ArrayBase<S, <D as Dimension>::Smaller>,
) -> ParamsBase<S, D>
pub fn from_bias<Sh>( shape: Sh, bias: ArrayBase<S, <D as Dimension>::Smaller>, ) -> ParamsBase<S, D>
create a new instance of the ParamsBase
with the given bias used the default weights
Sourcepub fn from_weights<Sh>(shape: Sh, weights: ArrayBase<S, D>) -> ParamsBase<S, D>
pub fn from_weights<Sh>(shape: Sh, weights: ArrayBase<S, D>) -> ParamsBase<S, D>
create a new instance of the ParamsBase
with the given weights used the default
bias
Sourcepub fn from_elem<Sh>(shape: Sh, elem: A) -> ParamsBase<S, D>
pub fn from_elem<Sh>(shape: Sh, elem: A) -> ParamsBase<S, D>
create a new instance of the ParamsBase
from the given shape and element;
Sourcepub fn default<Sh>(shape: Sh) -> ParamsBase<S, D>
pub fn default<Sh>(shape: Sh) -> ParamsBase<S, D>
create an instance of the parameters with all values set to the default value
Sourcepub fn ones<Sh>(shape: Sh) -> ParamsBase<S, D>
pub fn ones<Sh>(shape: Sh) -> ParamsBase<S, D>
initialize the parameters with all values set to zero
Sourcepub fn zeros<Sh>(shape: Sh) -> ParamsBase<S, D>
pub fn zeros<Sh>(shape: Sh) -> ParamsBase<S, D>
create an instance of the parameters with all values set to zero
Sourcepub const fn bias(&self) -> &ArrayBase<S, <D as Dimension>::Smaller>
pub const fn bias(&self) -> &ArrayBase<S, <D as Dimension>::Smaller>
returns an immutable reference to the bias
Sourcepub const fn bias_mut(&mut self) -> &mut ArrayBase<S, <D as Dimension>::Smaller>
pub const fn bias_mut(&mut self) -> &mut ArrayBase<S, <D as Dimension>::Smaller>
returns a mutable reference to the bias
Sourcepub const fn weights_mut(&mut self) -> &mut ArrayBase<S, D>
pub const fn weights_mut(&mut self) -> &mut ArrayBase<S, D>
returns a mutable reference to the weights
Sourcepub fn assign_bias(
&mut self,
bias: &ArrayBase<S, <D as Dimension>::Smaller>,
) -> &mut ParamsBase<S, D>
pub fn assign_bias( &mut self, bias: &ArrayBase<S, <D as Dimension>::Smaller>, ) -> &mut ParamsBase<S, D>
assign the bias
Sourcepub fn assign_weights(
&mut self,
weights: &ArrayBase<S, D>,
) -> &mut ParamsBase<S, D>
pub fn assign_weights( &mut self, weights: &ArrayBase<S, D>, ) -> &mut ParamsBase<S, D>
assign the weights
Sourcepub fn replace_bias(
&mut self,
bias: ArrayBase<S, <D as Dimension>::Smaller>,
) -> ArrayBase<S, <D as Dimension>::Smaller>
pub fn replace_bias( &mut self, bias: ArrayBase<S, <D as Dimension>::Smaller>, ) -> ArrayBase<S, <D as Dimension>::Smaller>
replace the bias and return the previous state; uses replace
Sourcepub fn replace_weights(&mut self, weights: ArrayBase<S, D>) -> ArrayBase<S, D>
pub fn replace_weights(&mut self, weights: ArrayBase<S, D>) -> ArrayBase<S, D>
replace the weights and return the previous state; uses replace
Sourcepub fn set_bias(
&mut self,
bias: ArrayBase<S, <D as Dimension>::Smaller>,
) -> &mut ParamsBase<S, D>
pub fn set_bias( &mut self, bias: ArrayBase<S, <D as Dimension>::Smaller>, ) -> &mut ParamsBase<S, D>
set the bias
Sourcepub fn set_weights(&mut self, weights: ArrayBase<S, D>) -> &mut ParamsBase<S, D>
pub fn set_weights(&mut self, weights: ArrayBase<S, D>) -> &mut ParamsBase<S, D>
set the weights
Sourcepub fn backward<X, Y, Z>(
&mut self,
input: &X,
grad: &Y,
lr: A,
) -> Result<Z, Error>
pub fn backward<X, Y, Z>( &mut self, input: &X, grad: &Y, lr: A, ) -> Result<Z, Error>
perform a single backpropagation step
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
returns true if both the weights and bias are empty; uses is_empty
Sourcepub fn is_weights_empty(&self) -> bool
pub fn is_weights_empty(&self) -> bool
returns true if the weights are empty
Sourcepub fn is_bias_empty(&self) -> bool
pub fn is_bias_empty(&self) -> bool
returns true if the bias is empty
Sourcepub fn count_weight(&self) -> usize
pub fn count_weight(&self) -> usize
the total number of elements within the weight tensor
Sourcepub fn count_bias(&self) -> usize
pub fn count_bias(&self) -> usize
the total number of elements within the bias tensor
Sourcepub fn shape(&self) -> &[usize]
pub fn shape(&self) -> &[usize]
returns the shape of the parameters; uses the shape of the weight tensor
Sourcepub fn shape_bias(&self) -> &[usize]
pub fn shape_bias(&self) -> &[usize]
returns the shape of the bias tensor; the shape should be equivalent to that of the weight tensor minus the “zero-th” axis
Sourcepub fn to_owned(&self) -> ParamsBase<OwnedRepr<A>, D>
pub fn to_owned(&self) -> ParamsBase<OwnedRepr<A>, D>
returns an owned instance of the parameters
Sourcepub fn to_shape<Sh>(
&self,
shape: Sh,
) -> Result<ParamsBase<CowRepr<'_, A>, <Sh as ShapeBuilder>::Dim>, Error>
pub fn to_shape<Sh>( &self, shape: Sh, ) -> Result<ParamsBase<CowRepr<'_, A>, <Sh as ShapeBuilder>::Dim>, Error>
change the shape of the parameters; the shape of the bias parameters is determined by removing the “zero-th” axis of the given shape
returns a new ParamsBase
instance with the same paramaters, but using a shared
representation of the data;
Source§impl<A, S> ParamsBase<S, Dim<[usize; 1]>>where
S: RawData<Elem = A>,
impl<A, S> ParamsBase<S, Dim<[usize; 1]>>where
S: RawData<Elem = A>,
Sourcepub fn from_scalar_bias(
bias: A,
weights: ArrayBase<S, Dim<[usize; 1]>>,
) -> ParamsBase<S, Dim<[usize; 1]>>
pub fn from_scalar_bias( bias: A, weights: ArrayBase<S, Dim<[usize; 1]>>, ) -> ParamsBase<S, Dim<[usize; 1]>>
returns a new instance of the ParamsBase
initialized using a scalar bias along
with the given, one-dimensional weight tensor.
Source§impl<A, S> ParamsBase<S>where
S: RawData<Elem = A>,
impl<A, S> ParamsBase<S>where
S: RawData<Elem = A>,
Source§impl<S, D, A> ParamsBase<S, D>
Here, we implement various iterators for the parameters and its constituents. The core
iterators are:
impl<S, D, A> ParamsBase<S, D>
Here, we implement various iterators for the parameters and its constituents. The core iterators are:
- immutable and mutable iterators over each parameter (weights and bias) respectively;
- an iterator over the parameters, which zips together an axis iterator over the columns of the weights and an iterator over the bias;
Sourcepub fn iter(&self) -> Iter<'_, A, D> ⓘwhere
D: RemoveAxis,
S: Data,
pub fn iter(&self) -> Iter<'_, A, D> ⓘwhere
D: RemoveAxis,
S: Data,
an iterator of the parameters; the created iterator zips together an axis iterator over the columns of the weights and an iterator over the bias
Sourcepub fn iter_mut(&mut self) -> IterMut<'_, A, D> ⓘwhere
D: RemoveAxis,
S: DataMut,
pub fn iter_mut(&mut self) -> IterMut<'_, A, D> ⓘwhere
D: RemoveAxis,
S: DataMut,
returns a mutable iterator of the parameters, IterMut
, which essentially zips
together a mutable axis iterator over the columns of the weights against a mutable
iterator over the elements of the bias
Sourcepub fn iter_bias(&self) -> Iter<'_, A, <D as Dimension>::Smaller>where
S: Data,
pub fn iter_bias(&self) -> Iter<'_, A, <D as Dimension>::Smaller>where
S: Data,
returns an iterator over the bias
Sourcepub fn iter_bias_mut(&mut self) -> IterMut<'_, A, <D as Dimension>::Smaller>where
S: DataMut,
pub fn iter_bias_mut(&mut self) -> IterMut<'_, A, <D as Dimension>::Smaller>where
S: DataMut,
returns a mutable iterator over the bias
Sourcepub fn iter_weights(&self) -> Iter<'_, A, D>where
S: Data,
pub fn iter_weights(&self) -> Iter<'_, A, D>where
S: Data,
returns an iterator over the weights
Sourcepub fn iter_weights_mut(&mut self) -> IterMut<'_, A, D>where
S: DataMut,
pub fn iter_weights_mut(&mut self) -> IterMut<'_, A, D>where
S: DataMut,
returns a mutable iterator over the weights; see iter_mut
for more
Source§impl<A, S, D> ParamsBase<S, D>
impl<A, S, D> ParamsBase<S, D>
Sourcepub fn apply_gradient<Delta, Z>(
&mut self,
grad: &Delta,
lr: A,
) -> Result<Z, Error>
pub fn apply_gradient<Delta, Z>( &mut self, grad: &Delta, lr: A, ) -> Result<Z, Error>
a convenience method used to apply a gradient to the parameters using the given learning rate.
pub fn apply_gradient_with_decay<Grad, Z>( &mut self, grad: &Grad, lr: A, decay: A, ) -> Result<Z, Error>
pub fn apply_gradient_with_momentum<Grad, V, Z>( &mut self, grad: &Grad, lr: A, momentum: A, velocity: &mut V, ) -> Result<Z, Error>
pub fn apply_gradient_with_decay_and_momentum<Grad, V, Z>( &mut self, grad: &Grad, lr: A, decay: A, momentum: A, velocity: &mut V, ) -> Result<Z, Error>
Source§impl<A, S, D> ParamsBase<S, D>
impl<A, S, D> ParamsBase<S, D>
Sourcepub fn random_with<Dst, Sh>(shape: Sh, distr: Dst) -> ParamsBase<S, D>
pub fn random_with<Dst, Sh>(shape: Sh, distr: Dst) -> ParamsBase<S, D>
returns a new instance of the ParamsBase
with the given shape and values
initialized according to the provided random distribution distr
.
Trait Implementations§
Source§impl<A, S, T, D> ApplyGradient<ParamsBase<T, D>, A> for ParamsBase<S, D>where
A: Float + FromPrimitive + ScalarOperand,
S: DataMut<Elem = A>,
T: Data<Elem = A>,
D: Dimension,
impl<A, S, T, D> ApplyGradient<ParamsBase<T, D>, A> for ParamsBase<S, D>where
A: Float + FromPrimitive + ScalarOperand,
S: DataMut<Elem = A>,
T: Data<Elem = A>,
D: Dimension,
type Output = ()
fn apply_gradient( &mut self, grad: &ParamsBase<T, D>, lr: A, ) -> Result<<ParamsBase<S, D> as ApplyGradient<ParamsBase<T, D>, A>>::Output, Error>
fn apply_gradient_with_decay( &mut self, grad: &ParamsBase<T, D>, lr: A, decay: A, ) -> Result<<ParamsBase<S, D> as ApplyGradient<ParamsBase<T, D>, A>>::Output, Error>
Source§impl<A, S, T, D> ApplyGradientExt<ParamsBase<T, D>, A> for ParamsBase<S, D>where
A: Float + FromPrimitive + ScalarOperand,
S: DataMut<Elem = A>,
T: Data<Elem = A>,
D: Dimension,
impl<A, S, T, D> ApplyGradientExt<ParamsBase<T, D>, A> for ParamsBase<S, D>where
A: Float + FromPrimitive + ScalarOperand,
S: DataMut<Elem = A>,
T: Data<Elem = A>,
D: Dimension,
type Velocity = ParamsBase<OwnedRepr<A>, D>
fn apply_gradient_with_momentum( &mut self, grad: &ParamsBase<T, D>, lr: A, momentum: A, velocity: &mut <ParamsBase<S, D> as ApplyGradientExt<ParamsBase<T, D>, A>>::Velocity, ) -> Result<(), Error>
fn apply_gradient_with_decay_and_momentum( &mut self, grad: &ParamsBase<T, D>, lr: A, decay: A, momentum: A, velocity: &mut <ParamsBase<S, D> as ApplyGradientExt<ParamsBase<T, D>, A>>::Velocity, ) -> Result<(), Error>
Source§impl<A, S, T> Backward<ArrayBase<S, Dim<[usize; 1]>>, ArrayBase<T, Dim<[usize; 0]>>> for ParamsBase<OwnedRepr<A>, Dim<[usize; 1]>>
impl<A, S, T> Backward<ArrayBase<S, Dim<[usize; 1]>>, ArrayBase<T, Dim<[usize; 0]>>> for ParamsBase<OwnedRepr<A>, Dim<[usize; 1]>>
type Elem = A
type Output = A
fn backward( &mut self, input: &ArrayBase<S, Dim<[usize; 1]>>, delta: &ArrayBase<T, Dim<[usize; 0]>>, gamma: <ParamsBase<OwnedRepr<A>, Dim<[usize; 1]>> as Backward<ArrayBase<S, Dim<[usize; 1]>>, ArrayBase<T, Dim<[usize; 0]>>>>::Elem, ) -> Result<<ParamsBase<OwnedRepr<A>, Dim<[usize; 1]>> as Backward<ArrayBase<S, Dim<[usize; 1]>>, ArrayBase<T, Dim<[usize; 0]>>>>::Output, Error>
Source§impl<A, S, T> Backward<ArrayBase<S, Dim<[usize; 1]>>, ArrayBase<T, Dim<[usize; 1]>>> for ParamsBase<OwnedRepr<A>>
impl<A, S, T> Backward<ArrayBase<S, Dim<[usize; 1]>>, ArrayBase<T, Dim<[usize; 1]>>> for ParamsBase<OwnedRepr<A>>
type Elem = A
type Output = A
fn backward( &mut self, input: &ArrayBase<S, Dim<[usize; 1]>>, delta: &ArrayBase<T, Dim<[usize; 1]>>, gamma: <ParamsBase<OwnedRepr<A>> as Backward<ArrayBase<S, Dim<[usize; 1]>>, ArrayBase<T, Dim<[usize; 1]>>>>::Elem, ) -> Result<<ParamsBase<OwnedRepr<A>> as Backward<ArrayBase<S, Dim<[usize; 1]>>, ArrayBase<T, Dim<[usize; 1]>>>>::Output, Error>
Source§impl<A, S, T> Backward<ArrayBase<S, Dim<[usize; 2]>>, ArrayBase<T, Dim<[usize; 1]>>> for ParamsBase<OwnedRepr<A>, Dim<[usize; 1]>>
impl<A, S, T> Backward<ArrayBase<S, Dim<[usize; 2]>>, ArrayBase<T, Dim<[usize; 1]>>> for ParamsBase<OwnedRepr<A>, Dim<[usize; 1]>>
type Elem = A
type Output = A
fn backward( &mut self, input: &ArrayBase<S, Dim<[usize; 2]>>, delta: &ArrayBase<T, Dim<[usize; 1]>>, gamma: <ParamsBase<OwnedRepr<A>, Dim<[usize; 1]>> as Backward<ArrayBase<S, Dim<[usize; 2]>>, ArrayBase<T, Dim<[usize; 1]>>>>::Elem, ) -> Result<<ParamsBase<OwnedRepr<A>, Dim<[usize; 1]>> as Backward<ArrayBase<S, Dim<[usize; 2]>>, ArrayBase<T, Dim<[usize; 1]>>>>::Output, Error>
Source§impl<A, S, T> Backward<ArrayBase<S, Dim<[usize; 2]>>, ArrayBase<T, Dim<[usize; 2]>>> for ParamsBase<OwnedRepr<A>>
impl<A, S, T> Backward<ArrayBase<S, Dim<[usize; 2]>>, ArrayBase<T, Dim<[usize; 2]>>> for ParamsBase<OwnedRepr<A>>
type Elem = A
type Output = A
fn backward( &mut self, input: &ArrayBase<S, Dim<[usize; 2]>>, delta: &ArrayBase<T, Dim<[usize; 2]>>, gamma: <ParamsBase<OwnedRepr<A>> as Backward<ArrayBase<S, Dim<[usize; 2]>>, ArrayBase<T, Dim<[usize; 2]>>>>::Elem, ) -> Result<<ParamsBase<OwnedRepr<A>> as Backward<ArrayBase<S, Dim<[usize; 2]>>, ArrayBase<T, Dim<[usize; 2]>>>>::Output, Error>
Source§impl<S, D> Biased<S, D> for ParamsBase<S, D>
impl<S, D> Biased<S, D> for ParamsBase<S, D>
Source§fn bias_mut(&mut self) -> &mut ArrayBase<S, <D as Dimension>::Smaller>
fn bias_mut(&mut self) -> &mut ArrayBase<S, <D as Dimension>::Smaller>
Source§fn assign_bias(
&mut self,
bias: &ArrayBase<S, <D as Dimension>::Smaller>,
) -> &mut Self
fn assign_bias( &mut self, bias: &ArrayBase<S, <D as Dimension>::Smaller>, ) -> &mut Self
Source§fn replace_bias(
&mut self,
bias: ArrayBase<S, <D as Dimension>::Smaller>,
) -> ArrayBase<S, <D as Dimension>::Smaller>
fn replace_bias( &mut self, bias: ArrayBase<S, <D as Dimension>::Smaller>, ) -> ArrayBase<S, <D as Dimension>::Smaller>
Source§fn set_bias(
&mut self,
bias: ArrayBase<S, <D as Dimension>::Smaller>,
) -> &mut Self
fn set_bias( &mut self, bias: ArrayBase<S, <D as Dimension>::Smaller>, ) -> &mut Self
Source§impl<A, S, D> Clone for ParamsBase<S, D>
impl<A, S, D> Clone for ParamsBase<S, D>
Source§fn clone(&self) -> ParamsBase<S, D>
fn clone(&self) -> ParamsBase<S, D>
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<A, S, D> Debug for ParamsBase<S, D>
impl<A, S, D> Debug for ParamsBase<S, D>
Source§impl<'a, A, S, D> Deserialize<'a> for ParamsBase<S, D>where
D: Dimension + Deserialize<'a>,
S: DataOwned<Elem = A>,
A: Deserialize<'a>,
<D as Dimension>::Smaller: Deserialize<'a>,
impl<'a, A, S, D> Deserialize<'a> for ParamsBase<S, D>where
D: Dimension + Deserialize<'a>,
S: DataOwned<Elem = A>,
A: Deserialize<'a>,
<D as Dimension>::Smaller: Deserialize<'a>,
Source§fn deserialize<De>(
deserializer: De,
) -> Result<ParamsBase<S, D>, <De as Deserializer<'a>>::Error>where
De: Deserializer<'a>,
fn deserialize<De>(
deserializer: De,
) -> Result<ParamsBase<S, D>, <De as Deserializer<'a>>::Error>where
De: Deserializer<'a>,
Source§impl<A, S, D> Display for ParamsBase<S, D>
impl<A, S, D> Display for ParamsBase<S, D>
Source§impl<A, X, Y, Z, S, D> Forward<X> for ParamsBase<S, D>
impl<A, X, Y, Z, S, D> Forward<X> for ParamsBase<S, D>
type Output = Z
Source§fn forward(
&self,
input: &X,
) -> Result<<ParamsBase<S, D> as Forward<X>>::Output, Error>
fn forward( &self, input: &X, ) -> Result<<ParamsBase<S, D> as Forward<X>>::Output, Error>
Source§fn forward_then<F>(&self, input: &Rhs, then: F) -> Result<Self::Output, Error>
fn forward_then<F>(&self, input: &Rhs, then: F) -> Result<Self::Output, Error>
Source§impl<A, S, D> IntoIterator for ParamsBase<S, D>
impl<A, S, D> IntoIterator for ParamsBase<S, D>
Source§type Item = ParamsBase<S, D>
type Item = ParamsBase<S, D>
Source§type IntoIter = Once<ParamsBase<S, D>>
type IntoIter = Once<ParamsBase<S, D>>
Source§fn into_iter(self) -> <ParamsBase<S, D> as IntoIterator>::IntoIter
fn into_iter(self) -> <ParamsBase<S, D> as IntoIterator>::IntoIter
Source§impl<A, S, D> PartialEq<&ParamsBase<S, D>> for ParamsBase<S, D>
impl<A, S, D> PartialEq<&ParamsBase<S, D>> for ParamsBase<S, D>
Source§impl<A, S, D> PartialEq<&mut ParamsBase<S, D>> for ParamsBase<S, D>
impl<A, S, D> PartialEq<&mut ParamsBase<S, D>> for ParamsBase<S, D>
Source§impl<A, S, D> PartialEq for ParamsBase<S, D>
impl<A, S, D> PartialEq for ParamsBase<S, D>
Source§impl<S, D> RawHidden<S, D> for ParamsBase<S, D>
impl<S, D> RawHidden<S, D> for ParamsBase<S, D>
Source§impl<A, S, D> Serialize for ParamsBase<S, D>
impl<A, S, D> Serialize for ParamsBase<S, D>
Source§fn serialize<Ser>(
&self,
serializer: Ser,
) -> Result<<Ser as Serializer>::Ok, <Ser as Serializer>::Error>where
Ser: Serializer,
fn serialize<Ser>(
&self,
serializer: Ser,
) -> Result<<Ser as Serializer>::Ok, <Ser as Serializer>::Error>where
Ser: Serializer,
Source§impl<S, D> Weighted<S, D> for ParamsBase<S, D>
impl<S, D> Weighted<S, D> for ParamsBase<S, D>
Source§fn weights_mut(&mut self) -> &mut ArrayBase<S, D>
fn weights_mut(&mut self) -> &mut ArrayBase<S, D>
Source§fn assign_weights(&mut self, weights: &ArrayBase<S, D>) -> &mut Self
fn assign_weights(&mut self, weights: &ArrayBase<S, D>) -> &mut Self
Source§fn replace_weights(&mut self, weights: ArrayBase<S, D>) -> ArrayBase<S, D>
fn replace_weights(&mut self, weights: ArrayBase<S, D>) -> ArrayBase<S, D>
Source§fn set_weights(&mut self, weights: ArrayBase<S, D>) -> &mut Self
fn set_weights(&mut self, weights: ArrayBase<S, D>) -> &mut Self
impl<A, S, D> Copy for ParamsBase<S, D>
impl<A, S, D> Eq for ParamsBase<S, D>
impl<S, D> ShallowModelRepr<S, D> for ParamsBase<S, D>
Auto Trait Implementations§
impl<S, D> Freeze for ParamsBase<S, D>
impl<S, D> RefUnwindSafe for ParamsBase<S, D>where
S: RefUnwindSafe,
<D as Dimension>::Smaller: RefUnwindSafe,
D: RefUnwindSafe,
<S as RawData>::Elem: RefUnwindSafe,
impl<S, D> Send for ParamsBase<S, D>
impl<S, D> Sync for ParamsBase<S, D>
impl<S, D> Unpin for ParamsBase<S, D>
impl<S, D> UnwindSafe for ParamsBase<S, D>where
S: UnwindSafe,
<D as Dimension>::Smaller: UnwindSafe,
D: UnwindSafe,
<S as RawData>::Elem: RefUnwindSafe,
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
Source§impl<T> CallInPlace<T> for Twhere
T: CallInto<T>,
impl<T> CallInPlace<T> for Twhere
T: CallInto<T>,
Source§fn call_inplace<F>(&mut self, f: F) -> <T as CallInto<T>>::Output
fn call_inplace<F>(&mut self, f: F) -> <T as CallInto<T>>::Output
call_on_mut
method allows an object to be passed onto a function that takes a mutable reference
to the object. This is useful for cases where you want to perform an operation on
an object and mutate it in the process.Source§impl<T> CallInto<T> for T
impl<T> CallInto<T> for T
Source§impl<T> CallOn<T> for Twhere
T: CallInto<T>,
impl<T> CallOn<T> for Twhere
T: CallInto<T>,
Source§fn call_on<F>(&self, f: F) -> <T as CallInto<T>>::Output
fn call_on<F>(&self, f: F) -> <T as CallInto<T>>::Output
call_on
method allows an object to be passed onto a function that takes a reference
to the object. This is useful for cases where you want to perform an operation on
an object without needing to extract it from a container or context.