pub struct RegionMetadata { /* private fields */ }Expand description
Metadata tracking a region’s location, size, and identity.
Implementations§
Source§impl RegionMetadata
impl RegionMetadata
pub fn new(id: String, start: u64, len: u64, reserved: u64) -> Self
pub fn start(&self) -> u64
pub fn set_start(&mut self, start: u64)
pub fn len(&self) -> u64
pub fn set_len(&mut self, len: u64)
pub fn reserved(&self) -> u64
pub fn id(&self) -> &str
pub fn set_reserved(&mut self, reserved: u64)
pub fn is_dirty(&self) -> bool
pub fn is_clean(&self) -> bool
pub fn clear_dirty(&mut self)
pub fn left(&self) -> u64
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self>
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
Deserialize from bytes using little endian encoding
Trait Implementations§
Source§impl Clone for RegionMetadata
impl Clone for RegionMetadata
Source§fn clone(&self) -> RegionMetadata
fn clone(&self) -> RegionMetadata
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 moreAuto Trait Implementations§
impl Freeze for RegionMetadata
impl RefUnwindSafe for RegionMetadata
impl Send for RegionMetadata
impl Sync for RegionMetadata
impl Unpin for RegionMetadata
impl UnwindSafe for RegionMetadata
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more