Struct object_tracker::Object

pub struct Object {
    pub id: u128,
    pub size: usize,
    backing_storage: Arc<RwLock<RawRwLock, FileHandle>>,
    pub backing_allocator: Arc<RwLock<RawRwLock, BumpAllocator>>,
}

Fields§

§id: u128§size: usize§backing_storage: Arc<RwLock<RawRwLock, FileHandle>>§backing_allocator: Arc<RwLock<RawRwLock, BumpAllocator>>

Implementations§

§

impl Object

pub fn new(id: u128, size: usize) -> Option<Object>

pub fn is_initialized(&self) -> bool

pub fn allocate<T>(&self) -> Result<&mut T, AllocationError>where T: Persistable,

pub fn maybe_set_inner_allocator<T>(&self, inner: &mut T)where T: Persistable + PersistentlyAllocatable,

pub fn set_inner_allocator<T>(&self, inner: &mut T)where T: Persistable + PersistentlyAllocatable,

pub fn read_into<T>(&self, ptr: Option<&IPtr>) -> Result<*mut T, AccessError>where T: Persistable,

pub fn read_into_mut<T>( &self, ptr: Option<&IPtr> ) -> Result<&mut T, AccessError>where T: Persistable,

pub fn offset_of_raw(&self, field: *const ()) -> u32

pub fn iptr_of(&self) -> IPtr

pub fn offset_of(&self, field: *const ()) -> IPtr

pub fn flush(&self)

pub fn flush_range(&self, offset: u64, size: u64)

pub fn as_bytes(&self) -> *const [u8]

pub fn content_as_bytes(&self) -> *const [u8]

pub fn get_backing_storage_path(&self) -> PathBuf

pub fn advise(&self)

pub fn reload(&self)

pub fn bump_version(&self) -> Result<u64, ObjectOperationError>

pub fn mark_read_access(&self)

pub fn get_id(&self) -> u128

pub fn get_version(&self) -> u64

pub fn object_is_cacheable(&self) -> bool

pub fn header_size() -> usize

pub fn set_mv_enabled(&self, enabled: bool)

pub fn object_is_mv_enabled(&self) -> bool

pub fn get_mapping_bounds(&self) -> (usize, usize)

pub fn copy_as(&self, copy_id: u128)

pub fn delete_storage(&self)

pub fn trim_to_true_allocation_size(&self)

pub fn get_constraint_set(&self) -> &PHashMap<u128, u64>

pub fn get_version_constraint(&self, foreign_object: u128) -> Option<u64>

pub fn upsert_version_constraint( &self, foreign_object: u128, observed_version: u64 )

pub fn is_under_storage_pressure(&self) -> bool

Auto Trait Implementations§

§

impl !RefUnwindSafe for Object

§

impl Send for Object

§

impl Sync for Object

§

impl Unpin for Object

§

impl !UnwindSafe for Object

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V