pub struct Id<T: RefTarget>(_, _);Implementations§
Trait Implementations§
source§impl<'de, T: RefTarget> Deserialize<'de> for Id<T>
impl<'de, T: RefTarget> Deserialize<'de> for Id<T>
source§fn 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
source§impl<T: RefTarget> JsonSchema for Id<T>
impl<T: RefTarget> JsonSchema for Id<T>
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn json_schema(_: &mut SchemaGenerator) -> Schema
fn json_schema(_: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moresource§impl<T: RefTarget> Ord for Id<T>
impl<T: RefTarget> Ord for Id<T>
source§impl<T: RefTarget> PartialEq<Id<T>> for Id<T>
impl<T: RefTarget> PartialEq<Id<T>> for Id<T>
source§impl<T: RefTarget> PartialOrd<Id<T>> for Id<T>
impl<T: RefTarget> PartialOrd<Id<T>> for Id<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl<T: RefTarget> ToSql for Id<T>
impl<T: RefTarget> ToSql for Id<T>
source§fn to_sql(
&self,
ty: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn to_sql(
&self,
ty: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
Converts the value of
self into the binary format of the specified
Postgres Type, appending it to out. Read moresource§fn accepts(ty: &Type) -> bool
fn accepts(ty: &Type) -> 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>>
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
fn encode_format(&self, _ty: &Type) -> Format
Specify the encode format
impl<T: RefTarget> Copy for Id<T>
Manually implemented Copy and Clone because of the following reason: “There is a small difference between the two: the derive strategy will also place a Copy bound on type parameters, which isn’t always desired.” https://doc.rust-lang.org/stable/std/marker/trait.Copy.html#how-can-i-implement-copy
impl<T: RefTarget> Eq for Id<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Id<T>where
T: RefUnwindSafe,
impl<T> Send for Id<T>
impl<T> Sync for Id<T>
impl<T> Unpin for Id<T>where
T: Unpin,
impl<T> UnwindSafe for Id<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowToSql for Twhere
T: ToSql,
impl<T> BorrowToSql for Twhere
T: ToSql,
source§fn borrow_to_sql(&self) -> &dyn ToSql
fn borrow_to_sql(&self) -> &dyn ToSql
Returns a reference to
self as a ToSql trait object.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.