pub struct Location {
pub sequence_number: u32,
pub flags: u16,
}Expand description
A location in the Plasma world — identifies a page within an age.
Stored as a sequence number (u32) + flags (u16). Equality ignores the kItinerant flag per C++ behavior.
Fields§
§sequence_number: u32§flags: u16Implementations§
Source§impl Location
impl Location
pub const GLOBAL_FIXED: Location
pub const LOCAL_START: Location
pub const LOCAL_END: Location
pub const NORMAL_START: Location
pub const GLOBAL_SERVER: Location
pub const INVALID: Location
Sourcepub fn new(sequence_number: u32, flags: u16) -> Self
pub fn new(sequence_number: u32, flags: u16) -> Self
Create a location with the given sequence number and flags.
Sourcepub fn make_reserved(number: u32) -> Self
pub fn make_reserved(number: u32) -> Self
Create a reserved location.
Sourcepub fn make_normal(number: u32) -> Self
pub fn make_normal(number: u32) -> Self
Create a normal location from a page sequence offset.
pub fn is_valid(&self) -> bool
pub fn is_reserved(&self) -> bool
pub fn is_itinerant(&self) -> bool
pub fn is_virtual(&self) -> bool
pub fn is_local(&self) -> bool
pub fn read(reader: &mut impl Read) -> Result<Self>
pub fn write(&self, writer: &mut impl Write) -> Result<()>
Trait Implementations§
Source§impl Ord for Location
impl Ord for Location
Source§impl PartialOrd for Location
impl PartialOrd for Location
impl Copy for Location
impl Eq for Location
Auto Trait Implementations§
impl Freeze for Location
impl RefUnwindSafe for Location
impl Send for Location
impl Sync for Location
impl Unpin for Location
impl UnsafeUnpin for Location
impl UnwindSafe for Location
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