pub struct Library { /* private fields */ }Implementations§
Source§impl Library
impl Library
pub fn new() -> Self
pub fn fixture() -> Self
pub fn from_toml(text: &str) -> Result<Self, String>
pub fn to_toml(&self) -> Result<String, String>
pub fn get(&self, name: &str) -> Option<&Material>
pub fn contains(&self, name: &str) -> bool
pub fn insert( &mut self, name: &str, material: Material, ) -> Result<Option<Material>, String>
pub fn names(&self) -> impl Iterator<Item = &str>
pub fn iter(&self) -> impl Iterator<Item = (&str, &Material)>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
impl StructuralPartialEq for Library
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