Struct oxygengine_physics_2d::prelude::material::MaterialHandle [−][src]
pub struct MaterialHandle<N>(_)
where
N: RealField;
A shared handle to an abstract shape.
This can be mutated using COW.
Implementations
impl<N> MaterialHandle<N> where
N: RealField,
[src]
impl<N> MaterialHandle<N> where
N: RealField,
[src]pub fn new<S>(material: S) -> MaterialHandle<N> where
S: Material<N> + Clone,
[src]
S: Material<N> + Clone,
Creates a sharable shape handle from a shape.
Methods from Deref<Target = dyn Material<N> + 'static>
pub fn is<__T>(&self) -> bool where
__T: Material<N>,
[src]
__T: Material<N>,
Returns true if the trait object wraps an object of type __T
.
pub fn downcast_rc<__T>(
self: Rc<dyn Material<N> + 'static>
) -> Result<Rc<__T>, Rc<dyn Material<N> + 'static>> where
__T: Material<N>,
[src]
self: Rc<dyn Material<N> + 'static>
) -> Result<Rc<__T>, Rc<dyn Material<N> + 'static>> where
__T: Material<N>,
Returns an Rc
-ed object from an Rc
-ed trait object if the underlying object is of
type __T
. Returns the original Rc
-ed trait if it isn’t.
pub fn downcast_ref<__T>(&self) -> Option<&__T> where
__T: Material<N>,
[src]
__T: Material<N>,
Returns a reference to the object within the trait object if it is of type __T
, or
None
if it isn’t.
Trait Implementations
impl<N> AsRef<dyn Material<N> + 'static> for MaterialHandle<N> where
N: RealField,
[src]
impl<N> AsRef<dyn Material<N> + 'static> for MaterialHandle<N> where
N: RealField,
[src]impl<N> Clone for MaterialHandle<N> where
N: Clone + RealField,
[src]
impl<N> Clone for MaterialHandle<N> where
N: Clone + RealField,
[src]pub fn clone(&self) -> MaterialHandle<N>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl<N> !RefUnwindSafe for MaterialHandle<N>
impl<N> !RefUnwindSafe for MaterialHandle<N>
impl<N> Send for MaterialHandle<N>
impl<N> Send for MaterialHandle<N>
impl<N> Sync for MaterialHandle<N>
impl<N> Sync for MaterialHandle<N>
impl<N> Unpin for MaterialHandle<N>
impl<N> Unpin for MaterialHandle<N>
impl<N> !UnwindSafe for MaterialHandle<N>
impl<N> !UnwindSafe for MaterialHandle<N>
Blanket Implementations
impl<T> Any for T where
T: Any,
impl<T> Any for T where
T: Any,
pub fn get_type_id(&self) -> TypeId
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,