pub struct Record<T>(pub T);
Expand description
A wrapper for tuples that implements FromSql
for PostgreSQL composite
types.
Tuple Fields§
§0: T
Trait Implementations§
source§impl<'a> FromSql<'a> for Record<()>
impl<'a> FromSql<'a> for Record<()>
source§fn from_sql(
_: &Type,
raw: &'a [u8],
) -> Result<Record<()>, Box<dyn Error + Sync + Send>>
fn from_sql( _: &Type, raw: &'a [u8], ) -> Result<Record<()>, Box<dyn Error + Sync + Send>>
Creates a new value of this type from a buffer of data of the specified
Postgres
Type
in its binary format. Read moresource§fn accepts(ty: &Type) -> bool
fn accepts(ty: &Type) -> bool
Determines if a value of this type can be created from the specified
Postgres
Type
.source§impl<'a, T0> FromSql<'a> for Record<(T0,)>where
T0: FromSql<'a>,
impl<'a, T0> FromSql<'a> for Record<(T0,)>where
T0: FromSql<'a>,
source§fn from_sql(
_: &Type,
raw: &'a [u8],
) -> Result<Record<(T0,)>, Box<dyn Error + Sync + Send>>
fn from_sql( _: &Type, raw: &'a [u8], ) -> Result<Record<(T0,)>, Box<dyn Error + Sync + Send>>
Creates a new value of this type from a buffer of data of the specified
Postgres
Type
in its binary format. Read moresource§fn accepts(ty: &Type) -> bool
fn accepts(ty: &Type) -> bool
Determines if a value of this type can be created from the specified
Postgres
Type
.source§impl<'a, T0, T1> FromSql<'a> for Record<(T0, T1)>
impl<'a, T0, T1> FromSql<'a> for Record<(T0, T1)>
source§fn from_sql(
_: &Type,
raw: &'a [u8],
) -> Result<Record<(T0, T1)>, Box<dyn Error + Sync + Send>>
fn from_sql( _: &Type, raw: &'a [u8], ) -> Result<Record<(T0, T1)>, Box<dyn Error + Sync + Send>>
Creates a new value of this type from a buffer of data of the specified
Postgres
Type
in its binary format. Read moresource§fn accepts(ty: &Type) -> bool
fn accepts(ty: &Type) -> bool
Determines if a value of this type can be created from the specified
Postgres
Type
.source§impl<'a, T0, T1, T2> FromSql<'a> for Record<(T0, T1, T2)>
impl<'a, T0, T1, T2> FromSql<'a> for Record<(T0, T1, T2)>
source§fn from_sql(
_: &Type,
raw: &'a [u8],
) -> Result<Record<(T0, T1, T2)>, Box<dyn Error + Sync + Send>>
fn from_sql( _: &Type, raw: &'a [u8], ) -> Result<Record<(T0, T1, T2)>, Box<dyn Error + Sync + Send>>
Creates a new value of this type from a buffer of data of the specified
Postgres
Type
in its binary format. Read moresource§fn accepts(ty: &Type) -> bool
fn accepts(ty: &Type) -> bool
Determines if a value of this type can be created from the specified
Postgres
Type
.source§impl<'a, T0, T1, T2, T3> FromSql<'a> for Record<(T0, T1, T2, T3)>
impl<'a, T0, T1, T2, T3> FromSql<'a> for Record<(T0, T1, T2, T3)>
source§fn from_sql(
_: &Type,
raw: &'a [u8],
) -> Result<Record<(T0, T1, T2, T3)>, Box<dyn Error + Sync + Send>>
fn from_sql( _: &Type, raw: &'a [u8], ) -> Result<Record<(T0, T1, T2, T3)>, Box<dyn Error + Sync + Send>>
Creates a new value of this type from a buffer of data of the specified
Postgres
Type
in its binary format. Read moresource§fn accepts(ty: &Type) -> bool
fn accepts(ty: &Type) -> bool
Determines if a value of this type can be created from the specified
Postgres
Type
.impl<T: Eq> Eq for Record<T>
impl<T> StructuralPartialEq for Record<T>
Auto Trait Implementations§
impl<T> Freeze for Record<T>where
T: Freeze,
impl<T> RefUnwindSafe for Record<T>where
T: RefUnwindSafe,
impl<T> Send for Record<T>where
T: Send,
impl<T> Sync for Record<T>where
T: Sync,
impl<T> Unpin for Record<T>where
T: Unpin,
impl<T> UnwindSafe for Record<T>where
T: UnwindSafe,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
source§impl<T, U> OverrideFrom<Option<&T>> for Uwhere
U: OverrideFrom<T>,
impl<T, U> OverrideFrom<Option<&T>> for Uwhere
U: OverrideFrom<T>,
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
See
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
See
RustType::into_proto
.source§impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
source§fn plus_equals(&mut self, rhs: &&'a S)
fn plus_equals(&mut self, rhs: &&'a S)
The method of
std::ops::AddAssign
, for types that do not implement AddAssign
.