Skip to main content

LayoutFromRaw

Trait LayoutFromRaw 

Source
pub(crate) unsafe trait LayoutFromRaw<'dom, T>
where T: DomObject,
{ // Required method fn from_raw(d: &'dom T) -> Self; }
Expand description

Trait that creates a specific struct from a raw DomObject. The implementer needs to be sure that this does not violate any lifetimes

§Safety

The dom object needs the lifetimes to be safe. Only [LayoutDom] should implement this.

Required Methods§

Source

fn from_raw(d: &'dom T) -> Self

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§

Source§

impl<'dom, T: DomObject> LayoutFromRaw<'dom, T> for LayoutDom<'dom, T>