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
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> 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