pub(crate) trait ToLayout<'dom, T: DomObject> {
// Required method
unsafe fn to_layout(&self) -> LayoutDom<'dom, T>;
}Required Methods§
Sourceunsafe fn to_layout(&self) -> LayoutDom<'dom, T>
unsafe fn to_layout(&self) -> LayoutDom<'dom, T>
Get a reference to the contents of this smart pointer as a LayoutDom,
for use during layout. Note that this should only be called in the course
of layout.
§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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".