Struct HashHistogram

Source
pub struct HashHistogram<A, V> { /* private fields */ }
Expand description

A sparse N-dimensional Histogram that stores its values in a HashMap.

Only bins that are filled will consume memory. This makes high-dimensional, many-binned (but mostly empty) histograms possible. If memory usage is not a concern, see VecHistogram.

See crate::sparsehistogram for examples of its use.

Implementations§

Source§

impl<A: Axis, V> HashHistogram<A, V>

Source

pub fn new(axes: A) -> Self

Factory method for HashHistogram. It is recommended to use the sparsehistogram macro instead.

Source§

impl<A, V> HashHistogram<A, V>

Source

pub fn par_values(&self) -> impl ParallelIterator<Item = &V>
where V: Sync,

An immutable rayon parallel iterator over the histogram values.

It only iterates over filled bins in the sparse histogram. This requires the “rayon” crate feature to be enabled.

Source

pub fn par_values_mut(&mut self) -> impl ParallelIterator<Item = &mut V>
where V: Send,

A mutable rayon parallel iterator over the histogram values.

It only iterates over filled bins in the sparse histogram. This requires the “rayon” crate feature to be enabled.

Source

pub fn par_iter( &self, ) -> impl ParallelIterator<Item = Item<<A as Axis>::BinInterval, &V>>
where A: Axis + Sync, V: Sync, <A as Axis>::BinInterval: Send,

An immutable rayon parallel iterator over bin indices, bin interval and bin values.

It only iterates over filled bins in the sparse histogram. This requires the “rayon” crate feature to be enabled.

Source

pub fn par_iter_mut( &mut self, ) -> impl ParallelIterator<Item = Item<<A as Axis>::BinInterval, &mut V>>
where A: Axis + Sync + Send, V: Send + Sync, <A as Axis>::BinInterval: Send,

An mutable rayon parallel iterator over bin indices, bin interval and bin values.

It only iterates over filled bins in the sparse histogram. This requires the “rayon” crate feature to be enabled.

Trait Implementations§

Source§

impl<A: Axis + PartialEq + Clone, V> Add<&HashHistogram<A, V>> for &HashHistogram<A, V>
where HashHistogram<A, V>: Histogram<A, V>, V: Clone + Default, for<'a> &'a V: Add<Output = V>,

Source§

fn add(self, rhs: &HashHistogram<A, V>) -> Self::Output

Combine the right-hand histogram with the left-hand histogram, returning a copy, and leaving the original histograms intact.

If the input histograms have incompatible axes, this operation will return a crate::error::BinaryOperationError.

§Examples
use ndhistogram::{Histogram, sparsehistogram, axis::Uniform};
let mut hist1 = sparsehistogram!(Uniform::<f64>::new(10, -5.0, 5.0)?);
let mut hist2 = sparsehistogram!(Uniform::<f64>::new(10, -5.0, 5.0)?);
hist1.fill_with(&0.0, 2.0);
hist2.fill(&0.0);
let combined_hist = (&hist1 + &hist2).expect("Axes are compatible");
assert_eq!(combined_hist.value(&0.0).unwrap(), &3.0);
Source§

type Output = Result<HashHistogram<A, V>, BinaryOperationError>

The resulting type after applying the + operator.
Source§

impl<A: Axis + PartialEq + Clone, V> Add<&HashHistogram<A, V>> for HashHistogram<A, V>
where HashHistogram<A, V>: Histogram<A, V>, for<'a> V: Clone + Default + AddAssign<&'a V>,

Source§

fn add(self, rhs: &HashHistogram<A, V>) -> Self::Output

Combine the right-hand histogram with the left-hand histogram, consuming the left-hand histogram and returning a new value. As this avoids making copies of the histograms, this is the recommended method to merge histograms.

If the input histograms have incompatible axes, this operation will return a crate::error::BinaryOperationError.

§Examples
use ndhistogram::{Histogram, sparsehistogram, axis::Uniform};
let mut hist1 = sparsehistogram!(Uniform::<f64>::new(10, -5.0, 5.0)?);
let mut hist2 = sparsehistogram!(Uniform::<f64>::new(10, -5.0, 5.0)?);
hist1.fill_with(&0.0, 2.0);
hist2.fill(&0.0);
let combined_hist = (hist1 + &hist2).expect("Axes are compatible");
assert_eq!(combined_hist.value(&0.0).unwrap(), &3.0);
Source§

