Struct ProfileToken
pub struct ProfileToken {
pub id: u64,
pub opened_on: u64,
}Expand description
An open profiling window on a backend, handed out by
profile_start and passed back to
profile_end to close it.
Windows nest and overlap: a backend keys each on its token.
Fields§
§id: u64The backend’s own identifier for the window.
opened_on: u64The backend’s own identifier for where the window was opened — a stream, a queue — carried so it can be closed there.
Opaque to this crate, and 0 for a backend that has only one such
place. A window belongs to where it was opened, not to whoever closes
it: the split pair exists for work launched from somewhere else, so
the two calls can land on different threads, and a close that guessed
from the calling thread would pair a start recorded on one stream
with an end recorded on another — which reads as a plausible duration
and means nothing.
Trait Implementations§
§impl Clone for ProfileToken
impl Clone for ProfileToken
§fn clone(&self) -> ProfileToken
fn clone(&self) -> ProfileToken
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ProfileToken
§impl Debug for ProfileToken
impl Debug for ProfileToken
§impl<'de> Deserialize<'de> for ProfileToken
impl<'de> Deserialize<'de> for ProfileToken
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProfileToken, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProfileToken, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for ProfileToken
§impl Hash for ProfileToken
impl Hash for ProfileToken
§impl PartialEq for ProfileToken
impl PartialEq for ProfileToken
§impl Serialize for ProfileToken
impl Serialize for ProfileToken
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for ProfileToken
Auto Trait Implementations§
impl Freeze for ProfileToken
impl RefUnwindSafe for ProfileToken
impl Send for ProfileToken
impl Sync for ProfileToken
impl Unpin for ProfileToken
impl UnsafeUnpin for ProfileToken
impl UnwindSafe for ProfileToken
Blanket Implementations§
impl<T> Boilerplate for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<K, Q> Comparable<Q> for K
impl<K, Q> Comparable<Q> for K
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<K, Q> Equivalent<Q> for K
impl<K, Q> Equivalent<Q> for K
§fn equivalent(&self, key: &Q) -> bool
fn equivalent(&self, key: &Q) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more