Struct apache_age::AgType
source · [−]pub struct AgType<T>(pub T);Expand description
Simple wrapper (similar to JSONB) that handles agtype serialization and deserialization
Tuple Fields
0: TTrait Implementations
sourceimpl<'de, T> Deserialize<'de> for AgType<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for AgType<T>where
T: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<'a, T> FromSql<'a> for AgType<T>where
T: Deserialize<'a>,
impl<'a, T> FromSql<'a> for AgType<T>where
T: Deserialize<'a>,
sourcefn from_sql(
ty: &Type,
raw: &'a [u8]
) -> Result<AgType<T>, Box<dyn Error + Sync + Send>>
fn from_sql(
ty: &Type,
raw: &'a [u8]
) -> Result<AgType<T>, 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 more
sourcefn accepts(ty: &Type) -> bool
fn accepts(ty: &Type) -> bool
Determines if a value of this type can be created from the specified
Postgres Type. Read more
sourceimpl<T> ToSql for AgType<T>where
T: Serialize,
T: Debug,
impl<T> ToSql for AgType<T>where
T: Serialize,
T: Debug,
sourcefn accepts(ty: &Type) -> bool
fn accepts(ty: &Type) -> bool
Determines if a value of this type can be converted to the specified
Postgres Type. Read more
sourcefn to_sql(
&self,
_ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
fn to_sql(
&self,
_ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send>>where
Self: Sized,
Converts the value of self into the binary format of the specified
Postgres Type, appending it to out. Read more
sourcefn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
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
sourcefn encode_format(&self, _ty: &Type) -> Format
fn encode_format(&self, _ty: &Type) -> Format
Specify the encode format
Auto Trait Implementations
impl<T> RefUnwindSafe for AgType<T>where
T: RefUnwindSafe,
impl<T> Send for AgType<T>where
T: Send,
impl<T> Sync for AgType<T>where
T: Sync,
impl<T> Unpin for AgType<T>where
T: Unpin,
impl<T> UnwindSafe for AgType<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> BorrowToSql for Twhere
T: ToSql,
impl<T> BorrowToSql for Twhere
T: ToSql,
sourcefn borrow_to_sql(&self) -> &dyn ToSql
fn borrow_to_sql(&self) -> &dyn ToSql
Returns a reference to self as a ToSql trait object.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more