pub struct PgValue { /* private fields */ }Expand description
Implementation of [Value] for PostgreSQL.
Implementations§
Source§impl PgValue
impl PgValue
pub fn get( buf: &mut &[u8], format: PgValueFormat, ty: PgTypeInfo, timezone_sec: Option<i32>, ) -> Self
pub fn as_ref(&self) -> PgValueRef<'_>
pub fn type_info(&self) -> Cow<'_, PgTypeInfo>
pub fn is_null(&self) -> bool
pub fn format(&self) -> PgValueFormat
pub fn as_str(&self) -> Result<&str, Error>
pub fn as_bytes(&self) -> Result<&[u8], Error>
pub fn into_bytes(self) -> Result<Vec<u8>, Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PgValue
impl RefUnwindSafe for PgValue
impl Send for PgValue
impl Sync for PgValue
impl Unpin for PgValue
impl UnwindSafe for PgValue
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more