pub struct AllocationDeclaration {
pub stable_key: StableKey,
pub slot: AllocationSlotDescriptor,
pub label: Option<String>,
pub schema: SchemaMetadata,
}Expand description
AllocationDeclaration
Data-only claim that a stable key owns an allocation slot.
Fields§
§stable_key: StableKeyDurable stable key.
slot: AllocationSlotDescriptorClaimed allocation slot.
label: Option<String>Optional diagnostic label.
schema: SchemaMetadataOptional diagnostic schema metadata.
Implementations§
Source§impl AllocationDeclaration
impl AllocationDeclaration
Sourcepub fn new(
stable_key: impl AsRef<str>,
slot: AllocationSlotDescriptor,
label: Option<String>,
schema: SchemaMetadata,
) -> Result<Self, DeclarationSnapshotError>
pub fn new( stable_key: impl AsRef<str>, slot: AllocationSlotDescriptor, label: Option<String>, schema: SchemaMetadata, ) -> Result<Self, DeclarationSnapshotError>
Build a declaration from raw parts.
Trait Implementations§
Source§impl Clone for AllocationDeclaration
impl Clone for AllocationDeclaration
Source§fn clone(&self) -> AllocationDeclaration
fn clone(&self) -> AllocationDeclaration
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 AllocationDeclaration
impl Debug for AllocationDeclaration
Source§impl<'de> Deserialize<'de> for AllocationDeclaration
impl<'de> Deserialize<'de> for AllocationDeclaration
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 PartialEq for AllocationDeclaration
impl PartialEq for AllocationDeclaration
Source§fn eq(&self, other: &AllocationDeclaration) -> bool
fn eq(&self, other: &AllocationDeclaration) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AllocationDeclaration
impl Serialize for AllocationDeclaration
impl Eq for AllocationDeclaration
impl StructuralPartialEq for AllocationDeclaration
Auto Trait Implementations§
impl Freeze for AllocationDeclaration
impl RefUnwindSafe for AllocationDeclaration
impl Send for AllocationDeclaration
impl Sync for AllocationDeclaration
impl Unpin for AllocationDeclaration
impl UnsafeUnpin for AllocationDeclaration
impl UnwindSafe for AllocationDeclaration
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