pub enum PrimitiveValue {
}Variants§
Int8(i8)
Uint8(u8)
Int16(i16)
Int32(i32)
UInt16(u16)
UInt32(u32)
Int64(i64)
Float64(f64)
BigInt(BigInt)
Text(String)
Buffer(Vec<u8>)
Boolean(bool)
Quantity(Quantity)
Time(Time)
Endpoint(Endpoint)
Url(Url)
Null
Void
Implementations§
Source§impl PrimitiveValue
impl PrimitiveValue
pub fn to_string_colorized(&self) -> String
pub fn is_number(&self) -> bool
pub fn is_text(&self) -> bool
pub fn get_as_text(&self) -> &str
pub fn get_as_buffer(&self) -> Vec<u8> ⓘ
pub fn get_as_integer(&self) -> isize
pub fn get_as_unsigned_integer(&self) -> usize
pub fn get_as_float(&self) -> f64
pub fn to_key_string(&self) -> String
pub fn can_omit_quotes(&self) -> bool
Trait Implementations§
Source§impl Clone for PrimitiveValue
impl Clone for PrimitiveValue
Source§fn clone(&self) -> PrimitiveValue
fn clone(&self) -> PrimitiveValue
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for PrimitiveValue
impl Default for PrimitiveValue
Source§impl Display for PrimitiveValue
impl Display for PrimitiveValue
Source§impl Value for PrimitiveValue
impl Value for PrimitiveValue
fn to_string(&self) -> String
fn binary_operation( &self, code: BinaryCode, other: Box<dyn Value>, ) -> ValueResult
fn cast(&self, dx_type: Type) -> ValueResult
Auto Trait Implementations§
impl Freeze for PrimitiveValue
impl RefUnwindSafe for PrimitiveValue
impl Send for PrimitiveValue
impl Sync for PrimitiveValue
impl Unpin for PrimitiveValue
impl UnwindSafe for PrimitiveValue
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 more