Enum quaint::ast::Value

source ·
pub enum Value<'a> {
Show 17 variants Int32(Option<i32>), Int64(Option<i64>), Float(Option<f32>), Double(Option<f64>), Text(Option<Cow<'a, str>>), Enum(Option<Cow<'a, str>>), Bytes(Option<Cow<'a, [u8]>>), Boolean(Option<bool>), Char(Option<char>), Array(Option<Vec<Value<'a>>>), Numeric(Option<BigDecimal>), Json(Option<Value>), Xml(Option<Cow<'a, str>>), Uuid(Option<Uuid>), DateTime(Option<DateTime<Utc>>), Date(Option<NaiveDate>), Time(Option<NaiveTime>),
}
Expand description

A value we must parameterize for the prepared statement. Null values should be defined by their corresponding type variants with a None value for best compatibility.

Variants§

§

Int32(Option<i32>)

32-bit signed integer.

§

Int64(Option<i64>)

64-bit signed integer.

§

Float(Option<f32>)

32-bit floating point.

§

Double(Option<f64>)

64-bit floating point.

§

Text(Option<Cow<'a, str>>)

String value.

§

Enum(Option<Cow<'a, str>>)

Database enum value.

§

Bytes(Option<Cow<'a, [u8]>>)

Bytes value.

§

Boolean(Option<bool>)

Boolean value.

§

Char(Option<char>)

A single character.

§

Array(Option<Vec<Value<'a>>>)

An array value (PostgreSQL).

§

Numeric(Option<BigDecimal>)

Available on crate feature bigdecimal only.

A numeric value.

§

Json(Option<Value>)

Available on crate feature json only.

A JSON value.

§

Xml(Option<Cow<'a, str>>)

A XML value.

§

Uuid(Option<Uuid>)

Available on crate feature uuid only.

An UUID value.

§

DateTime(Option<DateTime<Utc>>)

Available on crate feature chrono only.

A datetime value.

§

Date(Option<NaiveDate>)

Available on crate feature chrono only.

A date value.

§

Time(Option<NaiveTime>)

Available on crate feature chrono only.

A time value.

Implementations§

source§

impl<'a> Value<'a>

source

pub fn int32<I>(value: I) -> Selfwhere I: Into<i32>,

Creates a new 32-bit signed integer.

source

pub fn int64<I>(value: I) -> Selfwhere I: Into<i64>,

Creates a new 64-bit signed integer.

source

pub fn integer<I>(value: I) -> Selfwhere I: Into<i32>,

Creates a new 32-bit signed integer.

source

pub const fn numeric(value: BigDecimal) -> Self

Available on crate feature bigdecimal only.

Creates a new decimal value.

source

pub const fn float(value: f32) -> Self

Creates a new float value.

source

pub const fn double(value: f64) -> Self

Creates a new double value.

source

pub fn text<T>(value: T) -> Selfwhere T: Into<Cow<'a, str>>,

Creates a new string value.

source

pub fn enum_variant<T>(value: T) -> Selfwhere T: Into<Cow<'a, str>>,

Creates a new enum value.

source

pub fn bytes<B>(value: B) -> Selfwhere B: Into<Cow<'a, [u8]>>,

Creates a new bytes value.

source

pub fn boolean<B>(value: B) -> Selfwhere B: Into<bool>,

Creates a new boolean value.

source

pub fn character<C>(value: C) -> Selfwhere C: Into<char>,

Creates a new character value.

source

pub fn array<I, V>(value: I) -> Selfwhere I: IntoIterator<Item = V>, V: Into<Value<'a>>,

Creates a new array value.

source

pub const fn uuid(value: Uuid) -> Self

Available on crate feature uuid only.

Creates a new uuid value.

source

pub const fn datetime(value: DateTime<Utc>) -> Self

Available on crate feature chrono only.

Creates a new datetime value.

source

pub const fn date(value: NaiveDate) -> Self

Available on crate feature chrono only.

Creates a new date value.

source

pub const fn time(value: NaiveTime) -> Self

Available on crate feature chrono only.

Creates a new time value.

source

pub const fn json(value: Value) -> Self

Available on crate feature json only.

Creates a new JSON value.

source

pub fn xml<T>(value: T) -> Selfwhere T: Into<Cow<'a, str>>,

Creates a new XML value.

source

pub const fn is_null(&self) -> bool

true if the Value is null.

source

pub const fn is_text(&self) -> bool

true if the Value is text.

source

pub fn as_str(&self) -> Option<&str>

Returns a &str if the value is text, otherwise None.

source

pub const fn as_char(&self) -> Option<char>

Returns a char if the value is a char, otherwise None.

source

pub fn to_string(&self) -> Option<String>

Returns a cloned String if the value is text, otherwise None.

source

pub fn into_string(self) -> Option<String>

Transforms the Value to a String if it’s text, otherwise None.

source

pub const fn is_bytes(&self) -> bool

Returns whether this value is the Bytes variant.

source

pub fn as_bytes(&self) -> Option<&[u8]>

Returns a bytes slice if the value is text or a byte slice, otherwise None.

source

pub fn to_bytes(&self) -> Option<Vec<u8>>

Returns a cloned Vec<u8> if the value is text or a byte slice, otherwise None.

source

pub const fn is_i32(&self) -> bool

true if the Value is a 32-bit signed integer.

source

pub const fn is_i64(&self) -> bool

true if the Value is a 64-bit signed integer.

source

pub const fn is_integer(&self) -> bool

true if the Value is a signed integer.

source

pub const fn as_i64(&self) -> Option<i64>

Returns an i64 if the value is a 64-bit signed integer, otherwise None.

source

pub const fn as_i32(&self) -> Option<i32>

Returns an i32 if the value is a 32-bit signed integer, otherwise None.

source

pub fn as_integer(&self) -> Option<i64>

Returns an i64 if the value is a signed integer, otherwise None.

source

pub const fn as_f64(&self) -> Option<f64>

Returns a f64 if the value is a double, otherwise None.

source

pub const fn as_f32(&self) -> Option<f32>

Returns a f32 if the value is a double, otherwise None.

source

pub const fn is_numeric(&self) -> bool

Available on crate feature bigdecimal only.

true if the Value is a numeric value or can be converted to one.

source

pub fn into_numeric(self) -> Option<BigDecimal>

Available on crate feature bigdecimal only.

Returns a bigdecimal, if the value is a numeric, float or double value, otherwise None.

source

pub const fn as_numeric(&self) -> Option<&BigDecimal>

Available on crate feature bigdecimal only.

Returns a reference to a bigdecimal, if the value is a numeric. Otherwise None.

source

pub const fn is_bool(&self) -> bool

true if the Value is a boolean value.

source

pub const fn as_bool(&self) -> Option<bool>

Returns a bool if the value is a boolean, otherwise None.

source

pub const fn is_array(&self) -> bool

true if the Value is an Array.

source

pub const fn is_uuid(&self) -> bool

Available on crate feature uuid only.

true if the Value is of UUID type.

source

pub const fn as_uuid(&self) -> Option<Uuid>

Available on crate feature uuid only.

Returns an UUID if the value is of UUID type, otherwise None.

source

pub const fn is_datetime(&self) -> bool

Available on crate feature chrono only.

true if the Value is a DateTime.

source

pub const fn as_datetime(&self) -> Option<DateTime<Utc>>

Available on crate feature chrono only.

Returns a DateTime if the value is a DateTime, otherwise None.

source

pub const fn is_date(&self) -> bool

Available on crate feature chrono only.

true if the Value is a Date.

source

pub const fn as_date(&self) -> Option<NaiveDate>

Available on crate feature chrono only.

Returns a NaiveDate if the value is a Date, otherwise None.

source

pub const fn is_time(&self) -> bool

Available on crate feature chrono only.

true if the Value is a Time.

source

pub const fn as_time(&self) -> Option<NaiveTime>

Available on crate feature chrono only.

Returns a NaiveTime if the value is a Time, otherwise None.

source

pub const fn is_json(&self) -> bool

Available on crate feature json only.

true if the Value is a JSON value.

source

pub const fn as_json(&self) -> Option<&Value>

Available on crate feature json only.

Returns a reference to a JSON Value if of Json type, otherwise None.

source

pub fn into_json(self) -> Option<Value>

Available on crate feature json only.

Transforms to a JSON Value if of Json type, otherwise None.

source

pub fn into_vec<T>(self) -> Option<Vec<T>>where T: TryFrom<Value<'a>>,

Returns a Vec<T> if the value is an array of T, otherwise None.

source

pub fn to_vec<T>(&self) -> Option<Vec<T>>where T: TryFrom<Value<'a>>,

Returns a cloned Vec if the value is an array of T, otherwise None.

Trait Implementations§

source§

impl<'a> Clone for Value<'a>

source§

fn clone(&self) -> Value<'a>

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<'a> Debug for Value<'a>

source§

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

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

impl<'a> Display for Value<'a>

source§

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

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

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

source§

fn from(that: &'a [u8]) -> Self

Converts to this type from the input type.
source§

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

source§

fn from(that: &'a str) -> Self

Converts to this type from the input type.
source§

impl<'a> From<BigDecimal> for Value<'a>

source§

fn from(that: BigDecimal) -> Self

Converts to this type from the input type.
source§

impl<'a> From<DateTime<Utc>> for Value<'a>

source§

fn from(that: DateTime<Utc>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<NaiveDate> for Value<'a>

source§

fn from(that: NaiveDate) -> Self

Converts to this type from the input type.
source§

impl<'a> From<NaiveTime> for Value<'a>

source§

fn from(that: NaiveTime) -> Self

Converts to this type from the input type.
source§

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

source§

fn from(that: Option<&'a [u8]>) -> Self

Converts to this type from the input type.
source§

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

source§

fn from(that: Option<&'a str>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Option<BigDecimal>> for Value<'a>

source§

fn from(that: Option<BigDecimal>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Option<DateTime<Utc>>> for Value<'a>

source§

fn from(that: Option<DateTime<Utc>>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Option<NaiveDate>> for Value<'a>

source§

fn from(that: Option<NaiveDate>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Option<NaiveTime>> for Value<'a>

source§

fn from(that: Option<NaiveTime>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Option<String>> for Value<'a>

source§

fn from(that: Option<String>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Option<Uuid>> for Value<'a>

source§

fn from(that: Option<Uuid>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Option<Value>> for Value<'a>

source§

fn from(that: Option<JsonValue>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Option<bool>> for Value<'a>

source§

fn from(that: Option<bool>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Option<f32>> for Value<'a>

source§

fn from(that: Option<f32>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Option<f64>> for Value<'a>

source§

fn from(that: Option<f64>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Option<i32>> for Value<'a>

source§

fn from(that: Option<i32>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Option<i64>> for Value<'a>

source§

fn from(that: Option<i64>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Option<usize>> for Value<'a>

source§

fn from(that: Option<usize>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<String> for Value<'a>

source§

fn from(that: String) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Uuid> for Value<'a>

source§

fn from(that: Uuid) -> Self

Converts to this type from the input type.
source§

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

Available on crate feature json only.
source§

fn from(pv: Value<'a>) -> Self

Converts to this type from the input type.
source§

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

source§

fn from(that: JsonValue) -> Self

Converts to this type from the input type.
source§

impl<'a> From<bool> for Value<'a>

source§

fn from(that: bool) -> Self

Converts to this type from the input type.
source§

impl<'a> From<f32> for Value<'a>

source§

fn from(that: f32) -> Self

Converts to this type from the input type.
source§

impl<'a> From<f64> for Value<'a>

source§

fn from(that: f64) -> Self

Converts to this type from the input type.
source§

impl<'a> From<i32> for Value<'a>

source§

fn from(that: i32) -> Self

Converts to this type from the input type.
source§

impl<'a> From<i64> for Value<'a>

source§

fn from(that: i64) -> Self

Converts to this type from the input type.
source§

impl<'a> From<usize> for Value<'a>

source§

fn from(that: usize) -> Self

Converts to this type from the input type.
source§

impl<'de> IntoDeserializer<'de, Error> for Value<'de>

Available on crate feature serde-support only.
§

type Deserializer = ValueDeserializer<'de>

The type of the deserializer being converted into.
source§

fn into_deserializer(self) -> Self::Deserializer

Convert this value into a deserializer.
source§

impl<'a> IntoSql<'a> for &'a Value<'a>

source§

fn into_sql(self) -> ColumnData<'a>

Convert to a value understood by the SQL Server. Conversion by-value.
source§

impl<'a> PartialEq<Value<'a>> for Value<'a>

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'a> ToSql for Value<'a>

source§

fn to_sql(&self) -> Result<ToSqlOutput<'_>, RusqlError>

Converts Rust value to SQLite value
source§

impl<'a> ToSql for Value<'a>

source§

fn to_sql( &self, ty: &PostgresType, out: &mut BytesMut ) -> Result<IsNull, Box<dyn StdError + Send + Sync + 'static>>

Converts the value of self into the binary format of the specified Postgres Type, appending it to out. Read more
source§

fn accepts(_: &PostgresType) -> bool

Determines if a value of this type can be converted to the specified Postgres Type.
source§

fn to_sql_checked( &self, ty: &Type, out: &mut BytesMut ) -> Result<IsNull, Box<dyn Error + Sync + Send>>

An adaptor method used internally by Rust-Postgres. Read more
source§

fn encode_format(&self, _ty: &Type) -> Format

Specify the encode format
source§

impl<'a> TryFrom<&Value<'a>> for Option<BitVec>

§

type Error = Error

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

fn try_from(value: &Value<'a>) -> Result<Option<BitVec>, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<&Value<'a>> for Option<IpAddr>

§

type Error = Error

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

fn try_from(value: &Value<'a>) -> Result<Option<IpAddr>, Self::Error>

Performs the conversion.
source§

impl<'a> TryFrom<&Value<'a>> for Option<Uuid>

§

type Error = Error

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

fn try_from(value: &Value<'a>) -> Result<Option<Uuid>, Self::Error>

Performs the conversion.
source§

impl TryFrom<ColumnData<'static>> for Value<'static>

§

type Error = Error

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

fn try_from(cd: ColumnData<'static>) -> Result<Self>

Performs the conversion.
source§

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

§

type Error = Error

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

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

Performs the conversion.
source§

impl<'a> TryFrom<Value<'a>> for DateTime<Utc>

Available on crate feature chrono only.
§

type Error = Error

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

fn try_from(value: Value<'a>) -> Result<DateTime<Utc>, Self::Error>

Performs the conversion.
source§

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

§

type Error = Error

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

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

Performs the conversion.
source§

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

§

type Error = Error

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

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

Performs the conversion.
source§

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

§

type Error = Error

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

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

Performs the conversion.
source§

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

§

type Error = Error

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

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

Performs the conversion.
source§

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

§

type Error = Error

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

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

Performs the conversion.
source§

impl<'a> StructuralPartialEq for Value<'a>

source§

impl ValueIndex<ResultRow, Value<'static>> for &str

source§

impl ValueIndex<ResultRow, Value<'static>> for usize

source§

impl ValueIndex<ResultRowRef<'_>, Value<'static>> for &str

source§

impl ValueIndex<ResultRowRef<'_>, Value<'static>> for usize

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for Value<'a>

§

impl<'a> Send for Value<'a>

§

impl<'a> Sync for Value<'a>

§

impl<'a> Unpin for Value<'a>

§

impl<'a> UnwindSafe for Value<'a>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> BorrowToSql for Twhere T: ToSql,

source§

fn borrow_to_sql(&self) -> &dyn ToSql

Returns a reference to self as a ToSql trait object.
source§

impl<'a, T> Conjunctive<'a> for Twhere T: Into<Expression<'a>>,

source§

fn and<E>(self, other: E) -> ConditionTree<'a>where E: Into<Expression<'a>>,

Builds an AND condition having self as the left leaf and other as the right. Read more
source§

fn or<E>(self, other: E) -> ConditionTree<'a>where E: Into<Expression<'a>>,

Builds an OR condition having self as the left leaf and other as the right. Read more
source§

fn not(self) -> ConditionTree<'a>

Builds a NOT condition having self as the condition. Read more
§

impl<T> Conv for T

§

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

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

impl<Choices> CoproductSubsetter<CNil, HNil> for Choices

§

type Remainder = Choices

§

fn subset( self ) -> Result<CNil, <Choices as CoproductSubsetter<CNil, HNil>>::Remainder>

Extract a subset of the possible types in a coproduct (or get the remaining possibilities) Read more
§

impl<T> FmtForward for T

§

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere 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<'a, T> IntoRaw<'a> for Twhere T: Into<Value<'a>>,

source§

fn raw(self) -> Raw<'a>

§

impl<T, U, I> LiftInto<U, I> for Twhere U: LiftFrom<T, I>,

§

fn lift_into(self) -> U

Performs the indexed conversion.
§

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

§

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<Source> Sculptor<HNil, HNil> for Source

§

type Remainder = Source

§

fn sculpt(self) -> (HNil, <Source as Sculptor<HNil, HNil>>::Remainder)

Consumes the current HList and returns an HList with the requested shape. Read more
§

impl<T> Tap for T

§

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

Immutable access to a value. Read more
§

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

Mutable access to a value. Read more
§

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere 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 Twhere T: Clone,

§

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> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.
§

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

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more