pub struct DownloadInfo {
pub download_type: String,
pub repo: Option<String>,
pub file: Option<String>,
pub url: Option<String>,
pub path: Option<String>,
}Expand description
Where and how to fetch a resource.
Fields§
§download_type: StringSource type: "huggingface", "direct", "github".
repo: Option<String>HuggingFace repo slug (e.g. "unsloth/Phi-3-mini-4k-instruct-GGUF").
file: Option<String>Filename within the repo (e.g. "Phi-3-mini-4k-instruct.Q4_K_M.gguf").
url: Option<String>Direct URL for "direct" or "github" sources.
path: Option<String>Path within a GitHub repo (used with type: github).
Implementations§
Source§impl DownloadInfo
impl DownloadInfo
Sourcepub fn resolved_url(&self) -> Option<String>
pub fn resolved_url(&self) -> Option<String>
Resolve to a concrete download URL.
Sourcepub fn local_filename(&self) -> Option<String>
pub fn local_filename(&self) -> Option<String>
Local filename to use when saving (falls back to last URL segment).
Trait Implementations§
Source§impl Clone for DownloadInfo
impl Clone for DownloadInfo
Source§fn clone(&self) -> DownloadInfo
fn clone(&self) -> DownloadInfo
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 DownloadInfo
impl Debug for DownloadInfo
Source§impl<'de> Deserialize<'de> for DownloadInfo
impl<'de> Deserialize<'de> for DownloadInfo
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 DownloadInfo
impl RefUnwindSafe for DownloadInfo
impl Send for DownloadInfo
impl Sync for DownloadInfo
impl Unpin for DownloadInfo
impl UnsafeUnpin for DownloadInfo
impl UnwindSafe for DownloadInfo
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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,
§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