pub struct Store { /* private fields */ }Expand description
A flat, key-value store for material refractive index data.
Implementations§
Source§impl Store
impl Store
pub fn new(database: HashMap<String, Material>) -> Self
Sourcepub fn insert(&mut self, key: String, material: Material)
pub fn insert(&mut self, key: String, material: Material)
Inserts a new item into the store.
§Arguments
key: The key to associate with the item.material: The item to insert into the store.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Store
impl<'de> Deserialize<'de> for Store
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Store
impl RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnwindSafe for Store
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