pub(crate) trait ToLayoutOptional<'dom, T: DomObject> {
// Required method
unsafe fn to_layout(&self) -> Option<LayoutDom<'dom, T>>;
}Required Methods§
Sourceunsafe fn to_layout(&self) -> Option<LayoutDom<'dom, T>>
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
LayoutDomhandle is alive.