pub struct Library { /* private fields */ }Implementations§
Source§impl Library
impl Library
pub fn new(home: &Path) -> Self
pub fn get( &self, kind: Kind, id: &str, ) -> Result<Option<LibraryItem>, MemoryError>
pub fn list(&self, kind: Kind) -> Result<Vec<LibraryItem>, MemoryError>
pub fn write(&self, kind: Kind, item: &LibraryItem) -> Result<(), MemoryError>
pub fn create( &self, kind: Kind, item: LibraryItem, ) -> Result<LibraryItem, MemoryError>
pub fn update( &self, kind: Kind, id: &str, patch: LibraryUpdate, ) -> Result<LibraryItem, MemoryError>
pub fn remove(&self, kind: Kind, id: &str) -> Result<(), MemoryError>
pub fn compose( &self, agent: Option<&str>, skills: &[String], ) -> Result<Option<String>, MemoryError>
Auto Trait Implementations§
impl Forget for Library
impl Freeze for Library
impl RefUnwindSafe for Library
impl Send for Library
impl Sync for Library
impl Unpin for Library
impl UnsafeUnpin for Library
impl UnwindSafe for Library
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