pub struct ExternalStore { /* private fields */ }Expand description
A store backed by a third-party snapdir-<name>-store binary, dispatched
through the emit-command contract.
Construct with ExternalStore::new (resolving the binary name from the
store URL’s protocol via the router) or ExternalStore::with_binary (to
point at a specific binary path/name, e.g. a mock in tests).
Implementations§
Source§impl ExternalStore
impl ExternalStore
Sourcepub fn new(store_url: &str) -> Result<Self, StoreError>
pub fn new(store_url: &str) -> Result<Self, StoreError>
Builds a shim for store_url, resolving the third-party binary name from
its protocol via resolve_adapter.
§Errors
Returns StoreError::Backend if the store URL’s protocol is invalid,
or if it resolves to a built-in adapter (file/s3/b2/gcs) — those
are served in-process and must not be routed through the shim.
Sourcepub fn with_binary(store_url: &str, binary: impl Into<PathBuf>) -> Self
pub fn with_binary(store_url: &str, binary: impl Into<PathBuf>) -> Self
Builds a shim that dispatches to an explicit binary (path or name on
PATH) for store_url, bypassing protocol resolution.
Useful for tests (pointing at a mock store script) and for honoring an
explicit _SNAPDIR_<PROTO>_STORE_BIN_PATH-style override.
Sourcepub fn with_shell(self, shell: impl Into<String>) -> Self
pub fn with_shell(self, shell: impl Into<String>) -> Self
Overrides the shell used to eval emitted scripts (default bash).
Trait Implementations§
Source§impl Clone for ExternalStore
impl Clone for ExternalStore
Source§fn clone(&self) -> ExternalStore
fn clone(&self) -> ExternalStore
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExternalStore
impl Debug for ExternalStore
Source§impl Store for ExternalStore
impl Store for ExternalStore
Source§fn get_manifest(&self, id: &str) -> Result<Manifest, StoreError>
fn get_manifest(&self, id: &str) -> Result<Manifest, StoreError>
id’s sharded path,
verifying that its bytes hash back to id before returning it. Read moreSource§fn fetch_files(
&self,
manifest: &Manifest,
dest: &Path,
) -> Result<(), StoreError>
fn fetch_files( &self, manifest: &Manifest, dest: &Path, ) -> Result<(), StoreError>
manifest under dest, pulling each
referenced object from the store and reconstructing the directory tree
(files, directories, permissions) rooted at dest. Read moreAuto Trait Implementations§
impl Freeze for ExternalStore
impl RefUnwindSafe for ExternalStore
impl Send for ExternalStore
impl Sync for ExternalStore
impl Unpin for ExternalStore
impl UnsafeUnpin for ExternalStore
impl UnwindSafe for ExternalStore
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<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