pub struct Allocation(/* private fields */);Implementations§
Source§impl Allocation
impl Allocation
pub fn with( index: impl Into<TokenIndex>, fraction: impl Into<OwnedFraction>, ) -> Allocation
pub fn token_index(self) -> TokenIndex
pub fn fraction(self) -> OwnedFraction
Trait Implementations§
Source§impl Clone for Allocation
impl Clone for Allocation
Source§fn clone(&self) -> Allocation
fn clone(&self) -> Allocation
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 Debug for Allocation
impl Debug for Allocation
Source§impl<'de> Deserialize<'de> for Allocation
impl<'de> Deserialize<'de> for Allocation
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Allocation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Allocation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for Allocation
impl Display for Allocation
Source§impl From<Allocation> for AllocatedState
impl From<Allocation> for AllocatedState
Source§fn from(v: Allocation) -> AllocatedState
fn from(v: Allocation) -> AllocatedState
Converts to this type from the input type.
Source§impl From<Allocation> for RevealedData
impl From<Allocation> for RevealedData
Source§fn from(allocation: Allocation) -> RevealedData
fn from(allocation: Allocation) -> RevealedData
Converts to this type from the input type.
Source§impl From<RevealedData> for Allocation
impl From<RevealedData> for Allocation
Source§fn from(data: RevealedData) -> Allocation
fn from(data: RevealedData) -> Allocation
Converts to this type from the input type.
Source§impl FromStr for Allocation
impl FromStr for Allocation
Source§impl Hash for Allocation
impl Hash for Allocation
Source§impl PartialEq for Allocation
impl PartialEq for Allocation
Source§impl Serialize for Allocation
impl Serialize for Allocation
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl StrictDecode for Allocation
impl StrictDecode for Allocation
fn strict_decode(reader: &mut impl TypedRead) -> Result<Allocation, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl StrictDeserialize for Allocation
impl StrictDeserialize for Allocation
fn from_strict_serialized<const MAX: usize>( ast_data: Confined<Vec<u8>, 0, MAX>, ) -> Result<Self, DeserializeError>
fn strict_deserialize_from_file<const MAX: usize>( path: impl AsRef<Path>, ) -> Result<Self, DeserializeError>
Source§impl StrictDumb for Allocation
impl StrictDumb for Allocation
fn strict_dumb() -> Allocation
Source§impl StrictEncode for Allocation
impl StrictEncode for Allocation
fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where
W: TypedWrite,
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
Source§impl StrictSerialize for Allocation
impl StrictSerialize for Allocation
fn strict_serialized_len<const MAX: usize>(&self) -> Result<usize, Error>
fn to_strict_serialized<const MAX: usize>( &self, ) -> Result<Confined<Vec<u8>, 0, MAX>, SerializeError>
fn strict_serialize_to_file<const MAX: usize>( &self, path: impl AsRef<Path>, ) -> Result<(), SerializeError>
Source§impl StrictTuple for Allocation
impl StrictTuple for Allocation
const FIELD_COUNT: u8 = 2u8
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl StrictType for Allocation
impl StrictType for Allocation
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB_CONTRACT
fn strict_name() -> Option<TypeName>
impl Copy for Allocation
impl Eq for Allocation
impl StrictProduct for Allocation
impl StructuralPartialEq for Allocation
Auto Trait Implementations§
impl Freeze for Allocation
impl RefUnwindSafe for Allocation
impl Send for Allocation
impl Sync for Allocation
impl Unpin for Allocation
impl UnwindSafe for Allocation
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.