pub struct StaticMemoryDeclaration { /* private fields */ }Expand description
StaticMemoryDeclaration
One allocation declaration registered by crate-level generated or macro code before bootstrap seals the declaration snapshot.
The declaring_crate field is policy metadata for integration layers such
as Canic or IcyDB. The default runtime uses it to match declarations against
registered range claims before it calls the caller’s
crate::AllocationPolicy.
Implementations§
Source§impl StaticMemoryDeclaration
impl StaticMemoryDeclaration
Sourcepub fn new(
declaring_crate: impl Into<String>,
declaration: AllocationDeclaration,
) -> Self
pub fn new( declaring_crate: impl Into<String>, declaration: AllocationDeclaration, ) -> Self
Build one static declaration from raw parts.
Sourcepub fn declaring_crate(&self) -> &str
pub fn declaring_crate(&self) -> &str
Return the crate that registered this declaration.
Sourcepub const fn declaration(&self) -> &AllocationDeclaration
pub const fn declaration(&self) -> &AllocationDeclaration
Borrow the allocation declaration.
Sourcepub fn into_declaration(self) -> AllocationDeclaration
pub fn into_declaration(self) -> AllocationDeclaration
Consume this registration and return the allocation declaration.
Trait Implementations§
Source§impl Clone for StaticMemoryDeclaration
impl Clone for StaticMemoryDeclaration
Source§fn clone(&self) -> StaticMemoryDeclaration
fn clone(&self) -> StaticMemoryDeclaration
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 StaticMemoryDeclaration
impl Debug for StaticMemoryDeclaration
Source§impl PartialEq for StaticMemoryDeclaration
impl PartialEq for StaticMemoryDeclaration
Source§fn eq(&self, other: &StaticMemoryDeclaration) -> bool
fn eq(&self, other: &StaticMemoryDeclaration) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for StaticMemoryDeclaration
impl StructuralPartialEq for StaticMemoryDeclaration
Auto Trait Implementations§
impl Freeze for StaticMemoryDeclaration
impl RefUnwindSafe for StaticMemoryDeclaration
impl Send for StaticMemoryDeclaration
impl Sync for StaticMemoryDeclaration
impl Unpin for StaticMemoryDeclaration
impl UnsafeUnpin for StaticMemoryDeclaration
impl UnwindSafe for StaticMemoryDeclaration
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