Trait package_directory::NonMetaStorage
source · pub trait NonMetaStorage: Send + Sync + 'static {
// Required methods
fn open(
&self,
blob: &Hash,
flags: OpenFlags,
scope: ExecutionScope,
server_end: ServerEnd<NodeMarker>
) -> Result<(), OpenError>;
fn open2(
&self,
_blob: &Hash,
_protocols: ConnectionProtocols,
_scope: ExecutionScope,
_object_request: ObjectRequestRef<'_>
) -> Result<(), Status>;
}
Expand description
The storage that provides the non-meta files (accessed by hash) of a package-directory (e.g. blobfs).
Required Methods§
sourcefn open(
&self,
blob: &Hash,
flags: OpenFlags,
scope: ExecutionScope,
server_end: ServerEnd<NodeMarker>
) -> Result<(), OpenError>
fn open( &self, blob: &Hash, flags: OpenFlags, scope: ExecutionScope, server_end: ServerEnd<NodeMarker> ) -> Result<(), OpenError>
Open a non-meta file by hash. scope
may complete while there are still open connections.
fn open2( &self, _blob: &Hash, _protocols: ConnectionProtocols, _scope: ExecutionScope, _object_request: ObjectRequestRef<'_> ) -> Result<(), Status>
Implementations on Foreign Types§
source§impl NonMetaStorage for Client
impl NonMetaStorage for Client
fn open( &self, blob: &Hash, flags: OpenFlags, scope: ExecutionScope, server_end: ServerEnd<NodeMarker> ) -> Result<(), OpenError>
fn open2( &self, blob: &Hash, protocols: ConnectionProtocols, scope: ExecutionScope, object_request: ObjectRequestRef<'_> ) -> Result<(), Status>
source§impl NonMetaStorage for DirectoryProxy
impl NonMetaStorage for DirectoryProxy
Assumes the directory is a flat container and the files are named after their hashes.