pub struct DomainPaths { /* private fields */ }Expand description
Helper for getting paths. We heavily rely on where we put files, and this struct contains info of the directory structure .
Implementations§
Source§impl DomainPaths
impl DomainPaths
pub fn new(root_dir: PathBuf) -> Self
pub fn auth_host(&self, host: &Host) -> PathBuf
Sourcepub fn installed_manifest(&self, namespace: &Namespace, hash: &str) -> PathBuf
pub fn installed_manifest(&self, namespace: &Namespace, hash: &str) -> PathBuf
Path to the installed manifest.
Takes (namespace, hash) rather than &ManifestUri because the
installed manifest may belong to either a remote-backed package
(where a ManifestUri is available) or a local-only package
(created via flow::create, where there is no bucket or origin).
A local commit also produces a hash that has no remote
counterpart yet.
Sourcepub fn installed_manifests_dir(&self, namespace: &Namespace) -> PathBuf
pub fn installed_manifests_dir(&self, namespace: &Namespace) -> PathBuf
Directory for storing installed manifests
Sourcepub fn cached_manifest(&self, uri: &ManifestUri) -> PathBuf
pub fn cached_manifest(&self, uri: &ManifestUri) -> PathBuf
Path to the manifest cached in semi-temporary directory
Sourcepub fn cached_manifests_dir(&self, bucket: &str) -> PathBuf
pub fn cached_manifests_dir(&self, bucket: &str) -> PathBuf
Directory for storing cached manifests for a bucket
Sourcepub fn objects_dir(&self) -> PathBuf
pub fn objects_dir(&self) -> PathBuf
Directory for storing pristine hashed files
pub async fn scaffold_for_installing( &self, storage: &impl Storage, home: &Home, namespace: &Namespace, ) -> Res
pub async fn scaffold_for_caching( &self, storage: &impl Storage, bucket: &str, ) -> Res
Trait Implementations§
Source§impl Clone for DomainPaths
impl Clone for DomainPaths
Source§fn clone(&self) -> DomainPaths
fn clone(&self) -> DomainPaths
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 Debug for DomainPaths
impl Debug for DomainPaths
Source§impl Default for DomainPaths
impl Default for DomainPaths
Source§fn default() -> DomainPaths
fn default() -> DomainPaths
Returns the “default value” for a type. Read more
Source§impl PartialEq for DomainPaths
impl PartialEq for DomainPaths
Source§fn eq(&self, other: &DomainPaths) -> bool
fn eq(&self, other: &DomainPaths) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for DomainPaths
impl StructuralPartialEq for DomainPaths
Auto Trait Implementations§
impl Freeze for DomainPaths
impl RefUnwindSafe for DomainPaths
impl Send for DomainPaths
impl Sync for DomainPaths
impl Unpin for DomainPaths
impl UnsafeUnpin for DomainPaths
impl UnwindSafe for DomainPaths
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
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
Compare self to
key and return true if they are equal.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 moreCreates a shared type from an unshared type.