pub struct ModelRegistry { /* private fields */ }
Implementations§
Source§impl ModelRegistry
impl ModelRegistry
pub fn new() -> Self
pub fn register<T>(&mut self, model_type: ModelType)where
T: DeserializeOwned + Serialize + 'static,
pub fn encode_json_to_msgpack( &self, model_type: ModelType, json_str: &str, ) -> Result<Vec<u8>>
pub fn decode_msgpack_to_json( &self, model_type: ModelType, msgpack_bytes: &[u8], ) -> Result<String>
pub fn encode_json_to_base64_msgpack( &self, model_type: ModelType, json_str: &str, ) -> Result<String>
pub fn decode_base64_msgpack_to_json( &self, model_type: ModelType, base64_str: &str, ) -> Result<String>
pub fn list_models(&self) -> Vec<ModelType>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModelRegistry
impl !RefUnwindSafe for ModelRegistry
impl !Send for ModelRegistry
impl !Sync for ModelRegistry
impl Unpin for ModelRegistry
impl !UnwindSafe for ModelRegistry
Blanket Implementations§
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