type Output = Result<HashHistogram<A, V>, BinaryOperationError>

The resulting type after applying the + operator.
Source§

impl<A: Axis + PartialEq, V> AddAssign<&HashHistogram<A, V>> for HashHistogram<A, V>
where HashHistogram<A, V>: Histogram<A, V>, for<'a> V: Default + AddAssign<&'a V>,

Source§

fn add_assign(&mut self, rhs: &HashHistogram<A, V>)

Combine the right-hand histogram with the left-hand histogram, mutating the left-hand histogram.

§Panics

Panics if the histograms have incompatible axes. To handle this failure mode at runtime, use the non-assign version of this operation, which returns an Result.

§Examples
use ndhistogram::{Histogram, sparsehistogram, axis::Uniform};
let mut hist1 = sparsehistogram!(Uniform::<f64>::new(10, -5.0, 5.0)?);
let mut hist2 = sparsehistogram!(Uniform::<f64>::new(10, -5.0, 5.0)?);
hist1.fill_with(&0.0, 2.0);
hist2.fill(&0.0);
hist1 += &hist2;
assert_eq!(hist1.value(&0.0).unwrap(), &3.0);
Source§

impl<A: Clone, V: Clone> Clone for HashHistogram<A, V>

Source§

fn clone(&self) -> HashHistogram<A, V>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<A: Debug, V: Debug> Debug for HashHistogram<A, V>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<A: Default, V: Default> Default for HashHistogram<A, V>

Source§

fn default() -> HashHistogram<A, V>

Returns the “default value” for a type. Read more
Source§

impl<'de, A, V> Deserialize<'de> for HashHistogram<A, V>
where A: Deserialize<'de>, V: Deserialize<'de>,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<A: Axis, V> Display for HashHistogram<A, V>
where HashHistogram<A, V>: Histogram<A, V>, V: Clone + Into<f64>, A::BinInterval: Display,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<A: Axis + PartialEq + Clone, V> Div<&HashHistogram<A, V>> for &HashHistogram<A, V>
where HashHistogram<A, V>: Histogram<A, V>, V: Clone + Default, for<'a> &'a V: Div<Output = V>,

Source§

fn div(self, rhs: &HashHistogram<A, V>) -> Self::Output

Combine the right-hand histogram with the left-hand histogram, returning a copy, and leaving the original histograms intact.

If the input histograms have incompatible axes, this operation will return a crate::error::BinaryOperationError.

§Examples
use ndhistogram::{Histogram, sparsehistogram, axis::Uniform};
let mut hist1 = sparsehistogram!(Uniform::<f64>::new(10, -5.0, 5.0)?);
let mut hist2 = sparsehistogram!(Uniform::<f64>::new(10, -5.0, 5.0)?);
hist1.fill_with(&0.0, 2.0);
hist2.fill(&0.0);
let combined_hist = (&hist1 / &hist2).expect("Axes are compatible");
assert_eq!(combined_hist.value(&0.0).unwrap(), &2.0);
Source§

type Output = Result<HashHistogram<A, V>, BinaryOperationError>

The resulting type after applying the / operator.
Source§

impl<A: Axis + PartialEq + Clone, V> Div<&HashHistogram<A, V>> for HashHistogram<A, V>
where HashHistogram<A, V>: Histogram<A, V>, for<'a> V: Clone + Default + DivAssign<&'a V>,

Source§

fn div(self, rhs: &HashHistogram<A, V>) -> Self::Output

Combine the right-hand histogram with the left-hand histogram, consuming the left-hand histogram and returning a new value. As this avoids making copies of the histograms, this is the recommended method to merge histograms.

If the input histograms have incompatible axes, this operation will return a crate::error::BinaryOperationError.

§Examples
use ndhistogram::{Histogram, sparsehistogram, axis::Uniform};
let mut hist1 = sparsehistogram!(Uniform::<f64>::new(10, -5.0, 5.0)?);
let mut hist2 = sparsehistogram!(Uniform::<f64>::new(10, -5.0, 5.0)?);
hist1.fill_with(&0.0, 2.0);
hist2.fill(&0.0);
let combined_hist = (hist1 / &hist2).expect("Axes are compatible");
assert_eq!(combined_hist.value(&0.0).unwrap(), &2.0);
Source§

