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>
Source§fn zcash_serialized_size(&self) -> usize
fn zcash_serialized_size(&self) -> usize
self by using a fake writer.Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes