pub struct Handlers { /* private fields */ }Expand description
The content handlers of a registry, by name, as the float’s rules read them.
The feature creates one value when it registers and shares it among its
lowering rules (the general rule and the rules of the html and
latex-recomposed backends). The feature’s build hook (a
Finalizer) fills it once, when the registry is built, from every
contribution to the service slot CONTENT_SLOT. A value created with
Default and never filled holds no handler.
Implementations§
Source§impl Handlers
impl Handlers
Sourcepub fn get(&self, name: &str) -> Option<&Arc<dyn FloatContentHandler>>
pub fn get(&self, name: &str) -> Option<&Arc<dyn FloatContentHandler>>
Returns the handler of the name name, where a registered feature
contributes one.
Sourcepub fn verdict(&self, names: &[String], content: &[NodeRef<'_, Flm>]) -> Verdict
pub fn verdict(&self, names: &[String], content: &[NodeRef<'_, Flm>]) -> Verdict
Returns how content fares against the handlers names, tried in
order: the first that accepts it decides. A name that no registered
feature contributes accepts nothing and adds no refusal to the list,
since the document’s author cannot write the content it would
accept.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Handlers
impl !RefUnwindSafe for Handlers
impl !UnwindSafe for Handlers
impl Forget for Handlers
impl Move for Handlers
impl Send for Handlers
impl Sync for Handlers
impl Unpin for Handlers
impl UnsafeUnpin for Handlerswhere
Align4<u32>: UnsafeUnpin,
*const LeafNode<String, Arc<dyn FloatContentHandler>> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Arc<dyn FloatContentHandler>)>>: UnsafeUnpin,
PhantomData<BTreeMap<String, Arc<dyn FloatContentHandler>>>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
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> ⓘ
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> ⓘ
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