pub struct InMemoryStorageProxyBackend { /* private fields */ }Available on crate feature
testing only.Expand description
An in-memory backend authorizing a single securable and key prefix.
Implementations§
Source§impl InMemoryStorageProxyBackend
impl InMemoryStorageProxyBackend
Sourcepub fn table(full_name: impl Into<String>) -> Self
pub fn table(full_name: impl Into<String>) -> Self
A backend authorizing the whole of the given table: securable, read+write,
over a fresh empty store.
Sourcepub fn volume(full_name: impl Into<String>) -> Self
pub fn volume(full_name: impl Into<String>) -> Self
A backend authorizing the whole of the given vol: securable, read+write.
Sourcepub fn with_prefix(self, prefix: impl Into<String>) -> Self
pub fn with_prefix(self, prefix: impl Into<String>) -> Self
Restrict authorized keys to those under prefix (drives out-of-scope tests).
Trait Implementations§
Source§impl Clone for InMemoryStorageProxyBackend
impl Clone for InMemoryStorageProxyBackend
Source§fn clone(&self) -> InMemoryStorageProxyBackend
fn clone(&self) -> InMemoryStorageProxyBackend
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<Cx: Send + Sync + 'static> StorageProxyBackend<Cx> for InMemoryStorageProxyBackend
impl<Cx: Send + Sync + 'static> StorageProxyBackend<Cx> for InMemoryStorageProxyBackend
Source§fn capabilities(&self) -> ProxyCapabilities
fn capabilities(&self) -> ProxyCapabilities
Available on crate feature
server only.The proxy capabilities this backend advertises.
Available on crate feature
server only.Source§fn open<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_req: &'life1 ProxyReq,
_cx: &'life2 Cx,
) -> Pin<Box<dyn Future<Output = ProxyResult<Arc<DynObjectStore>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn open<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_req: &'life1 ProxyReq,
_cx: &'life2 Cx,
) -> Pin<Box<dyn Future<Output = ProxyResult<Arc<DynObjectStore>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Available on crate feature
server only.Open a store scoped to
req.securable at the access level implied by the
verb (Get/Head → read, Put → read-write). The returned store is
prefixed at the securable root, so req.key addresses relative to it. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for InMemoryStorageProxyBackend
impl !UnwindSafe for InMemoryStorageProxyBackend
impl Freeze for InMemoryStorageProxyBackend
impl Send for InMemoryStorageProxyBackend
impl Sync for InMemoryStorageProxyBackend
impl Unpin for InMemoryStorageProxyBackend
impl UnsafeUnpin for InMemoryStorageProxyBackend
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<B, Cx> StorageProxyHandler<Cx> for Bwhere
B: StorageProxyBackend<Cx>,
Cx: Send + 'static,
impl<B, Cx> StorageProxyHandler<Cx> for Bwhere
B: StorageProxyBackend<Cx>,
Cx: Send + 'static,
Source§fn get<'life0, 'async_trait>(
&'life0 self,
req: ProxyReq,
cx: Cx,
) -> Pin<Box<dyn Future<Output = Result<Response<Body>, ProxyError>> + Send + 'async_trait>>where
'life0: 'async_trait,
B: 'async_trait,
fn get<'life0, 'async_trait>(
&'life0 self,
req: ProxyReq,
cx: Cx,
) -> Pin<Box<dyn Future<Output = Result<Response<Body>, ProxyError>> + Send + 'async_trait>>where
'life0: 'async_trait,
B: 'async_trait,
Available on crate feature
server only.Serve a (optionally ranged) body read.
Source§fn head<'life0, 'async_trait>(
&'life0 self,
req: ProxyReq,
cx: Cx,
) -> Pin<Box<dyn Future<Output = Result<Response<Body>, ProxyError>> + Send + 'async_trait>>where
'life0: 'async_trait,
B: 'async_trait,
fn head<'life0, 'async_trait>(
&'life0 self,
req: ProxyReq,
cx: Cx,
) -> Pin<Box<dyn Future<Output = Result<Response<Body>, ProxyError>> + Send + 'async_trait>>where
'life0: 'async_trait,
B: 'async_trait,
Available on crate feature
server only.Serve a metadata-only read.
Source§fn put<'life0, 'async_trait>(
&'life0 self,
req: ProxyReq,
body: Body,
cx: Cx,
) -> Pin<Box<dyn Future<Output = Result<Response<Body>, ProxyError>> + Send + 'async_trait>>where
'life0: 'async_trait,
B: 'async_trait,
fn put<'life0, 'async_trait>(
&'life0 self,
req: ProxyReq,
body: Body,
cx: Cx,
) -> Pin<Box<dyn Future<Output = Result<Response<Body>, ProxyError>> + Send + 'async_trait>>where
'life0: 'async_trait,
B: 'async_trait,
Available on crate feature
server only.Serve a whole-object write, consuming the request
body.