Struct pgrx_sql_entity_graph::RustSqlMapping
source · pub struct RustSqlMapping {
pub rust: String,
pub sql: String,
pub id: TypeId,
}
Expand description
A mapping from a Rust type to a SQL type, with a TypeId
.
use pgrx_sql_entity_graph::RustSqlMapping;
let constructed = RustSqlMapping::of::<i32>(String::from("int"));
let raw = RustSqlMapping {
rust: core::any::type_name::<i32>().to_string(),
sql: String::from("int"),
id: core::any::TypeId::of::<i32>(),
};
assert_eq!(constructed, raw);
Fields§
§rust: String
§sql: String
§id: TypeId
Implementations§
Trait Implementations§
source§impl Clone for RustSqlMapping
impl Clone for RustSqlMapping
source§fn clone(&self) -> RustSqlMapping
fn clone(&self) -> RustSqlMapping
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RustSqlMapping
impl Debug for RustSqlMapping
source§impl Hash for RustSqlMapping
impl Hash for RustSqlMapping
source§impl Ord for RustSqlMapping
impl Ord for RustSqlMapping
source§fn cmp(&self, other: &RustSqlMapping) -> Ordering
fn cmp(&self, other: &RustSqlMapping) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for RustSqlMapping
impl PartialEq for RustSqlMapping
source§fn eq(&self, other: &RustSqlMapping) -> bool
fn eq(&self, other: &RustSqlMapping) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for RustSqlMapping
impl PartialOrd for RustSqlMapping
source§fn partial_cmp(&self, other: &RustSqlMapping) -> Option<Ordering>
fn partial_cmp(&self, other: &RustSqlMapping) -> Option<Ordering>
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 moreimpl Eq for RustSqlMapping
impl StructuralPartialEq for RustSqlMapping
Auto Trait Implementations§
impl Freeze for RustSqlMapping
impl RefUnwindSafe for RustSqlMapping
impl Send for RustSqlMapping
impl Sync for RustSqlMapping
impl Unpin for RustSqlMapping
impl UnwindSafe for RustSqlMapping
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.