pub struct NullProfiler;Expand description
No-op profiler used by default to keep the fast path branch-free.
Trait Implementations§
Source§impl ProfilerSink for NullProfiler
impl ProfilerSink for NullProfiler
fn begin_token(&mut self)
fn record_attention(&mut self, _layer: usize, _duration: Duration)
fn record_ffn(&mut self, _layer: usize, _duration: Duration)
Auto Trait Implementations§
impl Freeze for NullProfiler
impl RefUnwindSafe for NullProfiler
impl Send for NullProfiler
impl Sync for NullProfiler
impl Unpin for NullProfiler
impl UnwindSafe for NullProfiler
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
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>
Converts
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>
Converts
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