pub struct Value {
pub inner: ValueInner,
pub metadata: Metadata,
}
Fields§
§inner: ValueInner
§metadata: Metadata
Implementations§
source§impl Value
impl Value
Constructors
pub fn new(val: ValueInner) -> Self
pub fn flag() -> Self
pub fn datetime(datetime: DateTime<Utc>, tz: Option<Tz>) -> Self
pub fn duration(duration: Duration) -> Self
pub fn icon<S>(name: S) -> Self
pub fn icon_progression<S>(name: S, value: f64) -> Self
pub fn icon_progression_bound<S>( name: S, value: f64, low: f64, high: f64, ) -> Self
pub fn text(text: String) -> Self
pub fn number_unit(val: impl IntoF64, unit: Unit) -> Self
pub fn bytes(val: impl IntoF64) -> Self
pub fn bits(val: impl IntoF64) -> Self
pub fn percents(val: impl IntoF64) -> Self
pub fn degrees(val: impl IntoF64) -> Self
pub fn seconds(val: impl IntoF64) -> Self
pub fn watts(val: impl IntoF64) -> Self
pub fn hertz(val: impl IntoF64) -> Self
pub fn number(val: impl IntoF64) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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