pub trait ObjectHandle:
Send
+ Sync
+ 'static {
// Required methods
fn object_id(&self) -> u64;
fn block_size(&self) -> u64;
fn allocate_buffer(&self, size: usize) -> BufferFuture<'_>;
// Provided method
fn set_trace(&self, _v: bool) { ... }
}
Expand description
A handle for a generic object. For objects with a data payload, use the ReadObjectHandle or WriteObjectHandle traits.
Required Methods§
Sourcefn object_id(&self) -> u64
fn object_id(&self) -> u64
Returns the object identifier for this object which will be unique for the store that the object is contained in, but not necessarily unique within the entire system.
Sourcefn block_size(&self) -> u64
fn block_size(&self) -> u64
Returns the filesystem block size, which should be at least as big as the device block size, but not necessarily the same.
Sourcefn allocate_buffer(&self, size: usize) -> BufferFuture<'_>
fn allocate_buffer(&self, size: usize) -> BufferFuture<'_>
Allocates a buffer for doing I/O (read and write) for the object.