Struct object_lib::object::Object
source · pub struct Object {
pub id: ObjectId,
pub size: usize,
backing_storage: Arc<RwLock<FileHandle>>,
pub backing_allocator: Arc<RwLock<BumpAllocator>>,
}Fields§
§id: ObjectId§size: usize§backing_storage: Arc<RwLock<FileHandle>>§backing_allocator: Arc<RwLock<BumpAllocator>>Implementations§
source§impl Object
impl Object
pub fn new(id: ObjectId, size: usize) -> Option<Self>
pub fn is_initialized(&self) -> bool
pub fn allocate<T: Persistable>(&self) -> Result<&mut T, AllocationError>
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: Persistable>( &self, ptr: Option<&IPtr> ) -> Result<*mut T, AccessError>
pub fn read_into_mut<T: Persistable>( &self, ptr: Option<&IPtr> ) -> Result<&mut T, AccessError>
fn get_source_address(&self) -> *const u8
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)
fn get_header(&self) -> &mut ObjectHeader
pub fn bump_version(&self) -> Result<ObjectVersion, ObjectOperationError>
pub fn mark_read_access(&self)
pub fn get_id(&self) -> ObjectId
pub fn get_version(&self) -> ObjectVersion
pub fn object_is_cacheable(&self) -> bool
pub fn header_size() -> usize
pub fn set_mv_enabled(&self, enabled: bool)
fn is_mv_enabled(&self) -> bool
pub fn object_is_mv_enabled(&self) -> bool
pub fn get_mapping_bounds(&self) -> (usize, usize)
pub fn copy_as(&self, copy_id: ObjectId)
pub fn delete_storage(&self)
pub fn trim_to_true_allocation_size(&self)
pub fn get_constraint_set(&self) -> &PHashMap<ObjectId, ObjectVersion>
pub fn get_version_constraint( &self, foreign_object: ObjectId ) -> Option<ObjectVersion>
pub fn upsert_version_constraint( &self, foreign_object: ObjectId, observed_version: ObjectVersion )
pub fn is_under_storage_pressure(&self) -> bool
Trait Implementations§
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