mysql_common::value

Enum Value

Source
pub enum Value {
    NULL,
    Bytes(Vec<u8>),
    Int(i64),
    UInt(u64),
    Float(f32),
    Double(f64),
    Date(u16, u8, u8, u8, u8, u8, u32),
    Time(bool, u32, u8, u8, u8, u32),
}
Expand description

Client side representation of a value of MySql column.

The Value is also used as a parameter to a prepared statement.

Variants§

§

NULL

§

Bytes(Vec<u8>)

§

Int(i64)

§

UInt(u64)

§

Float(f32)

§

Double(f64)

§

Date(u16, u8, u8, u8, u8, u8, u32)

year, month, day, hour, minutes, seconds, micro seconds

§

Time(bool, u32, u8, u8, u8, u32)

is negative, days, hours, minutes, seconds, micro seconds

Implementations§

Source§

impl Value

Source

pub fn bin_len(&self) -> u64

Returns length in binary serialized form.

Source

pub fn as_sql(&self, no_backslash_escape: bool) -> String

Trait Implementations§

Source§

impl Clone for Value

Source§

fn clone(&self) -> Value

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Value

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> From<&'a [u8]> for Value

Source§

fn from(x: &'a [u8]) -> Value

Converts to this type from the input type.
Source§

impl<'a, T: ToValue> From<&'a T> for Value

Source§

fn from(x: &'a T) -> Value

Converts to this type from the input type.
Source§

impl<'a> From<&'a str> for Value

Source§

fn from(x: &'a str) -> Value

Converts to this type from the input type.
Source§

impl<const N: usize> From<[u8; N]> for Value

Source§

fn from(x: [u8; N]) -> Value

Converts to this type from the input type.
Source§

impl From<Arc<[u8]>> for Value

Source§

fn from(x: Arc<[u8]>) -> Value

Converts to this type from the input type.
Source§

impl From<Arc<str>> for Value

Source§

fn from(x: Arc<str>) -> Value

Converts to this type from the input type.
Source§

impl From<BigDecimal> for Value

Available on crate feature bigdecimal only.
Source§

fn from(big_decimal: BigDecimal) -> Value

Converts to this type from the input type.
Source§

impl From<BigInt> for Value

Source§

fn from(x: BigInt) -> Value

Converts to this type from the input type.
Source§

impl From<BigUint> for Value

Source§

fn from(x: BigUint) -> Value

Converts to this type from the input type.
Source§

impl From<Box<[u8]>> for Value

Source§

fn from(x: Box<[u8]>) -> Value

Converts to this type from the input type.
Source§

impl From<Box<str>> for Value

Source§

fn from(x: Box<str>) -> Value

Converts to this type from the input type.
Source§

impl<'a, T: ToOwned> From<Cow<'a, T>> for Value
where T::Owned: Into<Value>, &'a T: Into<Value>,

Source§

fn from(x: Cow<'a, T>) -> Value

Converts to this type from the input type.
Source§

impl From<Date> for Value

Available on crate feature time only.
Source§

fn from(x: Date) -> Value

Converts to this type from the input type.
Source§

impl From<Decimal> for Value

Available on crate feature rust_decimal only.
Source§

fn from(decimal: Decimal) -> Value

Converts to this type from the input type.
Source§

impl From<Duration> for Value

Available on crate feature time only.
Source§

fn from(x: Duration) -> Value

Converts to this type from the input type.
Source§

impl From<Duration> for Value

Source§

fn from(x: Duration) -> Value

Converts to this type from the input type.
Source§

impl From<NaiveDate> for Value

Available on crate feature chrono only.
Source§

fn from(x: NaiveDate) -> Value

Converts to this type from the input type.
Source§

impl From<NaiveDateTime> for Value

Available on crate feature chrono only.
Source§

fn from(x: NaiveDateTime) -> Value

Converts to this type from the input type.
Source§

impl From<NaiveTime> for Value

Available on crate feature chrono only.
Source§

fn from(x: NaiveTime) -> Value

Converts to this type from the input type.
Source§

impl<T: Into<Value>> From<Option<T>> for Value

Source§

fn from(x: Option<T>) -> Value

Converts to this type from the input type.
Source§

impl<T: FromValue> From<OptionIr2<T>> for Value
where <T as FromValue>::Intermediate: Into<Value>,

Source§

fn from(ir: OptionIr2<T>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIr<BigDecimal>> for Value

Available on crate feature bigdecimal only.
Source§

fn from(value: ParseIr<BigDecimal>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIr<BigInt>> for Value

Source§

fn from(value: ParseIr<BigInt>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIr<BigUint>> for Value

Source§

fn from(value: ParseIr<BigUint>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIr<Date>> for Value

Available on crate feature time only.
Source§

fn from(value: ParseIr<Date>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIr<Decimal>> for Value

Available on crate feature rust_decimal only.
Source§

fn from(value: ParseIr<Decimal>) -> Self

Converts to this type from the input type.
Source§

impl<T: DeserializeOwned> From<ParseIr<Deserialized<T>>> for Value

Source§

fn from(value: ParseIr<Deserialized<T>>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIr<Duration>> for Value

Available on crate feature time only.
Source§

fn from(value: ParseIr<Duration>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIr<NaiveDate>> for Value

Available on crate feature chrono only.
Source§

fn from(value: ParseIr<NaiveDate>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIr<NaiveDateTime>> for Value

Available on crate feature chrono only.
Source§

fn from(value: ParseIr<NaiveDateTime>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIr<NaiveTime>> for Value

Available on crate feature chrono only.
Source§

fn from(value: ParseIr<NaiveTime>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIr<PrimitiveDateTime>> for Value

Available on crate feature time only.
Source§

fn from(value: ParseIr<PrimitiveDateTime>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIr<Time>> for Value

Available on crate feature time only.
Source§

fn from(value: ParseIr<Time>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIr<Uuid>> for Value

Source§

fn from(value: ParseIr<Uuid>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIr<Value>> for Value

Source§

fn from(value: ParseIr<Json>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<Duration>> for Value

Source§

fn from(value: ParseIrOpt<Duration>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<bool>> for Value

Source§

fn from(value: ParseIrOpt<bool>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<f32>> for Value

Source§

fn from(value: ParseIrOpt<f32>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<f64>> for Value

Source§

fn from(value: ParseIrOpt<f64>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<i128>> for Value

Source§

fn from(value: ParseIrOpt<i128>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<i16>> for Value

Source§

fn from(value: ParseIrOpt<i16>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<i32>> for Value

Source§

fn from(value: ParseIrOpt<i32>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<i64>> for Value

Source§

fn from(value: ParseIrOpt<i64>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<i8>> for Value

Source§

fn from(value: ParseIrOpt<i8>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<isize>> for Value

Source§

fn from(value: ParseIrOpt<isize>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<u128>> for Value

Source§

fn from(value: ParseIrOpt<u128>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<u16>> for Value

Source§

fn from(value: ParseIrOpt<u16>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<u32>> for Value

Source§

fn from(value: ParseIrOpt<u32>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<u64>> for Value

Source§

fn from(value: ParseIrOpt<u64>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<u8>> for Value

Source§

fn from(value: ParseIrOpt<u8>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIrOpt<usize>> for Value

Source§

fn from(value: ParseIrOpt<usize>) -> Self

Converts to this type from the input type.
Source§

impl From<PrimitiveDateTime> for Value

Available on crate feature time only.
Source§

fn from(x: PrimitiveDateTime) -> Value

Converts to this type from the input type.
Source§

impl From<Rc<[u8]>> for Value

Source§

fn from(x: Rc<[u8]>) -> Value

Converts to this type from the input type.
Source§

impl From<Rc<str>> for Value

Source§

fn from(x: Rc<str>) -> Value

Converts to this type from the input type.
Source§

impl<T: Serialize> From<Serialized<T>> for Value

Source§

fn from(x: Serialized<T>) -> Value

Converts to this type from the input type.
Source§

impl From<String> for Value

Source§

fn from(x: String) -> Value

Converts to this type from the input type.
Source§

impl From<Time> for Value

Available on crate feature time only.
Source§

fn from(x: Time) -> Value

Converts to this type from the input type.
Source§

impl From<Uuid> for Value

Source§

fn from(uuid: Uuid) -> Value

Converts to this type from the input type.
Source§

impl From<Value> for Value

Source§

fn from(x: Json) -> Value

Converts to this type from the input type.
Source§

impl From<ValueIr> for Value

Source§

fn from(value: ValueIr) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<u8>> for Value

Source§

fn from(x: Vec<u8>) -> Value

Converts to this type from the input type.
Source§

impl From<bool> for Value

Source§

fn from(x: bool) -> Value

Converts to this type from the input type.
Source§

impl From<f32> for Value

Source§

fn from(x: f32) -> Value

Converts to this type from the input type.
Source§

impl From<f64> for Value

Source§

fn from(x: f64) -> Value

Converts to this type from the input type.
Source§

impl From<i128> for Value

Source§

fn from(x: i128) -> Value

Converts to this type from the input type.
Source§

impl From<i16> for Value

Source§

fn from(x: i16) -> Value

Converts to this type from the input type.
Source§

impl From<i32> for Value

Source§

fn from(x: i32) -> Value

Converts to this type from the input type.
Source§

impl From<i64> for Value

Source§

fn from(x: i64) -> Value

Converts to this type from the input type.
Source§

impl From<i8> for Value

Source§

fn from(x: i8) -> Value

Converts to this type from the input type.
Source§

impl From<isize> for Value

Source§

fn from(x: isize) -> Value

Converts to this type from the input type.
Source§

impl From<u128> for Value

Source§

fn from(x: u128) -> Value

Converts to this type from the input type.
Source§

impl From<u16> for Value

Source§

fn from(x: u16) -> Value

Converts to this type from the input type.
Source§

impl From<u32> for Value

Source§

fn from(x: u32) -> Value

Converts to this type from the input type.
Source§

impl From<u64> for Value

Source§

fn from(x: u64) -> Value

Converts to this type from the input type.
Source§

impl From<u8> for Value

Source§

fn from(x: u8) -> Value

Converts to this type from the input type.
Source§

impl From<usize> for Value

Source§

fn from(x: usize) -> Value

Converts to this type from the input type.
Source§

impl FromValue for Value

Source§

type Intermediate = ValueIr

Source§

fn from_value(v: Value) -> Self

Will panic if could not convert v to Self.
Source§

fn from_value_opt(v: Value) -> Result<Self, FromValueError>

Will return Err(Error::FromValueError(v)) if could not convert v to Self.
Source§

fn get_intermediate(v: Value) -> Result<Self::Intermediate, FromValueError>

Will return Err(Error::FromValueError(v)) if v is not convertible to Self.
Source§

impl MySerialize for Value

Source§

fn serialize(&self, buf: &mut Vec<u8>)

Serializes self into the buf.
Source§

impl PartialEq for Value

Source§

fn eq(&self, other: &Value) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Value

Source§

fn partial_cmp(&self, other: &Value) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a> TryFrom<BinlogValue<'a>> for Value

Available on crate feature binlog only.
Source§

type Error = BinlogValueToValueError

The type returned in the event of a conversion error.
Source§

fn try_from(value: BinlogValue<'a>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<const N: usize> TryFrom<Value> for [u8; N]

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for Arc<[u8]>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for Arc<str>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for Box<[u8]>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for Box<str>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for Cow<'static, [u8]>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for Cow<'static, str>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<T: FromValue> TryFrom<Value> for OptionIr2<T>

Source§

type Error = <<T as FromValue>::Intermediate as TryFrom<Value>>::Error

The type returned in the event of a conversion error.
Source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIr<BigDecimal>

Available on crate feature bigdecimal only.
Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIr<BigInt>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIr<BigUint>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIr<Date>

Available on crate feature time only.
Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIr<Decimal>

Available on crate feature rust_decimal only.
Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<T: DeserializeOwned> TryFrom<Value> for ParseIr<Deserialized<T>>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIr<Duration>

Available on crate feature time only.
Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIr<NaiveDate>

Available on crate feature chrono only.
Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIr<NaiveDateTime>

Available on crate feature chrono only.
Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIr<NaiveTime>

Available on crate feature chrono only.
Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIr<PrimitiveDateTime>

Available on crate feature time only.
Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIr<Time>

Available on crate feature time only.
Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIr<Uuid>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIr<Value>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<Duration>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<bool>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<f32>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<f64>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<i128>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<i16>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<i32>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<i64>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<i8>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<isize>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<u128>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<u16>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<u32>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<u64>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<u8>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ParseIrOpt<usize>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for Rc<[u8]>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for Rc<str>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for String

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for ValueIr

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Value> for Vec<u8>

Source§

type Error = FromValueError

The type returned in the event of a conversion error.
Source§

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl StructuralPartialEq for Value

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRow for T
where T: FromValue,

Source§

fn from_row_opt(row: Row) -> Result<T, FromRowError>

Source§

fn from_row(row: Row) -> Self
where Self: Sized,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pipe for T
where T: ?Sized,

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
Source§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
Source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToValue for T
where T: Into<Value> + Clone,

Source§

fn to_value(&self) -> Value

Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V