pub struct Layer {
pub origin: Origin,
pub kind: LayerKind,
pub rect: Rect,
/* private fields */
}Expand description
One document placed in the window.
Fields§
§origin: OriginThe document’s trust context.
kind: LayerKindThe layer’s role.
rect: RectWhere the document sits in the window (computed from the parent for sub-documents, fixed otherwise).
Implementations§
Source§impl Layer
impl Layer
Sourcepub fn engine_mut(&mut self) -> &mut Engine
pub fn engine_mut(&mut self) -> &mut Engine
The document, to change in place. The change shows after the next
Host::layout.
Sourcepub fn styles(&self) -> &Styles
pub fn styles(&self) -> &Styles
The computed styles (populated by Host::layout).
Sourcepub fn layout(&self) -> &LayoutTree
pub fn layout(&self) -> &LayoutTree
The box tree (populated by Host::layout).
Sourcepub fn commands(&self) -> &CommandList
pub fn commands(&self) -> &CommandList
The layer’s paint commands (populated by Host::layout).
Sourcepub fn anchor(&self) -> Option<Anchor>
pub fn anchor(&self) -> Option<Anchor>
The sub-document anchor, if this layer is a sub-document.
Sourcepub fn max_scroll_y(&self) -> f32
pub fn max_scroll_y(&self) -> f32
The maximum vertical scroll for this layer (content height minus the viewport height, floored at zero).
Auto Trait Implementations§
impl !RefUnwindSafe for Layer
impl !UnwindSafe for Layer
impl Forget for Layer
impl Freeze for Layer
impl Move for Layer
impl Send for Layer
impl Sync for Layer
impl Unpin for Layer
impl UnsafeUnpin for Layer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more