pub struct InMemoryLoraStore { /* private fields */ }Expand description
インメモリの LoraModelStore 実装(テスト用)
Implementations§
Source§impl InMemoryLoraStore
impl InMemoryLoraStore
pub fn new() -> InMemoryLoraStore
Trait Implementations§
Source§impl Default for InMemoryLoraStore
impl Default for InMemoryLoraStore
Source§fn default() -> InMemoryLoraStore
fn default() -> InMemoryLoraStore
Returns the “default value” for a type. Read more
Source§impl LoraModelStore for InMemoryLoraStore
impl LoraModelStore for InMemoryLoraStore
Source§fn save(&self, model: &TrainedModel) -> Result<LoraModelId, StoreError>
fn save(&self, model: &TrainedModel) -> Result<LoraModelId, StoreError>
TrainedModel を保存
Source§fn get(&self, id: &LoraModelId) -> Result<Option<TrainedModel>, StoreError>
fn get(&self, id: &LoraModelId) -> Result<Option<TrainedModel>, StoreError>
ID で取得
Source§fn latest(
&self,
learn_model_name: &str,
) -> Result<Option<TrainedModel>, StoreError>
fn latest( &self, learn_model_name: &str, ) -> Result<Option<TrainedModel>, StoreError>
指定 LearnModel の最新版を取得
Source§fn query(&self, filter: &ModelFilter) -> Result<Vec<TrainedModel>, StoreError>
fn query(&self, filter: &ModelFilter) -> Result<Vec<TrainedModel>, StoreError>
フィルタで検索
Source§fn count(&self, filter: Option<&ModelFilter>) -> Result<usize, StoreError>
fn count(&self, filter: Option<&ModelFilter>) -> Result<usize, StoreError>
件数を取得
Source§fn list_meta(
&self,
filter: Option<&ModelFilter>,
) -> Result<Vec<ModelMeta>, StoreError>
fn list_meta( &self, filter: Option<&ModelFilter>, ) -> Result<Vec<ModelMeta>, StoreError>
メタ情報のみをリスト(軽量)
Source§fn delete(&self, id: &LoraModelId) -> Result<bool, StoreError>
fn delete(&self, id: &LoraModelId) -> Result<bool, StoreError>
削除
Auto Trait Implementations§
impl !Freeze for InMemoryLoraStore
impl RefUnwindSafe for InMemoryLoraStore
impl Send for InMemoryLoraStore
impl Sync for InMemoryLoraStore
impl Unpin for InMemoryLoraStore
impl UnwindSafe for InMemoryLoraStore
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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