Skip to main content

ToLayoutOptional

Trait ToLayoutOptional 

Source
pub(crate) trait ToLayoutOptional<'dom, T: DomObject> {
    // Required method
    unsafe fn to_layout(&self) -> Option<LayoutDom<'dom, T>>;
}

Required Methods§

Source

unsafe fn to_layout(&self) -> Option<LayoutDom<'dom, T>>

Retrieve a copy of the inner optional Dom<T> as LayoutDom<T>. For use by layout, which can’t use safe types like Temporary.

§Safety

The return value holds a Rust reference to the underlying data, which should be safe as long as unsafe is not used to override the lifetime in some way.

  • The caller must not modify the underlying DOM object via non-layout handles.
  • The caller must ensure that garbage collection does not occur while the LayoutDom handle is alive.

Implementors§

Source§

impl<'dom, T: DomObject> ToLayoutOptional<'dom, T> for MutNullableDom<T>