[−][src]Struct fwd_ad::Dual
The struct implementing dual numbers.
It is parametrized by a type [f64]
.
Creating Duals
From a already existing container
To create a Dual based on a container c
, use Dual::from(c)
.
See crate-level documentation for more information on how the container values are interpreted.
Create a constant (derivatives equal to zero) dual
A constant
method is provided for RW Dual
s backed by a Vec
or an array (up to size 32).
To prevent cluttering, the array implementations documentation has been hidden.
Implementations
impl<F> Dual<Vec<F>, RW, F> where
F: Scalar,
[src]
F: Scalar,
pub fn constant(value: F, ndiffs: usize) -> Self
[src]
Generates a dual number backed by a Vecvalue
and ndiffs
differentials, set to 0.
impl<T, M, F> Dual<T, M, F> where
M: OwningMode,
T: ROAble<F>,
T: CompatibleWith<M, F>,
F: Scalar,
[src]
M: OwningMode,
T: ROAble<F>,
T: CompatibleWith<M, F>,
F: Scalar,
Implementations for Duals that do not necessarily own their content.
pub fn to_owning(&self) -> Dual<T::Owning, RW, F> where
T: ToOwning<F>,
[src]
T: ToOwning<F>,
Clone the borrowed content, so that the resulting Dual owns its content.
pub fn as_slice(&self) -> &[F]
[src]
Returns the content as a slice.
let d = Dual::<_,RW,f32>::from([17.,0.,0.]); assert_eq!(d.as_slice()[0], d.val()); assert_eq!(&d.as_slice()[1..], d.diffs())
pub fn val(&self) -> F
[src]
Returns the value of the dual.
let d = Dual::<_,RW,f32>::from([17.,0.,0.]); assert_eq!(d.val(), 17.);
pub fn diffs(&self) -> &[F]
[src]
Returns a slice of the differentials.
let d = Dual::<_,RW,f32>::from([17.,1.,2.]); assert_eq!(d.diffs(), &[1.,2.]);
pub fn ndiffs(&self) -> usize
[src]
Return the number of differentials.
let d = Dual::<_,RW,f32>::from([17.,1.,2.]); assert_eq!(d.ndiffs(), 2);
pub fn is_close<S, M2>(&self, b: &Dual<S, M2, F>, atol: F) -> bool where
M2: OwningMode,
S: ROAble<F>,
S: CompatibleWith<M2, F>,
[src]
M2: OwningMode,
S: ROAble<F>,
S: CompatibleWith<M2, F>,
Allows comparing to duals by checking whether they are elementwise within atol
of each other.
let d1 = Dual::<_,RW,f64>::from([17.,1.,2.]); let d2 = Dual::<_,RW,f64>::from([17.+1e-10,1.-1e-10,2.]); assert_eq!(d1.is_close(&d2, 1e-9),true); assert_eq!(d1.is_close(&d2, 1e-11),false);
pub fn view<'a>(&'a self) -> Dual<&'a T::ViewType, RO, F> where
T: ToView<F>,
&'a T::ViewType: CompatibleWith<RO, F>,
[src]
T: ToView<F>,
&'a T::ViewType: CompatibleWith<RO, F>,
Returns a non-owning Dual backed by the ViewType of self.
let d1 = Dual::<[f64;3],RW,f64>::from([17.,1.,2.]); let d2 = Dual::<&[f64;3],RO,f64>::from(&[17.,1.,2.]); assert_eq!(d1.view(),d2);
pub fn into_container(self) -> T
[src]
Consumes the Dual
and return the container inside it.
let c = [1.,2.,3.]; assert_eq!(Dual::<_,RW,_>::from(c.clone()).into_container(), c);
impl<T, F> Dual<T, RW, F> where
T: RWAble<F>,
F: Scalar,
[src]
T: RWAble<F>,
F: Scalar,
Methods for Duals that own their content
pub fn as_slice_mut(&mut self) -> &mut [F]
[src]
Returns the content a mutable slice.
let mut d = Dual::<_,RW,f32>::from([17.,0.,0.]); assert_eq!(&mut d.clone().as_slice_mut()[0], d.val_mut()); assert_eq!(&d.clone().as_slice_mut()[1..], d.diffs_mut())
pub fn val_mut(&mut self) -> &mut F
[src]
Return a mutable reference to the value.
let mut d = Dual::<_,RW,f32>::from([17.,0.,0.]); *d.val_mut() = 42.; assert_eq!(d, Dual::<_,RW,f32>::from([42.,0.,0.]))
pub fn diffs_mut(&mut self) -> &mut [F]
[src]
Return a mutable slice of the differentials.
let mut d = Dual::<_,RW,f32>::from([17.,0.,0.]); d.diffs_mut()[0] = -1.; assert_eq!(d, Dual::<_,RW,f32>::from([17.,-1.,0.]))
pub fn exp(self) -> Self
[src]
Returns e^self.
pub fn exp2(self) -> Self
[src]
Returns 2^self.
pub fn exp_base(self, base: F) -> Self
[src]
Returns base^self.
pub fn ln(self) -> Self
[src]
Returns ln(self).
pub fn inv(self) -> Self
[src]
Returns 1/self.
pub fn powf(self, exp: F) -> Self
[src]
Returns self^exp.
pub fn powdual<S, M2>(self, exp: Dual<S, M2, F>) -> Self where
M2: OwningMode,
S: ROAble<F>,
S: CompatibleWith<M2, F>,
[src]
M2: OwningMode,
S: ROAble<F>,
S: CompatibleWith<M2, F>,
Returns self^exp.
pub fn abs(self) -> Self
[src]
Trait Implementations
impl<'_, L, R, M, F> Add<&'_ Dual<R, M, F>> for Dual<L, RW, F> where
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
[src]
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: &Dual<R, M, F>) -> Self
[src]
impl<L, R, M, F> Add<Dual<R, M, F>> for Dual<L, RW, F> where
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
[src]
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: Dual<R, M, F>) -> Self
[src]
impl<L, R, F> Add<Dual<R, RW, F>> for Dual<L, RO, F> where
L: ROAble<F>,
R: RWAble<F>,
F: Scalar,
[src]
L: ROAble<F>,
R: RWAble<F>,
F: Scalar,
type Output = Dual<R, RW, F>
The resulting type after applying the +
operator.
fn add(self, rhs: Dual<R, RW, F>) -> Dual<R, RW, F>
[src]
impl<'_, L, R, F> Add<Dual<R, RW, F>> for &'_ Dual<L, RO, F> where
L: ROAble<F>,
R: RWAble<F>,
F: Scalar,
[src]
L: ROAble<F>,
R: RWAble<F>,
F: Scalar,
type Output = Dual<R, RW, F>
The resulting type after applying the +
operator.
fn add(self, rhs: Dual<R, RW, F>) -> Dual<R, RW, F>
[src]
impl<R> Add<Dual<R, RW, f32>> for f32 where
R: RWAble<f32>,
[src]
R: RWAble<f32>,
type Output = Dual<R, RW, f32>
The resulting type after applying the +
operator.
fn add(self, rhs: Dual<R, RW, f32>) -> Dual<R, RW, f32>
[src]
impl<R> Add<Dual<R, RW, f64>> for f64 where
R: RWAble<f64>,
f64: Scalar,
[src]
R: RWAble<f64>,
f64: Scalar,
type Output = Dual<R, RW, f64>
The resulting type after applying the +
operator.
fn add(self, rhs: Dual<R, RW, f64>) -> Dual<R, RW, f64>
[src]
impl<L, F> Add<F> for Dual<L, RW, F> where
L: RWAble<F>,
F: Scalar,
[src]
L: RWAble<F>,
F: Scalar,
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: F) -> Self
[src]
impl<'_, L, R, M, F> AddAssign<&'_ Dual<R, M, F>> for Dual<L, RW, F> where
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
[src]
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
fn add_assign(&mut self, rhs: &Dual<R, M, F>)
[src]
impl<L, R, M, F> AddAssign<Dual<R, M, F>> for Dual<L, RW, F> where
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
[src]
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
fn add_assign(&mut self, rhs: Dual<R, M, F>)
[src]
impl<S, F> AddAssign<F> for Dual<S, RW, F> where
S: RWAble<F>,
F: Scalar,
[src]
S: RWAble<F>,
F: Scalar,
fn add_assign(&mut self, rhs: F)
[src]
impl<T: Clone, M: Clone, F: Clone> Clone for Dual<T, M, F> where
M: OwningMode,
T: CompatibleWith<M, F>,
F: Scalar,
[src]
M: OwningMode,
T: CompatibleWith<M, F>,
F: Scalar,
impl<T: Copy, M: Copy, F: Copy> Copy for Dual<T, M, F> where
M: OwningMode,
T: CompatibleWith<M, F>,
F: Scalar,
[src]
M: OwningMode,
T: CompatibleWith<M, F>,
F: Scalar,
impl<T: Debug, M: Debug, F: Debug> Debug for Dual<T, M, F> where
M: OwningMode,
T: CompatibleWith<M, F>,
F: Scalar,
[src]
M: OwningMode,
T: CompatibleWith<M, F>,
F: Scalar,
impl<T: Default, M: Default, F: Default> Default for Dual<T, M, F> where
M: OwningMode,
T: CompatibleWith<M, F>,
F: Scalar,
[src]
M: OwningMode,
T: CompatibleWith<M, F>,
F: Scalar,
impl<'_, L, R, M, F> Div<&'_ Dual<R, M, F>> for Dual<L, RW, F> where
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
[src]
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: &Dual<R, M, F>) -> Self
[src]
impl<L, R, M, F> Div<Dual<R, M, F>> for Dual<L, RW, F> where
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
[src]
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: Dual<R, M, F>) -> Self
[src]
impl<L, R, F> Div<Dual<R, RW, F>> for Dual<L, RO, F> where
L: ROAble<F>,
R: RWAble<F>,
F: Scalar,
[src]
L: ROAble<F>,
R: RWAble<F>,
F: Scalar,
type Output = Dual<R, RW, F>
The resulting type after applying the /
operator.
fn div(self, rhs: Dual<R, RW, F>) -> Dual<R, RW, F>
[src]
impl<'_, L, R, ML, F> Div<Dual<R, RW, F>> for &'_ Dual<L, ML, F> where
ML: OwningMode,
L: ROAble<F>,
L: CompatibleWith<ML, F>,
R: RWAble<F>,
F: Scalar,
[src]
ML: OwningMode,
L: ROAble<F>,
L: CompatibleWith<ML, F>,
R: RWAble<F>,
F: Scalar,
type Output = Dual<R, RW, F>
The resulting type after applying the /
operator.
fn div(self, rhs: Dual<R, RW, F>) -> Dual<R, RW, F>
[src]
impl<L, F> Div<F> for Dual<L, RW, F> where
L: RWAble<F>,
F: Scalar,
[src]
L: RWAble<F>,
F: Scalar,
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: F) -> Self
[src]
impl<'_, L, R, M, F> DivAssign<&'_ Dual<R, M, F>> for Dual<L, RW, F> where
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
[src]
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
fn div_assign(&mut self, rhs: &Dual<R, M, F>)
[src]
impl<L, R, M, F> DivAssign<Dual<R, M, F>> for Dual<L, RW, F> where
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
[src]
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
fn div_assign(&mut self, rhs: Dual<R, M, F>)
[src]
impl<S, F> DivAssign<F> for Dual<S, RW, F> where
S: RWAble<F>,
F: Scalar,
[src]
S: RWAble<F>,
F: Scalar,
fn div_assign(&mut self, rhs: F)
[src]
impl<T, M, F> From<T> for Dual<T, M, F> where
M: OwningMode,
T: CompatibleWith<M, F>,
F: Scalar,
[src]
M: OwningMode,
T: CompatibleWith<M, F>,
F: Scalar,
impl<T: Hash, M: Hash, F: Hash> Hash for Dual<T, M, F> where
M: OwningMode,
T: CompatibleWith<M, F>,
F: Scalar,
[src]
M: OwningMode,
T: CompatibleWith<M, F>,
F: Scalar,
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'_, L, R, M, F> Mul<&'_ Dual<R, M, F>> for Dual<L, RW, F> where
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
[src]
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: &Dual<R, M, F>) -> Self
[src]
impl<L, R, M, F> Mul<Dual<R, M, F>> for Dual<L, RW, F> where
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
[src]
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: Dual<R, M, F>) -> Self
[src]
impl<L, R, F> Mul<Dual<R, RW, F>> for Dual<L, RO, F> where
L: ROAble<F>,
R: RWAble<F>,
F: Scalar,
[src]
L: ROAble<F>,
R: RWAble<F>,
F: Scalar,
type Output = Dual<R, RW, F>
The resulting type after applying the *
operator.
fn mul(self, rhs: Dual<R, RW, F>) -> Dual<R, RW, F>
[src]
impl<'_, L, R, F> Mul<Dual<R, RW, F>> for &'_ Dual<L, RO, F> where
L: ROAble<F>,
R: RWAble<F>,
F: Scalar,
[src]
L: ROAble<F>,
R: RWAble<F>,
F: Scalar,
type Output = Dual<R, RW, F>
The resulting type after applying the *
operator.
fn mul(self, rhs: Dual<R, RW, F>) -> Dual<R, RW, F>
[src]
impl<R> Mul<Dual<R, RW, f32>> for f32 where
R: RWAble<f32>,
[src]
R: RWAble<f32>,
type Output = Dual<R, RW, f32>
The resulting type after applying the *
operator.
fn mul(self, rhs: Dual<R, RW, f32>) -> Dual<R, RW, f32>
[src]
impl<R> Mul<Dual<R, RW, f64>> for f64 where
R: RWAble<f64>,
f64: Scalar,
[src]
R: RWAble<f64>,
f64: Scalar,
type Output = Dual<R, RW, f64>
The resulting type after applying the *
operator.
fn mul(self, rhs: Dual<R, RW, f64>) -> Dual<R, RW, f64>
[src]
impl<L, F> Mul<F> for Dual<L, RW, F> where
L: RWAble<F>,
F: Scalar,
[src]
L: RWAble<F>,
F: Scalar,
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: F) -> Self
[src]
impl<'_, L, R, M, F> MulAssign<&'_ Dual<R, M, F>> for Dual<L, RW, F> where
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
[src]
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
fn mul_assign(&mut self, rhs: &Dual<R, M, F>)
[src]
impl<L, R, M, F> MulAssign<Dual<R, M, F>> for Dual<L, RW, F> where
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
[src]
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
fn mul_assign(&mut self, rhs: Dual<R, M, F>)
[src]
impl<S, F> MulAssign<F> for Dual<S, RW, F> where
S: RWAble<F>,
F: Scalar,
[src]
S: RWAble<F>,
F: Scalar,
fn mul_assign(&mut self, rhs: F)
[src]
impl<T, F> Neg for Dual<T, RW, F> where
T: RWAble<F>,
F: Scalar,
[src]
T: RWAble<F>,
F: Scalar,
impl<T: PartialEq, M: PartialEq, F: PartialEq> PartialEq<Dual<T, M, F>> for Dual<T, M, F> where
M: OwningMode,
T: CompatibleWith<M, F>,
F: Scalar,
[src]
M: OwningMode,
T: CompatibleWith<M, F>,
F: Scalar,
impl<T, M, F> StructuralPartialEq for Dual<T, M, F> where
M: OwningMode,
T: CompatibleWith<M, F>,
F: Scalar,
[src]
M: OwningMode,
T: CompatibleWith<M, F>,
F: Scalar,
impl<'_, L, R, M, F> Sub<&'_ Dual<R, M, F>> for Dual<L, RW, F> where
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
[src]
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: &Dual<R, M, F>) -> Self
[src]
impl<L, R, M, F> Sub<Dual<R, M, F>> for Dual<L, RW, F> where
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
[src]
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: Dual<R, M, F>) -> Self
[src]
impl<L, R, F> Sub<Dual<R, RW, F>> for Dual<L, RO, F> where
L: ROAble<F>,
R: RWAble<F>,
F: Scalar,
[src]
L: ROAble<F>,
R: RWAble<F>,
F: Scalar,
type Output = Dual<R, RW, F>
The resulting type after applying the -
operator.
fn sub(self, rhs: Dual<R, RW, F>) -> Dual<R, RW, F>
[src]
impl<'_, L, R, ML, F> Sub<Dual<R, RW, F>> for &'_ Dual<L, ML, F> where
L: ROAble<F>,
ML: OwningMode,
L: CompatibleWith<ML, F>,
R: RWAble<F>,
F: Scalar,
[src]
L: ROAble<F>,
ML: OwningMode,
L: CompatibleWith<ML, F>,
R: RWAble<F>,
F: Scalar,
type Output = Dual<R, RW, F>
The resulting type after applying the -
operator.
fn sub(self, rhs: Dual<R, RW, F>) -> Dual<R, RW, F>
[src]
impl<S> Sub<Dual<S, RW, f32>> for f32 where
S: RWAble<f32>,
[src]
S: RWAble<f32>,
type Output = Dual<S, RW, f32>
The resulting type after applying the -
operator.
fn sub(self, rhs: Dual<S, RW, f32>) -> Dual<S, RW, f32>
[src]
impl<S> Sub<Dual<S, RW, f64>> for f64 where
S: RWAble<f64>,
[src]
S: RWAble<f64>,
type Output = Dual<S, RW, f64>
The resulting type after applying the -
operator.
fn sub(self, rhs: Dual<S, RW, f64>) -> Dual<S, RW, f64>
[src]
impl<L, F> Sub<F> for Dual<L, RW, F> where
L: RWAble<F>,
F: Scalar,
[src]
L: RWAble<F>,
F: Scalar,
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: F) -> Self
[src]
impl<'_, L, R, M, F> SubAssign<&'_ Dual<R, M, F>> for Dual<L, RW, F> where
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
[src]
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
fn sub_assign(&mut self, rhs: &Dual<R, M, F>)
[src]
impl<L, R, M, F> SubAssign<Dual<R, M, F>> for Dual<L, RW, F> where
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
[src]
M: OwningMode,
L: RWAble<F>,
R: ROAble<F>,
R: CompatibleWith<M, F>,
F: Scalar,
fn sub_assign(&mut self, rhs: Dual<R, M, F>)
[src]
impl<S, F> SubAssign<F> for Dual<S, RW, F> where
S: RWAble<F>,
F: Scalar,
[src]
S: RWAble<F>,
F: Scalar,
fn sub_assign(&mut self, rhs: F)
[src]
Auto Trait Implementations
impl<T, M, F> RefUnwindSafe for Dual<T, M, F> where
F: RefUnwindSafe,
M: RefUnwindSafe,
T: RefUnwindSafe,
F: RefUnwindSafe,
M: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, M, F> Send for Dual<T, M, F> where
F: Send,
M: Send,
T: Send,
F: Send,
M: Send,
T: Send,
impl<T, M, F> Sync for Dual<T, M, F> where
F: Sync,
M: Sync,
T: Sync,
F: Sync,
M: Sync,
T: Sync,
impl<T, M, F> Unpin for Dual<T, M, F> where
F: Unpin,
M: Unpin,
T: Unpin,
F: Unpin,
M: Unpin,
T: Unpin,
impl<T, M, F> UnwindSafe for Dual<T, M, F> where
F: UnwindSafe,
M: UnwindSafe,
T: UnwindSafe,
F: UnwindSafe,
M: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<!> for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,