pub struct Layer {Show 16 fields
pub layer_id: LayerId,
pub parent_layer_id: Option<LayerId>,
pub backend_node_id: Option<BackendNodeId>,
pub offset_x: f64,
pub offset_y: f64,
pub width: f64,
pub height: f64,
pub transform: Option<Vec<f64>>,
pub anchor_x: Option<f64>,
pub anchor_y: Option<f64>,
pub anchor_z: Option<f64>,
pub paint_count: i64,
pub draws_content: bool,
pub invisible: Option<bool>,
pub scroll_rects: Option<Vec<ScrollRect>>,
pub sticky_position_constraint: Option<StickyPositionConstraint>,
}
Expand description
Information about a compositing layer. Layer
Fields§
§layer_id: LayerId
The unique id for this layer.
parent_layer_id: Option<LayerId>
The id of parent (not present for root).
backend_node_id: Option<BackendNodeId>
The backend id for the node associated with this layer.
offset_x: f64
Offset from parent layer, X coordinate.
offset_y: f64
Offset from parent layer, Y coordinate.
width: f64
Layer width.
height: f64
Layer height.
transform: Option<Vec<f64>>
Transformation matrix for layer, default is identity matrix
anchor_x: Option<f64>
Transform anchor point X, absent if no transform specified
anchor_y: Option<f64>
Transform anchor point Y, absent if no transform specified
anchor_z: Option<f64>
Transform anchor point Z, absent if no transform specified
paint_count: i64
Indicates how many time this layer has painted.
draws_content: bool
Indicates whether this layer hosts any content, rather than being used for transform/scrolling purposes only.
invisible: Option<bool>
Set if layer is not visible.
scroll_rects: Option<Vec<ScrollRect>>
Rectangles scrolling on main thread only.
sticky_position_constraint: Option<StickyPositionConstraint>
Sticky position constraint information
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Layer
impl<'de> Deserialize<'de> for Layer
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Layer, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Layer, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for Layer
impl Serialize for Layer
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Layer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more