pub struct BackendRegistry { /* private fields */ }Expand description
The registry of acceleration methods. Heap-using and boot-time only (the heavy probe runs once and is cached in the passport — never on a hot path).
Implementations§
Source§impl BackendRegistry
impl BackendRegistry
pub fn new() -> Self
Sourcepub fn register(&mut self, backend: Box<dyn ProbeableBackend>) -> &mut Self
pub fn register(&mut self, backend: Box<dyn ProbeableBackend>) -> &mut Self
Register a backend. Adding one here is the only change needed to bring a new acceleration method into the benchmark, ranking and policy.
Sourcepub fn iter(&self) -> impl Iterator<Item = &dyn ProbeableBackend>
pub fn iter(&self) -> impl Iterator<Item = &dyn ProbeableBackend>
All registered backends (including currently-unavailable ones).
Sourcepub fn available(&self) -> impl Iterator<Item = &dyn ProbeableBackend>
pub fn available(&self) -> impl Iterator<Item = &dyn ProbeableBackend>
Backends actually usable on this host.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Default for BackendRegistry
impl Default for BackendRegistry
Source§fn default() -> BackendRegistry
fn default() -> BackendRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BackendRegistry
impl !RefUnwindSafe for BackendRegistry
impl Send for BackendRegistry
impl Sync for BackendRegistry
impl Unpin for BackendRegistry
impl UnsafeUnpin for BackendRegistry
impl !UnwindSafe for BackendRegistry
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
§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>
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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.