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§
Sourcefn new() -> Selfwhere
Self: Sized,
fn new() -> Selfwhere
Self: Sized,
Crée une nouvelle instance de la mise en page.
Sourcefn set_title(&mut self, title: impl ToString)
fn set_title(&mut self, title: impl ToString)
Applique un titre au document de la mise en page.
Sourcefn add_meta(&mut self, meta: Self::Metadata)
fn add_meta(&mut self, meta: Self::Metadata)
Ajoute une méta-données au document de la mise en page.
Sourcefn add_script(&mut self, script: Self::Scripts)
fn add_script(&mut self, script: Self::Scripts)
Ajoute un script au 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.