#[non_exhaustive]pub struct Marker {
pub shape: RwSignal<MarkerShape>,
pub colour: RwSignal<Option<Colour>>,
pub scale: RwSignal<f64>,
pub border: RwSignal<Option<Colour>>,
pub border_width: RwSignal<f64>,
}Expand description
Describes a line point marker.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.shape: RwSignal<MarkerShape>Shape of the marker. Default is no marker.
colour: RwSignal<Option<Colour>>Colour of the marker. Default is line colour.
scale: RwSignal<f64>Size relative to the line width. Default is 1.0.
border: RwSignal<Option<Colour>>Colour of the border. Set to the same as the background to separate the marker from the line. Default is the line colour.
border_width: RwSignal<f64>Width of the border. Zero removes the border. Default is zero.
Implementations§
Source§impl Marker
impl Marker
Sourcepub fn from_shape(shape: impl Into<MarkerShape>) -> Self
pub fn from_shape(shape: impl Into<MarkerShape>) -> Self
Create a new marker with the given shape.
Sourcepub fn with_colour(self, colour: impl Into<Option<Colour>>) -> Self
pub fn with_colour(self, colour: impl Into<Option<Colour>>) -> Self
Set the colour of the marker. Default is line colour.
Sourcepub fn with_scale(self, scale: impl Into<f64>) -> Self
pub fn with_scale(self, scale: impl Into<f64>) -> Self
Set the size of the marker relative to the line width. Default is 1.0.
Sourcepub fn with_border(self, border: impl Into<Option<Colour>>) -> Self
pub fn with_border(self, border: impl Into<Option<Colour>>) -> Self
Set the colour of the marker border. Set to the same as the background to separate the marker from the line. Default is white.
Sourcepub fn with_border_width(self, border_width: impl Into<f64>) -> Self
pub fn with_border_width(self, border_width: impl Into<f64>) -> Self
Set the width of the marker border. Set to zero to remove the border. Default is zero.
Trait Implementations§
Source§impl From<MarkerShape> for Marker
impl From<MarkerShape> for Marker
Source§fn from(shape: MarkerShape) -> Self
fn from(shape: MarkerShape) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Marker
Auto Trait Implementations§
impl Freeze for Marker
impl RefUnwindSafe for Marker
impl Send for Marker
impl Sync for Marker
impl Unpin for Marker
impl UnwindSafe for Marker
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§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 moreSource§impl<El, T, Marker> IntoElementMaybeSignal<T, Marker> for Elwhere
El: IntoElementMaybeSignalType<T, Marker>,
Marker: ?Sized,
impl<El, T, Marker> IntoElementMaybeSignal<T, Marker> for Elwhere
El: IntoElementMaybeSignalType<T, Marker>,
Marker: ?Sized,
fn into_element_maybe_signal(self) -> ElementMaybeSignal<T>
Source§impl<T, Js> IntoElementMaybeSignalType<T, Element> for Js
impl<T, Js> IntoElementMaybeSignalType<T, Element> for Js
fn into_element_maybe_signal_type(self) -> ElementMaybeSignalType<T>
Source§impl<El, T, Marker> IntoElementsMaybeSignal<T, Marker> for Elwhere
El: IntoElementsMaybeSignalType<T, Marker>,
Marker: ?Sized,
impl<El, T, Marker> IntoElementsMaybeSignal<T, Marker> for Elwhere
El: IntoElementsMaybeSignalType<T, Marker>,
Marker: ?Sized,
fn into_elements_maybe_signal(self) -> ElementsMaybeSignal<T>
Source§impl<T, Js> IntoElementsMaybeSignalType<T, Element> for Js
impl<T, Js> IntoElementsMaybeSignalType<T, Element> for Js
fn into_elements_maybe_signal_type(self) -> ElementsMaybeSignalType<T>
Source§impl<T> SerializableKey for T
impl<T> SerializableKey for T
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.