Enum rend3::ProfileData
source · [−]pub enum ProfileData<C, G> {
Cpu(C),
Gpu(G),
}
Expand description
Stores two different types of data depending on the renderer mode.
Variants
Cpu(C)
Gpu(G)
Implementations
sourceimpl<C, G> ProfileData<C, G>
impl<C, G> ProfileData<C, G>
pub fn profile(&self) -> RendererProfile
pub fn into_cpu(self) -> C
pub fn as_cpu(&self) -> &C
pub fn as_cpu_mut(&mut self) -> &mut C
pub fn as_cpu_only_ref(&self) -> ProfileData<&C, ()>
pub fn as_cpu_only_mut(&mut self) -> ProfileData<&mut C, ()>
pub fn into_gpu(self) -> G
pub fn as_gpu(&self) -> &G
pub fn as_gpu_mut(&mut self) -> &mut G
pub fn as_gpu_only_ref(&self) -> ProfileData<(), &G>
pub fn as_gpu_only_mut(&mut self) -> ProfileData<(), &mut G>
pub fn as_ref(&self) -> ProfileData<&C, &G>
pub fn as_ref_mut(&mut self) -> ProfileData<&mut C, &mut G>
pub fn map_cpu<C2>(self, func: impl FnOnce(C) -> C2) -> ProfileData<C2, G>
pub fn map_gpu<G2>(self, func: impl FnOnce(G) -> G2) -> ProfileData<C, G2>
pub fn map<C2, G2>(
self,
cpu_func: impl FnOnce(C) -> C2,
gpu_func: impl FnOnce(G) -> G2
) -> ProfileData<C2, G2>
sourceimpl<T> ProfileData<T, T>
impl<T> ProfileData<T, T>
pub fn into_common(self) -> T
Trait Implementations
sourceimpl<C: Clone, G: Clone> Clone for ProfileData<C, G>
impl<C: Clone, G: Clone> Clone for ProfileData<C, G>
sourcefn clone(&self) -> ProfileData<C, G>
fn clone(&self) -> ProfileData<C, G>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<C: Debug, G: Debug> Debug for ProfileData<C, G>
impl<C: Debug, G: Debug> Debug for ProfileData<C, G>
sourceimpl<C: Hash, G: Hash> Hash for ProfileData<C, G>
impl<C: Hash, G: Hash> Hash for ProfileData<C, G>
sourceimpl<C: Ord, G: Ord> Ord for ProfileData<C, G>
impl<C: Ord, G: Ord> Ord for ProfileData<C, G>
sourceimpl<C: PartialEq, G: PartialEq> PartialEq<ProfileData<C, G>> for ProfileData<C, G>
impl<C: PartialEq, G: PartialEq> PartialEq<ProfileData<C, G>> for ProfileData<C, G>
sourcefn eq(&self, other: &ProfileData<C, G>) -> bool
fn eq(&self, other: &ProfileData<C, G>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ProfileData<C, G>) -> bool
fn ne(&self, other: &ProfileData<C, G>) -> bool
This method tests for !=
.
sourceimpl<C: PartialOrd, G: PartialOrd> PartialOrd<ProfileData<C, G>> for ProfileData<C, G>
impl<C: PartialOrd, G: PartialOrd> PartialOrd<ProfileData<C, G>> for ProfileData<C, G>
sourcefn partial_cmp(&self, other: &ProfileData<C, G>) -> Option<Ordering>
fn partial_cmp(&self, other: &ProfileData<C, G>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<C: Copy, G: Copy> Copy for ProfileData<C, G>
impl<C: Eq, G: Eq> Eq for ProfileData<C, G>
impl<C, G> StructuralEq for ProfileData<C, G>
impl<C, G> StructuralPartialEq for ProfileData<C, G>
Auto Trait Implementations
impl<C, G> RefUnwindSafe for ProfileData<C, G> where
C: RefUnwindSafe,
G: RefUnwindSafe,
impl<C, G> Send for ProfileData<C, G> where
C: Send,
G: Send,
impl<C, G> Sync for ProfileData<C, G> where
C: Sync,
G: Sync,
impl<C, G> Unpin for ProfileData<C, G> where
C: Unpin,
G: Unpin,
impl<C, G> UnwindSafe for ProfileData<C, G> where
C: UnwindSafe,
G: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcepub fn equivalent(&self, key: &K) -> bool
pub fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more