Trait ViewLayoutInterface

Source
pub trait ViewLayoutInterface {
    type Metadata: Default;
    type Scripts: Default;
    type Styles: Default;
    type View;

    // Required methods
    fn new() -> Self
       where Self: Sized;
    fn set_title(&mut self, title: impl ToString);
    fn set_body(&mut self, body: Self::View);
    fn add_meta(&mut self, meta: Self::Metadata);
    fn add_script(&mut self, script: Self::Scripts);
    fn add_style(&mut self, style: Self::Styles);
    fn view(&self) -> Self::View;
}

Required Associated Types§

Required Methods§

Source

fn new() -> Self
where Self: Sized,

Crée une nouvelle instance de la mise en page.

Source

fn set_title(&mut self, title: impl ToString)

Applique un titre au document de la mise en page.

Source

fn set_body(&mut self, body: Self::View)

Applique un corps à la mise en page.

Source

fn add_meta(&mut self, meta: Self::Metadata)

Ajoute une méta-données au document de la mise en page.

Source

fn add_script(&mut self, script: Self::Scripts)

Ajoute un script au document de la mise en page.

Source

fn add_style(&mut self, style: Self::Styles)

Ajoute un style au document de la mise en page.

Source

fn view(&self) -> Self::View

L’HTML du document de la mise en page.

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§