pub struct AxisTheme { /* private fields */ }Expand description
Complete coordinate/cell frame, tick, grid and local spacing appearance.
Implementations§
Source§impl AxisTheme
impl AxisTheme
Sourcepub fn new(
frame: Option<FrameTheme>,
cell_frame: Option<FrameTheme>,
ticks: Option<TickTheme>,
grid: Option<StrokeTheme>,
spacing: AxisSpacing,
) -> Result<AxisTheme, Error>
pub fn new( frame: Option<FrameTheme>, cell_frame: Option<FrameTheme>, ticks: Option<TickTheme>, grid: Option<StrokeTheme>, spacing: AxisSpacing, ) -> Result<AxisTheme, Error>
Construct complete axis chrome, using None for absent frame/ticks/grid.
Sourcepub fn get_frame(&self) -> Option<&FrameTheme>
pub fn get_frame(&self) -> Option<&FrameTheme>
Borrow the optional ordinary coordinate frame.
Sourcepub fn get_cell_frame(&self) -> Option<&FrameTheme>
pub fn get_cell_frame(&self) -> Option<&FrameTheme>
Borrow the independent optional variable-grid cell frame.
Sourcepub fn get_grid(&self) -> Option<&StrokeTheme>
pub fn get_grid(&self) -> Option<&StrokeTheme>
Borrow the optional grid stroke.
Sourcepub fn get_spacing(&self) -> &AxisSpacing
pub fn get_spacing(&self) -> &AxisSpacing
Borrow all independent exact axis relationships.
Sourcepub fn frame(self, frame: Option<FrameTheme>) -> Result<AxisTheme, Error>
pub fn frame(self, frame: Option<FrameTheme>) -> Result<AxisTheme, Error>
Replace only the optional coordinate frame.
Sourcepub fn cell_frame(
self,
cell_frame: Option<FrameTheme>,
) -> Result<AxisTheme, Error>
pub fn cell_frame( self, cell_frame: Option<FrameTheme>, ) -> Result<AxisTheme, Error>
Replace only the optional variable-grid cell frame.
Sourcepub fn ticks(self, ticks: Option<TickTheme>) -> Result<AxisTheme, Error>
pub fn ticks(self, ticks: Option<TickTheme>) -> Result<AxisTheme, Error>
Replace only the optional tick appearance.
Trait Implementations§
impl StructuralPartialEq for AxisTheme
Auto Trait Implementations§
impl Forget for AxisTheme
impl Freeze for AxisTheme
impl Move for AxisTheme
impl RefUnwindSafe for AxisTheme
impl Send for AxisTheme
impl Sync for AxisTheme
impl Unpin for AxisTheme
impl UnsafeUnpin for AxisTheme
impl UnwindSafe for AxisTheme
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.