type Output = Result<HashHistogram<A, V>, BinaryOperationError>

The resulting type after applying the / operator.
Source§

impl<A: Axis + PartialEq, V> DivAssign<&HashHistogram<A, V>> for HashHistogram<A, V>
where HashHistogram<A, V>: Histogram<A, V>, for<'a> V: Default + DivAssign<&'a V>,

Source§

fn div_assign(&mut self, rhs: &HashHistogram<A, V>)

Combine the right-hand histogram with the left-hand histogram, mutating the left-hand histogram.

§Panics

Panics if the histograms have incompatible axes. To handle this failure mode at runtime, use the non-assign version of this operation, which returns an Result.

§Examples
use ndhistogram::{Histogram, sparsehistogram, axis::Uniform};
let mut hist1 = sparsehistogram!(Uniform::<f64>::new(10, -5.0, 5.0)?);
let mut hist2 = sparsehistogram!(Uniform::<f64>::new(10, -5.0, 5.0)?);
hist1.fill_with(&0.0, 2.0);
hist2.fill(&0.0);
hist1 /= &hist2;
assert_eq!(hist1.value(&0.0).unwrap(), &2.0);
Source§

impl<A: Axis, V: Default> Histogram<A, V> for HashHistogram<A, V>

Source§

fn axes(&self) -> &A

The histogram Axes that map coordinates to bin numbers.
Source§

fn value_at_index(&self, index: usize) -> Option<&V>

Read a bin value given an index. Return an Option as the given index may not be valid for this histogram.
Source§

fn values(&self) -> Box<dyn Iterator<Item = &'_ V> + '_>

Iterator over bin values.
Source§

fn iter( &self, ) -> Box<dyn Iterator<Item = Item<<A as Axis>::BinInterval, &'_ V>> + '_>

Iterator over bin indices, bin interval and bin values.
Source§

fn value_at_index_mut(&mut self, index: usize) -> Option<&mut V>

Mutable access to a bin value at a given index.
Source§

fn values_mut(&mut self) -> Box<dyn Iterator<Item = &'_ mut V> + '_>

Mutable iterator over bin values.
Source§

fn iter_mut( &mut self, ) -> Box<dyn Iterator<Item = Item<<A as Axis>::BinInterval, &'_ mut V>> + '_>

Mutable iterator over bin indices, bin interval and bin values.
Source§

fn fill(&mut self, coordinate: &A::Coordinate)
where V: Fill,

Fill the histogram bin value at coordinate with unit weight. If the Axes do not cover that coordinate, do nothing. See Fill.
Source§

fn fill_with<D>(&mut self, coordinate: &A::Coordinate, data: D)
where V: FillWith<D>,

Fill the histogram bin value at coordinate with some data. If the Axes do not cover that coordinate, do nothing. See FillWith.
Source§

fn fill_with_weighted<D, W>( &mut self, coordinate: &A::Coordinate, data: D, weight: W, )
where V: FillWithWeighted<D, W>,

Fill the histogram bin value at coordinate with some data. If the Axes do not cover that coordinate, do nothing. See FillWithWeighted.
Source§

fn value(&self, coordinate: &A::Coordinate) -> Option<&V>

Read a bin value given a coordinate. Returns an Option as the given coordinate may not be mapped to a bin.
Source§

fn value_mut(&mut self, coordinate: &A::Coordinate) -> Option<&mut V>

Mutable access to a bin value at a given coordinate.
Source§

impl<'a, A: Axis, V> IntoIterator for &'a HashHistogram<A, V>
where HashHistogram<A, V>: Histogram<A, V>,

Source§

type Item = Item<<A as Axis>::BinInterval, &'a V>

The type of the elements being iterated over.
Source§

type IntoIter = Box<dyn Iterator<Item = Item<<A as Axis>::BinInterval, &'a V>> + 'a>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'a, A: Axis, V: 'a> IntoIterator for &'a mut HashHistogram<A, V>
where HashHistogram<A, V>: Histogram<A, V>,

Source§

type Item = Item<<A as Axis>::BinInterval, &'a mut V>

The type of the elements being iterated over.
Source§

