pub struct DiskStore {
pub id: String,
pub name: String,
pub path: PathBuf,
pub layout: DiskLayout,
pub enabled: bool,
}Expand description
A named, externally owned filesystem store registered in this index.
Fields§
§id: StringStable identity; removing and re-registering a name creates a new identity.
name: StringURI authority used in disk://NAME/owner/repo.
path: PathBufCanonical filesystem root. Registration never takes ownership of its files.
layout: DiskLayoutModel-location convention beneath the root.
enabled: boolWhether source URI resolution is enabled; existing index entries are retained.
Implementations§
Source§impl DiskStore
impl DiskStore
Sourcepub(super) fn locate(
&self,
repo: &str,
revision: Option<&str>,
) -> Result<PathBuf>
pub(super) fn locate( &self, repo: &str, revision: Option<&str>, ) -> Result<PathBuf>
Resolve a source inside this root, rejecting directory traversal and symlink escapes.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DiskStore
impl<'de> Deserialize<'de> for DiskStore
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DiskStore
impl RefUnwindSafe for DiskStore
impl Send for DiskStore
impl Sync for DiskStore
impl Unpin for DiskStore
impl UnsafeUnpin for DiskStore
impl UnwindSafe for DiskStore
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§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