pub struct Layer { /* private fields */ }
Available on crate features
experimental
and LayerTree
and DOM
only.Expand description
Information about a compositing layer.
Implementations§
Source§impl Layer
impl Layer
pub fn builder() -> LayerBuilder
Sourcepub fn parent_layer_id(&self) -> Option<&LayerId>
pub fn parent_layer_id(&self) -> Option<&LayerId>
The id of parent (not present for root).
Sourcepub fn backend_node_id(&self) -> Option<&BackendNodeId>
pub fn backend_node_id(&self) -> Option<&BackendNodeId>
The backend id for the node associated with this layer.
Sourcepub fn transform(&self) -> Option<&Vec<f64>>
pub fn transform(&self) -> Option<&Vec<f64>>
Transformation matrix for layer, default is identity matrix
Sourcepub fn anchor_x(&self) -> Option<&f64>
pub fn anchor_x(&self) -> Option<&f64>
Transform anchor point X, absent if no transform specified
Sourcepub fn anchor_y(&self) -> Option<&f64>
pub fn anchor_y(&self) -> Option<&f64>
Transform anchor point Y, absent if no transform specified
Sourcepub fn anchor_z(&self) -> Option<&f64>
pub fn anchor_z(&self) -> Option<&f64>
Transform anchor point Z, absent if no transform specified
Sourcepub fn paint_count(&self) -> u32
pub fn paint_count(&self) -> u32
Indicates how many time this layer has painted.
Sourcepub fn draws_content(&self) -> bool
pub fn draws_content(&self) -> bool
Indicates whether this layer hosts any content, rather than being used for transform/scrolling purposes only.
Sourcepub fn scroll_rects(&self) -> Option<&Vec<ScrollRect>>
pub fn scroll_rects(&self) -> Option<&Vec<ScrollRect>>
Rectangles scrolling on main thread only.
Sourcepub fn sticky_position_constraint(&self) -> Option<&StickyPositionConstraint>
pub fn sticky_position_constraint(&self) -> Option<&StickyPositionConstraint>
Sticky position constraint information
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Layer
impl<'de> Deserialize<'de> for Layer
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Layer
impl RefUnwindSafe for Layer
impl Send for Layer
impl Sync for Layer
impl Unpin for Layer
impl UnwindSafe 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