type IntoIter = Box<dyn Iterator<Item = Item<<A as Axis>::BinInterval, &'a mut V>> + 'a>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<A: Axis + PartialEq + Clone, V> Mul<&HashHistogram<A, V>> for &HashHistogram<A, V>
where HashHistogram<A, V>: Histogram<A, V>, V: Clone + Default, for<'a> &'a V: Mul<Output = V>,

Source§

fn mul(self, rhs: &HashHistogram<A, V>) -> Self::Output

Combine the right-hand histogram with the left-hand histogram, returning a copy, and leaving the original histograms intact.

If the input histograms have incompatible axes, this operation will return a crate::error::BinaryOperationError.

§Examples
use ndhistogram::{Histogram, sparsehistogram, axis::Uniform};
let mut hist1 = sparsehistogram!(Uniform::<f64>::new(10, -5.0, 5.0)?);
let mut hist2 = sparsehistogram!(Uniform::<f64>::new(10, -5.0, 5.0)?);
hist1.fill_with(&0.0, 2.0);
hist2.fill(&0.0);
let combined_hist = (&hist1 * &hist2).expect("Axes are compatible");
assert_eq!(combined_hist.value(&0.0).unwrap(), &2.0);
Source§

type Output = Result<HashHistogram<A, V>, BinaryOperationError>

The resulting type after applying the * operator.
Source§

impl<A: Axis + PartialEq + Clone, V> Mul<&HashHistogram<A, V>> for HashHistogram<A, V>
where HashHistogram<A, V>: Histogram<A, V>, for<'a> V: Clone + Default + MulAssign<&'a V>,

Source§

fn mul(self, rhs: &HashHistogram<A, V>) -> Self::Output

Combine the right-hand histogram with the left-hand histogram, consuming the left-hand histogram and returning a new value. As this avoids making copies of the histograms, this is the recommended method to merge histograms.

If the input histograms have incompatible axes, this operation will return a crate::error::BinaryOperationError.

§Examples
use ndhistogram::{Histogram, sparsehistogram, axis::Uniform};
let mut hist1 = sparsehistogram!(Uniform::<f64>::new(10, -5.0, 5.0)?);
let mut hist2 = sparsehistogram!(Uniform::<f64>::new(10, -5.0, 5.0)?);
hist1.fill_with(&0.0, 2.0);
hist2.fill(&0.0);
let combined_hist = (hist1 * &hist2).expect("Axes are compatible");
assert_eq!(combined_hist.value(&0.0).unwrap(), &2.0);
Source§

type Output = Result<HashHistogram<A, V>, BinaryOperationError>

The resulting type after applying the * operator.
Source§

impl<A: Axis + PartialEq, V> MulAssign<&HashHistogram<A, V>> for HashHistogram<A, V>
where HashHistogram<A, V>: Histogram<A, V>, for<'a> V: Default + MulAssign<&'a V>,

Source§

fn mul_assign(&mut self, rhs: &HashHistogram<A, V>)

Combine the right-hand histogram with the left-hand histogram, mutating the left-hand histogram.

§Panics

Panics if the histograms have incompatible axes. To handle this failure mode at runtime, use the non-assign version of this operation, which returns an Result.

§Examples
use ndhistogram::{Histogram, sparsehistogram, axis::Uniform};
let mut hist1 = sparsehistogram!(Uniform::<f64>::new(10, -5.0, 5.0)?);
let mut hist2 = sparsehistogram!(Uniform::<f64>::new(10, -5.0, 5.0)?);
hist1.fill_with(&0.0, 2.0);
hist2.fill(&0.0);
hist1 *= &hist2;
assert_eq!(hist1.value(&0.0).unwrap(), &2.0);
Source§

impl<A: PartialEq, V: PartialEq> PartialEq for HashHistogram<A, V>

Source§

