pub enum UserValue {
None,
DateTime(NaiveDateTime),
Time(NaiveTime),
Duration(Duration),
Text(String),
Number(f64),
Bool(bool),
Files(Vec<PathBuf>),
Notes(Vec<Note>),
Table(TableData),
GeoPos(GeoPos),
PlotRegions(Vec<PlotRegion>),
}Variants§
None
DateTime(NaiveDateTime)
Time(NaiveTime)
Duration(Duration)
Text(String)
Number(f64)
Bool(bool)
Files(Vec<PathBuf>)
Notes(Vec<Note>)
Table(TableData)
GeoPos(GeoPos)
PlotRegions(Vec<PlotRegion>)
Implementations§
Source§impl UserValue
impl UserValue
pub fn string_mut(&mut self) -> &mut String
pub fn number_mut(&mut self, fallback: f64) -> &mut f64
pub fn bool_mut(&mut self, fallback: bool) -> &mut bool
pub fn files_mut( &mut self, fallback: impl FnOnce() -> Vec<PathBuf>, ) -> &mut Vec<PathBuf>
pub fn notes_mut( &mut self, fallback: impl FnOnce() -> Vec<Note>, ) -> &mut Vec<Note>
pub fn table_mut( &mut self, fallback: impl FnOnce() -> TableData, ) -> &mut TableData
pub fn geo_pos_mut(&mut self, fallback: impl FnOnce() -> GeoPos) -> &mut GeoPos
pub fn as_bool(&self) -> Option<bool>
pub fn as_table(&self) -> Option<&TableData>
pub fn as_str(&self) -> Option<Cow<'_, str>>
pub fn as_date_time(&self) -> Option<NaiveDateTime>
pub fn as_time(&self) -> Option<NaiveTime>
pub fn as_geo_pos(&self) -> Option<GeoPos>
pub fn as_plot_regions(&self) -> Option<&[PlotRegion]>
pub fn insert_string(&mut self, value: String) -> &mut String
pub fn insert_number(&mut self, value: f64) -> &mut f64
pub fn insert_bool(&mut self, value: bool) -> &mut bool
pub fn insert_files(&mut self, value: Vec<PathBuf>) -> &mut Vec<PathBuf>
pub fn insert_notes(&mut self, value: Vec<Note>) -> &mut Vec<Note>
pub fn insert_table(&mut self, value: TableData) -> &mut TableData
pub fn insert_datetime(&mut self, value: NaiveDateTime) -> &mut NaiveDateTime
pub fn insert_time(&mut self, value: NaiveTime) -> &mut NaiveTime
pub fn insert_geo_pos(&mut self, value: GeoPos) -> &mut GeoPos
Trait Implementations§
Source§impl<'de> Deserialize<'de> for UserValue
impl<'de> Deserialize<'de> for UserValue
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<NaiveDateTime> for UserValue
impl From<NaiveDateTime> for UserValue
Source§fn from(value: NaiveDateTime) -> Self
fn from(value: NaiveDateTime) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for UserValue
Auto Trait Implementations§
impl Freeze for UserValue
impl !RefUnwindSafe for UserValue
impl Send for UserValue
impl Sync for UserValue
impl Unpin for UserValue
impl UnsafeUnpin for UserValue
impl !UnwindSafe for UserValue
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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