pub struct ModelLoader { /* private fields */ }Expand description
Model loader
Implementations§
Source§impl ModelLoader
impl ModelLoader
pub fn new() -> Self
pub fn initialize(&mut self) -> Result<(), MLError>
Sourcepub fn register_loading_strategy(
&mut self,
name: &str,
strategy: LoadingStrategy,
)
pub fn register_loading_strategy( &mut self, name: &str, strategy: LoadingStrategy, )
Register a loading strategy under the given name.
Sourcepub fn get_loading_strategy(&self, name: &str) -> Option<&LoadingStrategy>
pub fn get_loading_strategy(&self, name: &str) -> Option<&LoadingStrategy>
Get a registered loading strategy by name.
Sourcepub fn list_loading_strategies(&self) -> Vec<String>
pub fn list_loading_strategies(&self) -> Vec<String>
List the names of all registered loading strategies.
Sourcepub fn register_format_converter(
&mut self,
name: &str,
converter: FormatConverter,
)
pub fn register_format_converter( &mut self, name: &str, converter: FormatConverter, )
Register a format converter under the given name.
Sourcepub fn get_format_converter(&self, name: &str) -> Option<&FormatConverter>
pub fn get_format_converter(&self, name: &str) -> Option<&FormatConverter>
Get a registered format converter by name.
Sourcepub fn list_format_converters(&self) -> Vec<String>
pub fn list_format_converters(&self) -> Vec<String>
List the names of all registered format converters.
Auto Trait Implementations§
impl Freeze for ModelLoader
impl RefUnwindSafe for ModelLoader
impl Send for ModelLoader
impl Sync for ModelLoader
impl Unpin for ModelLoader
impl UnsafeUnpin for ModelLoader
impl UnwindSafe for ModelLoader
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
§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