fn eq(&self, other: &HashHistogram<A, V>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<A, V> Serialize for HashHistogram<A, V>
where A: Serialize, V: Serialize,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<A: Axis + PartialEq + Clone, V> Sub<&HashHistogram<A, V>> for &HashHistogram<A, V>
where HashHistogram<A, V>: Histogram<A, V>, V: Clone + Default, for<'a> &'a V: Sub<Output = V>,

Source§

fn sub(self, rhs: &HashHistogram<A, V>) -> Self::Output

Combine the right-hand histogram with the left-hand histogram, returning a copy, and leaving the original histograms intact.

If the input histograms have incompatible axes, this operation will return a crate::error::BinaryOperationError.

§Examples
use ndhistogram::{Histogram, sparsehistogram, axis::Uniform};
let mut hist1 = sparsehistogram!(Uniform::<f64>::new(10, -5.0, 5.0)?);
let mut hist2 = sparsehistogram!(Uniform::<f64>::new(10, -5.0, 5.0)?);
hist1.fill_with(&0.0, 2.0);
hist2.fill(&0.0);
let combined_hist = (&hist1 - &hist2).expect("Axes are compatible");
assert_eq!(combined_hist.value(&0.0).unwrap(), &1.0);
Source§

type Output = Result<HashHistogram<A, V>, BinaryOperationError>

The resulting type after applying the - operator.
Source§

impl<A: Axis + PartialEq + Clone, V> Sub<&HashHistogram<A, V>> for HashHistogram<A, V>
where HashHistogram<A, V>: Histogram<A, V>, for<'a> V: Clone + Default + SubAssign<&'a V>,

Source§

fn sub(self, rhs: &HashHistogram<A, V>) -> Self::Output

Combine the right-hand histogram with the left-hand histogram, consuming the left-hand histogram and returning a new value. As this avoids making copies of the histograms, this is the recommended method to merge histograms.

If the input histograms have incompatible axes, this operation will return a crate::error::BinaryOperationError.

§Examples
use ndhistogram::{Histogram, sparsehistogram, axis::Uniform};
let mut hist1 = sparsehistogram!(Uniform::<f64>::new(10, -5.0, 5.0)?);
let mut hist2 = sparsehistogram!(Uniform::<f64>::new(10, -5.0, 5.0)?);
hist1.fill_with(&0.0, 2.0);
hist2.fill(&0.0);
let combined_hist = (hist1 - &hist2).expect("Axes are compatible");
assert_eq!(combined_hist.value(&0.0).unwrap(), &1.0);
Source§

type Output = Result<HashHistogram<A, V>, BinaryOperationError>

The resulting type after applying the - operator.
Source§

impl<A: Axis + PartialEq, V> SubAssign<&HashHistogram<A, V>> for HashHistogram<A, V>
where HashHistogram<A, V>: Histogram<A, V>, for<'a> V: Default + SubAssign<&'a V>,

Source§

fn sub_assign(&mut self, rhs: &HashHistogram<A, V>)

Combine the right-hand histogram with the left-hand histogram, mutating the left-hand histogram.

§Panics

Panics if the histograms have incompatible axes. To handle this failure mode at runtime, use the non-assign version of this operation, which returns an Result.

§Examples
use ndhistogram::{Histogram, sparsehistogram, axis::Uniform};
let mut hist1 = sparsehistogram!(Uniform::<f64>::new(10, -5.0, 5.0)?);
let mut hist2 = sparsehistogram!(Uniform::<f64>::new(10, -5.0, 5.0)?);
hist1.fill_with(&0.0, 2.0);
hist2.fill(&0.0);
hist1 -= &hist2;
assert_eq!(hist1.value(&0.0).unwrap(), &1.0);
Source§

impl<A: Eq, V: Eq> Eq for HashHistogram<A, V>

Source§

impl<A, V> StructuralPartialEq for HashHistogram<A, V>

Auto Trait Implementations§

§

impl<A, V> Freeze for HashHistogram<A, V>
where A: Freeze,

§

impl<A, V> RefUnwindSafe for HashHistogram<A, V>

§

impl<A, V> Send for HashHistogram<A, V>
where A: Send, V: Send,

§

impl<A, V> Sync for HashHistogram<A, V>
where A: Sync, V: Sync,

§

impl<A, V> Unpin for HashHistogram<A, V>
where A: Unpin, V: Unpin,

§

impl<A, V> UnwindSafe for HashHistogram<A, V>
where A: UnwindSafe, V: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit #126799)
Performs copy-assignment from self to dest. Read more
Source§

impl<D> FillWith<&D> for D
where D: for<'a> AddAssign<&'a D>,

Source§

fn fill_with(&mut self, data: &D)

Fill this value with some data. For a simple number type means adding the weight.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,