pub struct Charge {
pub logical_bytes: usize,
pub resident_bytes: usize,
pub owners: usize,
}Expand description
Logical ranges, resident admission bytes, and disposable runtime owners.
Split owners may each charge their complete backing: resident_bytes is an
admission charge, not a unique-allocation count.
Fields§
§logical_bytes: usize§resident_bytes: usize§owners: usizeImplementations§
Source§impl Charge
impl Charge
Sourcepub const fn from_commit(logical: usize, resident: usize, owners: usize) -> Self
pub const fn from_commit(logical: usize, resident: usize, owners: usize) -> Self
Constructs an exact delta already committed by an ownership authority. Partial deltas are valid because the authority has already proved them.
pub const fn is_empty(self) -> bool
Sourcepub const fn from_owner(logical: usize, resident: usize) -> Self
pub const fn from_owner(logical: usize, resident: usize) -> Self
Projects one resident owner. Borrowed and static ranges have no resident backing and therefore produce no runtime ownership mutation.
Sourcepub const fn from_split(resident: usize) -> Self
pub const fn from_split(resident: usize) -> Self
Projects a zero-copy split of an already-accounted logical range.
Trait Implementations§
impl Copy for Charge
impl Eq for Charge
Source§impl<T: Segment> From<&Chain<T>> for Charge
Borrowed topology and Segment’s shared-range contract retain this subset
within the chain’s admitted length and cardinality.
impl<T: Segment> From<&Chain<T>> for Charge
Borrowed topology and Segment’s shared-range contract retain this subset within the chain’s admitted length and cardinality.
impl StructuralPartialEq for Charge
Auto Trait Implementations§
impl Forget for Charge
impl Freeze for Charge
impl RefUnwindSafe for Charge
impl Send for Charge
impl Sync for Charge
impl Unpin for Charge
impl UnsafeUnpin for Charge
impl UnwindSafe for Charge
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