pub struct PgTypeName(/* private fields */);Expand description
A PostgreSQL type name label.
Implementations§
Source§impl PgTypeName
impl PgTypeName
Sourcepub fn new(input: impl AsRef<str>) -> Result<Self, PgTypeError>
pub fn new(input: impl AsRef<str>) -> Result<Self, PgTypeError>
Creates a PostgreSQL type name label.
§Errors
Returns PgTypeError when the label is empty or contains control characters.
Sourcepub fn built_in(ty: PgBuiltInType) -> Self
pub fn built_in(ty: PgBuiltInType) -> Self
Creates the canonical type name for a built-in type.
Sourcepub fn array_of(element: &Self) -> Self
pub fn array_of(element: &Self) -> Self
Creates an array-like type label from an element type name.
Sourcepub fn is_array_label(&self) -> bool
pub fn is_array_label(&self) -> bool
Returns true when the label uses PostgreSQL array suffix syntax.
Trait Implementations§
Source§impl AsRef<str> for PgTypeName
impl AsRef<str> for PgTypeName
Source§impl Clone for PgTypeName
impl Clone for PgTypeName
Source§fn clone(&self) -> PgTypeName
fn clone(&self) -> PgTypeName
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PgTypeName
impl Debug for PgTypeName
Source§impl Display for PgTypeName
impl Display for PgTypeName
Source§impl FromStr for PgTypeName
impl FromStr for PgTypeName
Source§impl Hash for PgTypeName
impl Hash for PgTypeName
Source§impl Ord for PgTypeName
impl Ord for PgTypeName
Source§fn cmp(&self, other: &PgTypeName) -> Ordering
fn cmp(&self, other: &PgTypeName) -> Ordering
1.21.0 (const: unstable) · 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 PgTypeName
impl PartialEq for PgTypeName
Source§fn eq(&self, other: &PgTypeName) -> bool
fn eq(&self, other: &PgTypeName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for PgTypeName
impl PartialOrd for PgTypeName
Source§impl TryFrom<&str> for PgTypeName
impl TryFrom<&str> for PgTypeName
impl Eq for PgTypeName
impl StructuralPartialEq for PgTypeName
Auto Trait Implementations§
impl Freeze for PgTypeName
impl RefUnwindSafe for PgTypeName
impl Send for PgTypeName
impl Sync for PgTypeName
impl Unpin for PgTypeName
impl UnsafeUnpin for PgTypeName
impl UnwindSafe for PgTypeName
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