pub struct Layer {
pub data: Option<DataFrame>,
pub mapping: Aes,
pub geom: Box<dyn Geom>,
pub stat: Box<dyn Stat>,
pub position: Box<dyn Position>,
pub params: GeomParams,
pub show_legend: Option<bool>,
pub explicit_style: bool,
pub tooltip_template: Option<String>,
pub key_glyph: Option<KeyGlyph>,
pub show_legend_aes: Vec<(Aesthetic, bool)>,
}Expand description
A single layer in the plot.
Fields§
§data: Option<DataFrame>§mapping: Aes§geom: Box<dyn Geom>§stat: Box<dyn Stat>§position: Box<dyn Position>§params: GeomParams§show_legend: Option<bool>§explicit_style: boolThe geom was configured explicitly (geom_*_with(...)), so its colours
are deliberate and the theme’s primary_color must not override them.
tooltip_template: Option<String>A {column} tooltip template (GGPlot::tooltip), rendered per row
from the built layer data (post-stat) once that’s available.
key_glyph: Option<KeyGlyph>Legend key override (GGPlot::key_glyph); None = the geom’s.
show_legend_aes: Vec<(Aesthetic, bool)>Per-aesthetic show.legend (GGPlot::show_legend_for).
Auto Trait Implementations§
impl !RefUnwindSafe for Layer
impl !UnwindSafe for Layer
impl Forget for Layer
impl Freeze for Layerwhere
*const u8 is !null: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<String, Vec<Value>>>: Freeze,
PhantomData<String>: Freeze,
PhantomData<AesMapping>: Freeze,
PhantomData<AfterScaleSpec>: Freeze,
*const dyn Geom is !null: Freeze,
PhantomData<dyn Geom>: Freeze,
*const dyn Stat is !null: Freeze,
PhantomData<dyn Stat>: Freeze,
*const dyn Position is !null: Freeze,
PhantomData<dyn Position>: Freeze,
PhantomData<(String, f64)>: Freeze,
PhantomData<u8>: Freeze,
PhantomData<(Aesthetic, bool)>: Freeze,
impl Move for Layer
impl Send for Layer
impl Sync for Layer
impl Unpin for Layer
impl UnsafeUnpin for Layerwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<String, Vec<Value>>>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<AesMapping>: UnsafeUnpin,
PhantomData<AfterScaleSpec>: UnsafeUnpin,
*const dyn Geom is !null: UnsafeUnpin,
PhantomData<dyn Geom>: UnsafeUnpin,
*const dyn Stat is !null: UnsafeUnpin,
PhantomData<dyn Stat>: UnsafeUnpin,
*const dyn Position is !null: UnsafeUnpin,
PhantomData<dyn Position>: UnsafeUnpin,
PhantomData<(String, f64)>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<(Aesthetic, bool)>: UnsafeUnpin,
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> 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