pub struct BackendRegistry { /* private fields */ }Expand description
Deterministic registry of markup backends.
Implementations§
Source§impl BackendRegistry
impl BackendRegistry
Sourcepub fn register<B: MarkupBackend + 'static>(
&mut self,
backend: B,
) -> Option<Arc<dyn MarkupBackend>>
pub fn register<B: MarkupBackend + 'static>( &mut self, backend: B, ) -> Option<Arc<dyn MarkupBackend>>
Register backend, returning any backend previously registered with
the same id.
Sourcepub fn register_arc(
&mut self,
backend: Arc<dyn MarkupBackend>,
) -> Option<Arc<dyn MarkupBackend>>
pub fn register_arc( &mut self, backend: Arc<dyn MarkupBackend>, ) -> Option<Arc<dyn MarkupBackend>>
Register an already shared backend handle.
Sourcepub fn backend(
&self,
id: &BackendId,
) -> Result<Arc<dyn MarkupBackend>, MarkupError>
pub fn backend( &self, id: &BackendId, ) -> Result<Arc<dyn MarkupBackend>, MarkupError>
Return a backend handle by id.
Trait Implementations§
Source§impl Clone for BackendRegistry
impl Clone for BackendRegistry
Source§fn clone(&self) -> BackendRegistry
fn clone(&self) -> BackendRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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 !RefUnwindSafe for BackendRegistry
impl !UnwindSafe for BackendRegistry
impl Freeze for BackendRegistry
impl Send for BackendRegistry
impl Sync for BackendRegistry
impl Unpin for BackendRegistry
impl UnsafeUnpin for BackendRegistry
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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