pub struct MemoryBackend { /* private fields */ }Expand description
In-memory backend.
Implementations§
Trait Implementations§
Source§impl Backend for MemoryBackend
impl Backend for MemoryBackend
Source§fn walk<'life0, 'life1, 'async_trait>(
&'life0 self,
_fid: u32,
newfid: u32,
components: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<WalkResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn walk<'life0, 'life1, 'async_trait>(
&'life0 self,
_fid: u32,
newfid: u32,
components: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<WalkResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Walk
components from fid (the previously-walked parent, or the
attach root). Allocates internal state for newfid.Source§fn open<'life0, 'async_trait>(
&'life0 self,
fid: u32,
_flags: u32,
) -> Pin<Box<dyn Future<Output = Result<OpenResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn open<'life0, 'async_trait>(
&'life0 self,
fid: u32,
_flags: u32,
) -> Pin<Box<dyn Future<Output = Result<OpenResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Open
fid with Linux-style flags (Tlopen). Returns the leaf qid
and the negotiated iounit.Source§fn read<'life0, 'async_trait>(
&'life0 self,
fid: u32,
offset: u64,
count: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read<'life0, 'async_trait>(
&'life0 self,
fid: u32,
offset: u64,
count: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Read up to
count bytes from fid at offset.Source§fn write<'life0, 'life1, 'async_trait>(
&'life0 self,
fid: u32,
offset: u64,
data: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write<'life0, 'life1, 'async_trait>(
&'life0 self,
fid: u32,
offset: u64,
data: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Write
data to fid at offset. Returns the number of bytes written.Source§fn stat<'life0, 'async_trait>(
&'life0 self,
fid: u32,
) -> Pin<Box<dyn Future<Output = Result<StatResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stat<'life0, 'async_trait>(
&'life0 self,
fid: u32,
) -> Pin<Box<dyn Future<Output = Result<StatResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stat
fid.Source§fn readdir<'life0, 'async_trait>(
&'life0 self,
fid: u32,
offset: u64,
count: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn readdir<'life0, 'async_trait>(
&'life0 self,
fid: u32,
offset: u64,
count: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List directory entries under
fid (a directory). The returned bytes
are 9P readdir records; the translator passes them through verbatim.Source§fn clunk<'life0, 'async_trait>(
&'life0 self,
fid: u32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clunk<'life0, 'async_trait>(
&'life0 self,
fid: u32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Release
fid. Best-effort — errors are logged and ignored by the
translator (the fid is dropped from its table regardless).Source§fn attach<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_uname: &'life1 str,
_aname: &'life2 str,
verified: Option<VerifiedAttach>,
) -> Pin<Box<dyn Future<Output = Result<Option<VerifiedAttach>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn attach<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_uname: &'life1 str,
_aname: &'life2 str,
verified: Option<VerifiedAttach>,
) -> Pin<Box<dyn Future<Output = Result<Option<VerifiedAttach>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Establish the session at
Tattach, given the uname the client
presented and the aname export selector it requested. The default is a
no-op: backends whose caller identity is fixed at construction
(the UDS/vsock listeners) ignore both. Read moreSource§fn close_connection<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close_connection<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Release connection-local handles after EOF or a framing/write error.
Backends without retained remote handles may keep the default no-op.
Source§impl Default for MemoryBackend
impl Default for MemoryBackend
Source§fn default() -> MemoryBackend
fn default() -> MemoryBackend
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for MemoryBackend
impl !RefUnwindSafe for MemoryBackend
impl Send for MemoryBackend
impl Sync for MemoryBackend
impl Unpin for MemoryBackend
impl UnsafeUnpin for MemoryBackend
impl UnwindSafe for MemoryBackend
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ServiceExt for T
impl<T> ServiceExt for T
§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more