pub struct SlackChartAxisConfig {
pub categories: Vec<String>,
pub x_label: Option<String>,
pub y_label: Option<String>,
}Expand description
categories defines the valid data-point labels and their x-axis order.
Fields§
§categories: Vec<String>§x_label: Option<String>§y_label: Option<String>Implementations§
Source§impl SlackChartAxisConfig
impl SlackChartAxisConfig
Sourcepub fn new(categories: Vec<String>) -> Self
pub fn new(categories: Vec<String>) -> Self
Creates a new SlackChartAxisConfig from its required fields. Option fields start as None, and fields with #[default] take their default.
Sourcepub fn categories(&mut self, value: Vec<String>) -> &mut Self
pub fn categories(&mut self, value: Vec<String>) -> &mut Self
Sets categories to value.
Sourcepub fn with_categories(self, value: Vec<String>) -> Self
pub fn with_categories(self, value: Vec<String>) -> Self
Returns self with categories set to value.
Sourcepub fn reset_x_label(&mut self) -> &mut Self
pub fn reset_x_label(&mut self) -> &mut Self
Sets x_label to None.
Sourcepub fn mopt_x_label(&mut self, value: Option<String>) -> &mut Self
pub fn mopt_x_label(&mut self, value: Option<String>) -> &mut Self
Sets x_label to the given Option.
Sourcepub fn with_x_label(self, value: String) -> Self
pub fn with_x_label(self, value: String) -> Self
Returns self with x_label set to Some(value).
Sourcepub fn without_x_label(self) -> Self
pub fn without_x_label(self) -> Self
Returns self with x_label set to None.
Sourcepub fn opt_x_label(self, value: Option<String>) -> Self
pub fn opt_x_label(self, value: Option<String>) -> Self
Returns self with x_label set to the given Option.
Sourcepub fn reset_y_label(&mut self) -> &mut Self
pub fn reset_y_label(&mut self) -> &mut Self
Sets y_label to None.
Sourcepub fn mopt_y_label(&mut self, value: Option<String>) -> &mut Self
pub fn mopt_y_label(&mut self, value: Option<String>) -> &mut Self
Sets y_label to the given Option.
Sourcepub fn with_y_label(self, value: String) -> Self
pub fn with_y_label(self, value: String) -> Self
Returns self with y_label set to Some(value).
Sourcepub fn without_y_label(self) -> Self
pub fn without_y_label(self) -> Self
Returns self with y_label set to None.
Sourcepub fn opt_y_label(self, value: Option<String>) -> Self
pub fn opt_y_label(self, value: Option<String>) -> Self
Returns self with y_label set to the given Option.
Trait Implementations§
Source§impl Clone for SlackChartAxisConfig
impl Clone for SlackChartAxisConfig
Source§impl Debug for SlackChartAxisConfig
impl Debug for SlackChartAxisConfig
Source§impl<'de> Deserialize<'de> for SlackChartAxisConfig
impl<'de> Deserialize<'de> for SlackChartAxisConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<SlackChartAxisConfigInit> for SlackChartAxisConfig
impl From<SlackChartAxisConfigInit> for SlackChartAxisConfig
Source§fn from(value: SlackChartAxisConfigInit) -> Self
fn from(value: SlackChartAxisConfigInit) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SlackChartAxisConfig
impl PartialEq for SlackChartAxisConfig
Source§impl Serialize for SlackChartAxisConfig
impl Serialize for SlackChartAxisConfig
impl StructuralPartialEq for SlackChartAxisConfig
Auto Trait Implementations§
impl Freeze for SlackChartAxisConfig
impl RefUnwindSafe for SlackChartAxisConfig
impl Send for SlackChartAxisConfig
impl Sync for SlackChartAxisConfig
impl Unpin for SlackChartAxisConfig
impl UnsafeUnpin for SlackChartAxisConfig
impl UnwindSafe for SlackChartAxisConfig
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