pub struct TargetRegistry { /* private fields */ }Expand description
Registry of target adapters, keyed by target root name.
Constructed once per sync run. Adapters are registered at startup; no dynamic registration is needed.
Implementations§
Source§impl TargetRegistry
impl TargetRegistry
Sourcepub fn get(&self, name: &str) -> Option<&dyn TargetAdapter>
pub fn get(&self, name: &str) -> Option<&dyn TargetAdapter>
Look up an adapter by target root name.
Returns None if no adapter is registered for the given name. Callers
may fall back to a default behavior (currently: pass-through copy) when
no adapter is found.
Sourcepub fn iter(&self) -> impl Iterator<Item = &dyn TargetAdapter>
pub fn iter(&self) -> impl Iterator<Item = &dyn TargetAdapter>
Iterate over all registered adapters.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TargetRegistry
impl !RefUnwindSafe for TargetRegistry
impl Send for TargetRegistry
impl Sync for TargetRegistry
impl Unpin for TargetRegistry
impl UnsafeUnpin for TargetRegistry
impl !UnwindSafe for TargetRegistry
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