Struct rafx::assets::MaterialAsset
source · pub struct MaterialAsset {
pub inner: Arc<MaterialAssetInner>,
}
Fields§
§inner: Arc<MaterialAssetInner>
Implementations§
source§impl MaterialAsset
impl MaterialAsset
pub fn new( passes: Vec<MaterialPass>, pass_name_to_index: HashMap<String, usize, BuildHasherDefault<FnvHasher>> ) -> MaterialAsset
pub fn find_pass_index_by_name(&self, name: &str) -> Option<usize>
pub fn get_single_material_pass( &self ) -> Result<ResourceArc<MaterialPassResource>, &'static str>
pub fn get_material_pass_by_index( &self, index: usize ) -> Option<ResourceArc<MaterialPassResource>>
pub fn get_material_pass_by_name( &self, name: &str ) -> Option<ResourceArc<MaterialPassResource>>
Trait Implementations§
source§impl Clone for MaterialAsset
impl Clone for MaterialAsset
source§fn clone(&self) -> MaterialAsset
fn clone(&self) -> MaterialAsset
Returns a copy 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 Deref for MaterialAsset
impl Deref for MaterialAsset
Auto Trait Implementations§
impl RefUnwindSafe for MaterialAsset
impl Send for MaterialAsset
impl Sync for MaterialAsset
impl Unpin for MaterialAsset
impl UnwindSafe for MaterialAsset
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.