pub struct AllocationSlotDescriptor {
pub slot: AllocationSlot,
pub substrate: String,
pub descriptor_version: u32,
}Expand description
AllocationSlotDescriptor
Encoded allocation slot persisted in the ledger.
Fields§
§slot: AllocationSlotDurable allocation slot.
substrate: StringSubstrate identifier that interprets the slot.
descriptor_version: u32Descriptor encoding version.
Implementations§
Source§impl AllocationSlotDescriptor
impl AllocationSlotDescriptor
Sourcepub fn memory_manager(id: u8) -> Self
pub fn memory_manager(id: u8) -> Self
Construct a descriptor for a MemoryManager virtual memory ID.
Sourcepub fn memory_manager_checked(id: u8) -> Result<Self, MemoryManagerSlotError>
pub fn memory_manager_checked(id: u8) -> Result<Self, MemoryManagerSlotError>
Construct a descriptor for a usable MemoryManager virtual memory ID.
Sourcepub fn memory_manager_id(&self) -> Result<u8, MemoryManagerSlotError>
pub fn memory_manager_id(&self) -> Result<u8, MemoryManagerSlotError>
Return the usable MemoryManager virtual memory ID represented by this descriptor.
Trait Implementations§
Source§impl Clone for AllocationSlotDescriptor
impl Clone for AllocationSlotDescriptor
Source§fn clone(&self) -> AllocationSlotDescriptor
fn clone(&self) -> AllocationSlotDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AllocationSlotDescriptor
impl Debug for AllocationSlotDescriptor
Source§impl<'de> Deserialize<'de> for AllocationSlotDescriptor
impl<'de> Deserialize<'de> for AllocationSlotDescriptor
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for AllocationSlotDescriptor
impl Hash for AllocationSlotDescriptor
Source§impl Ord for AllocationSlotDescriptor
impl Ord for AllocationSlotDescriptor
Source§fn cmp(&self, other: &AllocationSlotDescriptor) -> Ordering
fn cmp(&self, other: &AllocationSlotDescriptor) -> Ordering
1.21.0 (const: unstable) · 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 PartialEq for AllocationSlotDescriptor
impl PartialEq for AllocationSlotDescriptor
Source§fn eq(&self, other: &AllocationSlotDescriptor) -> bool
fn eq(&self, other: &AllocationSlotDescriptor) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for AllocationSlotDescriptor
impl PartialOrd for AllocationSlotDescriptor
Source§impl Serialize for AllocationSlotDescriptor
impl Serialize for AllocationSlotDescriptor
impl Eq for AllocationSlotDescriptor
impl StructuralPartialEq for AllocationSlotDescriptor
Auto Trait Implementations§
impl Freeze for AllocationSlotDescriptor
impl RefUnwindSafe for AllocationSlotDescriptor
impl Send for AllocationSlotDescriptor
impl Sync for AllocationSlotDescriptor
impl Unpin for AllocationSlotDescriptor
impl UnsafeUnpin for AllocationSlotDescriptor
impl UnwindSafe for AllocationSlotDescriptor
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