pub struct LayerTree {Show 29 fields
pub key: String,
pub background_color: Option<(PaintColor, Option<Transition>)>,
pub border_color: Option<(Color, Option<Transition>)>,
pub border_width: Option<(f32, Option<Transition>)>,
pub border_style: Option<BorderStyle>,
pub border_corner_radius: Option<(BorderRadius, Option<Transition>)>,
pub size: Option<(Size, Option<Transition>)>,
pub position: Option<(Point, Option<Transition>)>,
pub anchor_point: Option<(Point, Option<Transition>)>,
pub scale: Option<(Point, Option<Transition>)>,
pub shadow_offset: Option<(Point, Option<Transition>)>,
pub shadow_radius: Option<(f32, Option<Transition>)>,
pub shadow_color: Option<(Color, Option<Transition>)>,
pub shadow_spread: Option<(f32, Option<Transition>)>,
pub content: Option<ContentDrawFunction>,
pub blend_mode: Option<BlendMode>,
pub layout_style: Option<Style>,
pub opacity: Option<(f32, Option<Transition>)>,
pub image_cache: Option<bool>,
pub pointer_events: Option<bool>,
pub on_pointer_move: Option<PointerHandlerFunction>,
pub on_pointer_in: Option<PointerHandlerFunction>,
pub on_pointer_out: Option<PointerHandlerFunction>,
pub on_pointer_press: Option<PointerHandlerFunction>,
pub on_pointer_release: Option<PointerHandlerFunction>,
pub children: Option<Vec<Arc<dyn RenderLayerTree>>>,
pub replicate_node: Option<NodeRef>,
pub clip_content: Option<bool>,
pub clip_children: Option<bool>,
}Expand description
A struct that represents a definition of a layer hierearchy that can be rendered by the engine into layers key value is used to optimize the rendering of the layer by reusing the layer when the key is the same
Fields§
§key: String§background_color: Option<(PaintColor, Option<Transition>)>§border_color: Option<(Color, Option<Transition>)>§border_width: Option<(f32, Option<Transition>)>§border_style: Option<BorderStyle>§border_corner_radius: Option<(BorderRadius, Option<Transition>)>§size: Option<(Size, Option<Transition>)>§position: Option<(Point, Option<Transition>)>§anchor_point: Option<(Point, Option<Transition>)>§scale: Option<(Point, Option<Transition>)>§shadow_offset: Option<(Point, Option<Transition>)>§shadow_radius: Option<(f32, Option<Transition>)>§shadow_color: Option<(Color, Option<Transition>)>§shadow_spread: Option<(f32, Option<Transition>)>§content: Option<ContentDrawFunction>§blend_mode: Option<BlendMode>§layout_style: Option<Style>§opacity: Option<(f32, Option<Transition>)>§image_cache: Option<bool>§pointer_events: Option<bool>§on_pointer_move: Option<PointerHandlerFunction>§on_pointer_in: Option<PointerHandlerFunction>§on_pointer_out: Option<PointerHandlerFunction>§on_pointer_press: Option<PointerHandlerFunction>§on_pointer_release: Option<PointerHandlerFunction>§children: Option<Vec<Arc<dyn RenderLayerTree>>>The children of the layer tree are elements that can render a layertree
replicate_node: Option<NodeRef>§clip_content: Option<bool>§clip_children: Option<bool>Trait Implementations§
source§impl RenderLayerTree for LayerTree
impl RenderLayerTree for LayerTree
A layertree renders itself into a layertree
impl Eq for LayerTree
Auto Trait Implementations§
impl Freeze for LayerTree
impl !RefUnwindSafe for LayerTree
impl !Send for LayerTree
impl !Sync for LayerTree
impl Unpin for LayerTree
impl !UnwindSafe for LayerTree
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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