pub enum Adapter {
File,
S3,
B2,
Gcs,
External {
name: String,
},
}Expand description
Which snapdir storage adapter a store URL resolves to.
The four named variants are the adapters shipped in-process by the Rust
port (no subprocess). Adapter::External is any third-party adapter,
dispatched out-of-process to a snapdir-<name>-store binary via the
emit-command shim.
Variants§
File
Built-in file:// backend (local directory).
S3
Built-in s3:// backend (native AWS SDK).
B2
Built-in b2:// backend (native AWS SDK against Backblaze).
Gcs
Built-in gs:// backend (native Google Cloud Storage SDK). Scheme gs,
adapter name gcs.
External
A third-party adapter resolved to a snapdir-<name>-store binary on
PATH. name is the adapter name (the store protocol verbatim).
Implementations§
Source§impl Adapter
impl Adapter
Sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
The adapter’s canonical name (gs resolves to gcs, matching the
oracle’s special case).
Sourcepub fn store_binary(&self) -> String
pub fn store_binary(&self) -> String
The snapdir-<name>-store binary this adapter corresponds to.
For the built-in adapters this is the helper binary the original
implementation would have shelled out to (one per file/s3/b2
adapter, plus the gcs adapter via the gs→gcs special case). The
Rust port serves the built-ins in-process and only spawns the binary for
Adapter::External.
Sourcepub fn is_builtin(&self) -> bool
pub fn is_builtin(&self) -> bool
Whether this adapter is served in-process by the Rust port (true) or
dispatched to a third-party binary via the shim (false).
Trait Implementations§
impl Eq for Adapter
impl StructuralPartialEq for Adapter
Auto Trait Implementations§
impl Freeze for Adapter
impl RefUnwindSafe for Adapter
impl Send for Adapter
impl Sync for Adapter
impl Unpin for Adapter
impl UnsafeUnpin for Adapter
impl UnwindSafe for Adapter
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
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>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request