pub struct ResolveOptions<'a> {
pub name: Option<&'a str>,
pub revision: Option<&'a str>,
pub token: Option<&'a str>,
pub events: Option<&'a mut dyn FnMut(ModelEvent)>,
}Expand description
Optional registration settings shared by prepare and explicit model registration.
Fields§
§name: Option<&'a str>Optional alias; an existing alias is never silently replaced.
revision: Option<&'a str>HF revision override; mutually exclusive with an @revision suffix.
token: Option<&'a str>Optional credential used only if remote metadata must be fetched.
events: Option<&'a mut dyn FnMut(ModelEvent)>Optional inspection event consumer, called serially on this calling thread
without a catalog lock. Keep handlers short; they can delay the operation.
Cached lookups emit no inspection events. Use the returned Result for
success or failure. Events are observational and do not control cancellation.
Implementations§
Trait Implementations§
Source§impl<'a> Default for ResolveOptions<'a>
impl<'a> Default for ResolveOptions<'a>
Source§fn default() -> ResolveOptions<'a>
fn default() -> ResolveOptions<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ResolveOptions<'a>
impl<'a> !Send for ResolveOptions<'a>
impl<'a> !Sync for ResolveOptions<'a>
impl<'a> !UnwindSafe for ResolveOptions<'a>
impl<'a> Freeze for ResolveOptions<'a>
impl<'a> Unpin for ResolveOptions<'a>
impl<'a> UnsafeUnpin for ResolveOptions<'a>
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
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