pub struct Library { /* private fields */ }Implementations§
Source§impl Library
impl Library
Sourcepub fn new(name: String, items: Vec<LibraryItem>) -> Self
pub fn new(name: String, items: Vec<LibraryItem>) -> Self
Create a new Library
Sourcepub fn items(&self) -> Vec<LibraryItem>
pub fn items(&self) -> Vec<LibraryItem>
Get all the library item
Sourcepub fn get_item(&self, name: String) -> Option<LibraryItem>
pub fn get_item(&self, name: String) -> Option<LibraryItem>
Get a library item from name
Sourcepub fn add_item(&mut self, item: LibraryItem)
pub fn add_item(&mut self, item: LibraryItem)
Add a new library item
Trait Implementations§
Auto Trait Implementations§
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