UnWeight

Struct UnWeight 

Source
pub struct UnWeight<T> { /* private fields */ }
Expand description

the Weightless struct is a marker type that represents the absence of a weight.

Implementations§

Source§

impl<T> UnWeight<T>

Source

pub const fn new() -> Self

Creates a new instance of UnWeighted.

Source

pub fn as_weight(self) -> Weightless<T>

converts a reference to the current instance into a Weightless type.

Source

pub fn into_weight(self) -> Weightless<T>

consumes the current instance to convert it into a Weightless type.

Source

pub fn is<U>(&self) -> bool
where U: 'static, T: 'static,

returns true if the types are the same.