pub struct Paths {
pub data: PathBuf,
pub scratch: PathBuf,
pub config: PathBuf,
}Expand description
Resolved application locations, using XDG directories on macOS and Linux.
Fields§
§data: PathBufDownloaded checkpoints and generated stores; never automatically evicted.
scratch: PathBufDisposable transfer scratch. Inference checkpoints remain in RAM.
config: PathBufServer configuration file.
Implementations§
Source§impl Paths
impl Paths
Sourcepub fn new(root: Option<&Path>) -> Result<Self>
pub fn new(root: Option<&Path>) -> Result<Self>
Resolve locations from an explicit root or absolute XDG overrides.
An explicit root holds data, scratch/, and cherenkov.toml together.
Without overrides, use the user’s .local/share, .cache, and .config
directories. This does not create directories or read configuration files.
Sourcepub fn model(&self, repo: &str, commit: &str) -> Result<PathBuf>
pub fn model(&self, repo: &str, commit: &str) -> Result<PathBuf>
Resolve a model directory from owner/name and a full commit hash.
Reject unsafe path components and revisions that are not 40 hexadecimal digits.
Sourcepub fn default_model(&self) -> PathBuf
pub fn default_model(&self) -> PathBuf
Resolve the built-in checkpoint’s directory without checking availability.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Paths
impl RefUnwindSafe for Paths
impl Send for Paths
impl Sync for Paths
impl Unpin for Paths
impl UnsafeUnpin for Paths
impl UnwindSafe for Paths
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> 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