pub type AtLeastOne<T> = BoundedVec<T, 1, { usize::MAX }>;Expand description
A vector type that must contain at least one element.
This is a type alias for BoundedVec<T, 1, { usize::MAX }>, provided by the
bounded_vec crate. All functionality, including length constraints and safe
construction, is inherited from BoundedVec.
Aliased Type§
pub struct AtLeastOne<T> { /* private fields */ }Trait Implementations§
Source§impl OrchardActions for AtLeastOne<AuthorizedAction>
impl OrchardActions for AtLeastOne<AuthorizedAction>
Source§impl<T: ZcashDeserialize + TrustedPreallocate> ZcashDeserialize for AtLeastOne<T>
Deserialize an AtLeastOne vector, where the number of items is set by a
CompactSize prefix in the data. This is the most common format in Zcash.
impl<T: ZcashDeserialize + TrustedPreallocate> ZcashDeserialize for AtLeastOne<T>
Deserialize an AtLeastOne vector, where the number of items is set by a
CompactSize prefix in the data. This is the most common format in Zcash.
Source§fn zcash_deserialize<R: Read>(reader: R) -> Result<Self, SerializationError>
fn zcash_deserialize<R: Read>(reader: R) -> Result<Self, SerializationError>
Source§impl<T: ZcashSerialize> ZcashSerialize for AtLeastOne<T>
Serialize an AtLeastOne vector as a CompactSize number of items, then the
items. This is the most common format in Zcash.
impl<T: ZcashSerialize> ZcashSerialize for AtLeastOne<T>
Serialize an AtLeastOne vector as a CompactSize number of items, then the
items. This is the most common format in Zcash.
Source§fn zcash_serialize_to_vec(&self) -> Result<Vec<u8>, Error>
fn zcash_serialize_to_vec(&self) -> Result<Vec<u8>, Error>
Helper function to construct a vec to serialize the current struct into
Source§fn zcash_serialized_size(&self) -> usize
fn zcash_serialized_size(&self) -> usize
Get the size of
self by using a fake writer.