Trait ObjectHandle

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

Source

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.

Source

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.

Source

fn allocate_buffer(&self, size: usize) -> BufferFuture<'_>

Allocates a buffer for doing I/O (read and write) for the object.

Provided Methods§

Source

fn set_trace(&self, _v: bool)

Sets tracing for this object.

Implementors§