pub enum ProfileDuration {
Full(Duration),
DeviceDuration(Pin<Box<dyn Future<Output = Duration> + Send>>),
}
Expand description
Result from profiling between two measurements. This can either be a duration or a future that resolves to a duration.
Variants§
Full(Duration)
Client profile contains a full duration.
DeviceDuration(Pin<Box<dyn Future<Output = Duration> + Send>>)
Client profile measures the device duration, and requires to be resolved.
Implementations§
Source§impl ProfileDuration
impl ProfileDuration
Sourcepub fn from_duration(duration: Duration) -> ProfileDuration
pub fn from_duration(duration: Duration) -> ProfileDuration
Create a new ProfileDuration
straight from a duration.
Sourcepub fn from_future(
future: impl Future<Output = Duration> + Send + 'static,
) -> ProfileDuration
pub fn from_future( future: impl Future<Output = Duration> + Send + 'static, ) -> ProfileDuration
Create a new ProfileDuration
from a future that resolves to a duration.
Sourcepub fn timing_method(&self) -> TimingMethod
pub fn timing_method(&self) -> TimingMethod
The method used to measure the execution time.
Auto Trait Implementations§
impl Freeze for ProfileDuration
impl !RefUnwindSafe for ProfileDuration
impl Send for ProfileDuration
impl !Sync for ProfileDuration
impl Unpin for ProfileDuration
impl !UnwindSafe for ProfileDuration
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