pub struct AdapterRegistration {
pub make: fn() -> Box<dyn Adapter>,
pub name: &'static str,
}Expand description
Inventory entry registered by every adapter crate. gen-cli’s
quirks / adapters / future cross-ecosystem verbs iterate
this distributed slice to discover every adapter at link time —
no hard-coded match arms, no per-ecosystem edits to gen-cli when
a new adapter lands.
Adapters register via inventory::submit!. See
gen-cargo::adapter for the canonical example.
Fields§
§make: fn() -> Box<dyn Adapter>Constructs a fresh instance of the adapter. &dyn Adapter
can be obtained by (&*reg.make()).
name: &'static strAdapter name (mirror of Adapter::name). Allows filtering
without instantiating the adapter — used by
gen quirks --adapter <name>.
Trait Implementations§
impl Collect for AdapterRegistration
Auto Trait Implementations§
impl Freeze for AdapterRegistration
impl RefUnwindSafe for AdapterRegistration
impl Send for AdapterRegistration
impl Sync for AdapterRegistration
impl Unpin for AdapterRegistration
impl UnsafeUnpin for AdapterRegistration
impl UnwindSafe for AdapterRegistration
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