pub struct Deps<'a, S, Q> {
pub store: &'a AuthStore,
pub source: &'a S,
pub quirks_source: &'a Q,
pub env_is_set: &'a dyn Fn(&str) -> bool,
/* private fields */
}Expand description
What the wizard needs from the outside world.
Bundled rather than threaded one by one: every field here exists so a test can supply a stand-in - the model listing, the quirks registry, and whether an environment variable is set are the three things that would otherwise reach the network or the process environment from inside a unit test.
The bounds sit on the functions that use the fields rather than on the struct: a bound on a data declaration has to be repeated at every mention of the type without constraining anything the fields do.
Fields§
§store: &'a AuthStoreKeys already held for this machine.
source: &'a SWhat models an endpoint serves.
quirks_source: &'a QWhat quirks a chosen model has.
env_is_set: &'a dyn Fn(&str) -> boolWhether an environment variable is set.
Auto Trait Implementations§
impl<'a, S, Q> !RefUnwindSafe for Deps<'a, S, Q>
impl<'a, S, Q> !Send for Deps<'a, S, Q>
impl<'a, S, Q> !Sync for Deps<'a, S, Q>
impl<'a, S, Q> !UnwindSafe for Deps<'a, S, Q>
impl<'a, S, Q> Freeze for Deps<'a, S, Q>
impl<'a, S, Q> Unpin for Deps<'a, S, Q>
impl<'a, S, Q> UnsafeUnpin for Deps<'a, S, Q>
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