pub struct MaterialKey(/* private fields */);Expand description
A hash key derived from the content of a PbrMaterial. Two materials that
are structurally identical produce the same key.
Implementations§
Source§impl MaterialKey
impl MaterialKey
Sourcepub fn from_material(m: &PbrMaterial) -> Self
pub fn from_material(m: &PbrMaterial) -> Self
Derive the key from a material by hashing its fields with a simple FNV-1a accumulator. This is not cryptographic — it is only used for cache lookup.
Trait Implementations§
Source§impl Clone for MaterialKey
impl Clone for MaterialKey
Source§fn clone(&self) -> MaterialKey
fn clone(&self) -> MaterialKey
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MaterialKey
impl Debug for MaterialKey
Source§impl Hash for MaterialKey
impl Hash for MaterialKey
Source§impl PartialEq for MaterialKey
impl PartialEq for MaterialKey
impl Copy for MaterialKey
impl Eq for MaterialKey
impl StructuralPartialEq for MaterialKey
Auto Trait Implementations§
impl Freeze for MaterialKey
impl RefUnwindSafe for MaterialKey
impl Send for MaterialKey
impl Sync for MaterialKey
impl Unpin for MaterialKey
impl UnsafeUnpin for MaterialKey
impl UnwindSafe for MaterialKey
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.