language_reporting

Trait OnceBlockComponent

Source
pub trait OnceBlockComponent: Sized {
    type Item;

    // Required method
    fn append(
        self,
        block: impl FnOnce(Self::Item, Document) -> Document,
        document: Document,
    ) -> Document;

    // Provided method
    fn with<F>(component: Self, block: F) -> CurriedOnceBlockComponent<Self, F>
       where F: FnOnce(Self::Item, Document) -> Document { ... }
}

Required Associated Types§

Required Methods§

Source

fn append( self, block: impl FnOnce(Self::Item, Document) -> Document, document: Document, ) -> Document

Provided Methods§

Source

fn with<F>(component: Self, block: F) -> CurriedOnceBlockComponent<Self, F>
where F: FnOnce(Self::Item, Document) -> Document,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§