pub struct NonZeroThresholdU8<Kind> { /* private fields */ }
Expand description
A type representing a u8
threshold, typically used for signatures.
Serialization for this type ensures that the threshold is never 0.
This type has a phantom type marker so that thresholds of different types
can be distinguished. The intended use is that a new empty type is defined
to serve as marker, and then a type alias. See AccountThreshold
for an
example.
Implementations§
Source§impl<Kind> NonZeroThresholdU8<Kind>
impl<Kind> NonZeroThresholdU8<Kind>
Sourcepub const ONE: NonZeroThresholdU8<Kind>
pub const ONE: NonZeroThresholdU8<Kind>
Threshold of 1.
Sourcepub const TWO: NonZeroThresholdU8<Kind>
pub const TWO: NonZeroThresholdU8<Kind>
Threshold of 2.
Trait Implementations§
Source§impl<Kind> Clone for NonZeroThresholdU8<Kind>
impl<Kind> Clone for NonZeroThresholdU8<Kind>
Source§fn clone(&self) -> NonZeroThresholdU8<Kind>
fn clone(&self) -> NonZeroThresholdU8<Kind>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<Kind> Debug for NonZeroThresholdU8<Kind>where
Kind: Debug,
impl<Kind> Debug for NonZeroThresholdU8<Kind>where
Kind: Debug,
Source§impl<Kind> Deserial for NonZeroThresholdU8<Kind>
impl<Kind> Deserial for NonZeroThresholdU8<Kind>
Source§fn deserial<R>(source: &mut R) -> Result<NonZeroThresholdU8<Kind>, ParseError>where
R: Read,
fn deserial<R>(source: &mut R) -> Result<NonZeroThresholdU8<Kind>, ParseError>where
R: Read,
Attempt to read a structure from a given source, failing if an error
occurs during deserialization or reading.
Source§impl<Kind> From<NonZeroThresholdU8<Kind>> for u8
impl<Kind> From<NonZeroThresholdU8<Kind>> for u8
Source§fn from(value: NonZeroThresholdU8<Kind>) -> u8
fn from(value: NonZeroThresholdU8<Kind>) -> u8
Converts to this type from the input type.
Source§impl<Kind> Hash for NonZeroThresholdU8<Kind>
impl<Kind> Hash for NonZeroThresholdU8<Kind>
Source§impl<Kind> Ord for NonZeroThresholdU8<Kind>
impl<Kind> Ord for NonZeroThresholdU8<Kind>
Source§fn cmp(&self, other: &NonZeroThresholdU8<Kind>) -> Ordering
fn cmp(&self, other: &NonZeroThresholdU8<Kind>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<Kind> PartialEq<u8> for NonZeroThresholdU8<Kind>
impl<Kind> PartialEq<u8> for NonZeroThresholdU8<Kind>
Source§impl<Kind> PartialEq for NonZeroThresholdU8<Kind>
impl<Kind> PartialEq for NonZeroThresholdU8<Kind>
Source§impl<Kind> PartialOrd<u8> for NonZeroThresholdU8<Kind>
impl<Kind> PartialOrd<u8> for NonZeroThresholdU8<Kind>
Source§impl<Kind> PartialOrd for NonZeroThresholdU8<Kind>
impl<Kind> PartialOrd for NonZeroThresholdU8<Kind>
Source§impl<Kind> SchemaType for NonZeroThresholdU8<Kind>
impl<Kind> SchemaType for NonZeroThresholdU8<Kind>
Source§impl<Kind> Serial for NonZeroThresholdU8<Kind>
impl<Kind> Serial for NonZeroThresholdU8<Kind>
Source§impl<Kind> TryFrom<u8> for NonZeroThresholdU8<Kind>
impl<Kind> TryFrom<u8> for NonZeroThresholdU8<Kind>
Source§type Error = ZeroSignatureThreshold
type Error = ZeroSignatureThreshold
The type returned in the event of a conversion error.
Source§fn try_from(
value: u8,
) -> Result<NonZeroThresholdU8<Kind>, <NonZeroThresholdU8<Kind> as TryFrom<u8>>::Error>
fn try_from( value: u8, ) -> Result<NonZeroThresholdU8<Kind>, <NonZeroThresholdU8<Kind> as TryFrom<u8>>::Error>
Performs the conversion.
impl<Kind> Copy for NonZeroThresholdU8<Kind>
impl<Kind> Eq for NonZeroThresholdU8<Kind>
Auto Trait Implementations§
impl<Kind> Freeze for NonZeroThresholdU8<Kind>
impl<Kind> RefUnwindSafe for NonZeroThresholdU8<Kind>where
Kind: RefUnwindSafe,
impl<Kind> Send for NonZeroThresholdU8<Kind>where
Kind: Send,
impl<Kind> Sync for NonZeroThresholdU8<Kind>where
Kind: Sync,
impl<Kind> Unpin for NonZeroThresholdU8<Kind>where
Kind: Unpin,
impl<Kind> UnwindSafe for NonZeroThresholdU8<Kind>where
Kind: 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<D, S> DeserialWithState<S> for Dwhere
D: Deserial,
S: HasStateApi,
impl<D, S> DeserialWithState<S> for Dwhere
D: Deserial,
S: HasStateApi,
Source§fn deserial_with_state<R>(_state: &S, source: &mut R) -> Result<D, ParseError>where
R: Read,
fn deserial_with_state<R>(_state: &S, source: &mut R) -> Result<D, ParseError>where
R: Read,
Attempt to read a structure from a given source and state, failing if
an error occurs during deserialization or reading.