pub struct PgCast {
pub castsource: SmolStr,
pub casttarget: SmolStr,
pub castfunc: Option<SmolStr>,
pub castcontext: PgCastCastcontext,
pub castmethod: PgCastCastmethod,
pub description: Option<SmolStr>,
}Expand description
The DDL-only contents of pg_cast
Fields§
§castsource: SmolStroid (references pg_type.oid) OID of the source data type
casttarget: SmolStroid (references pg_type.oid) OID of the target data type
castfunc: Option<SmolStr>oid (references pg_proc.oid) The OID of the function to use to perform this cast. Zero is stored if the cast method doesn’t require a function.
castcontext: PgCastCastcontextchar Indicates what contexts the cast can be invoked in. e means only as an explicit cast (using CAST or :: syntax). a means implicitly in assignment to a target column, as well as explicitly. i means implicitly in expressions, as well as the other cases.
castmethod: PgCastCastmethodchar Indicates how the cast is performed. f means that the function specified in the castfunc field is used. i means that the input/output functions are used. b means that the types are binary-coercible, thus no conversion is required.
description: Option<SmolStr>text The comment from pg_description
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PgCast
impl<'de> Deserialize<'de> for PgCast
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PgCast, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PgCast, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for PgCast
impl Serialize for PgCast
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for PgCast
impl StructuralPartialEq for PgCast
Auto Trait Implementations§
impl Freeze for PgCast
impl RefUnwindSafe for PgCast
impl Send for PgCast
impl Sync for PgCast
impl Unpin for PgCast
impl UnsafeUnpin for PgCast
impl UnwindSafe for PgCast
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
key and return true if they are equal.