pub struct Registry { /* private fields */ }Expand description
A registry instance. There is one global instance; tests build
their own so they never race the process-wide one.
Implementations§
Source§impl Registry
impl Registry
pub fn new() -> Self
pub fn is_sealed(&self) -> bool
Sourcepub fn record_build_at(
&self,
loc: &'static Location<'static>,
l: Lookup,
outcome: Outcome,
)
pub fn record_build_at( &self, loc: &'static Location<'static>, l: Lookup, outcome: Outcome, )
Records a build-phase lookup. Always accepted, even after
Self::seal — a process that loads a second model (draft +
target for speculative decoding) probes it too, and those
lookups are predictions, not surprises.
Sourcepub fn record_at(
&self,
loc: &'static Location<'static>,
l: Lookup,
outcome: Outcome,
)
pub fn record_at( &self, loc: &'static Location<'static>, l: Lookup, outcome: Outcome, )
Records a dispatch-site lookup. Before sealing this is just
bookkeeping; after sealing, a miss on a shape the build probe
never predicted warns once and is collected into
Self::surprises.
Sourcepub fn seal(&self) -> SealReport
pub fn seal(&self) -> SealReport
Freezes the build picture and switches on post-seal checking. Idempotent: re-sealing recomputes the report over everything recorded so far.
Sourcepub fn entries(&self) -> Vec<Entry>
pub fn entries(&self) -> Vec<Entry>
Every row, build and run, sorted like SealReport::entries.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Registry
impl RefUnwindSafe for Registry
impl Send for Registry
impl Sync for Registry
impl Unpin for Registry
impl UnsafeUnpin for Registry
impl UnwindSafe for Registry
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