pub struct PgU8 { /* private fields */ }
Expand description
PostgreSQL-compatible unsigned 8-bit integer
Implementations§
Source§impl PgU8
impl PgU8
Sourcepub fn to_uint(&self) -> <PgU8 as UIntType>::Uint
pub fn to_uint(&self) -> <PgU8 as UIntType>::Uint
Converts this type to the associated unsigned integer type
Sourcepub fn to_option_uint(&self) -> Option<<PgU8 as UIntType>::Uint>
pub fn to_option_uint(&self) -> Option<<PgU8 as UIntType>::Uint>
Converts Option<PgUint>
to Option<[underlying integer type]>
.
Sourcepub fn new(num: <PgU8 as UIntType>::Uint) -> Self
pub fn new(num: <PgU8 as UIntType>::Uint) -> Self
Creates a new instance of this type from the associated unsigned integer type
Sourcepub fn as_big_decimal(&self) -> &BigDecimal
pub fn as_big_decimal(&self) -> &BigDecimal
Returns a shared reference to the inner BigDecimal
value
Trait Implementations§
Source§impl AddAssign for PgU8
impl AddAssign for PgU8
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moreSource§impl DivAssign for PgU8
impl DivAssign for PgU8
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/=
operation. Read moreSource§impl<'q> Encode<'q, Postgres> for PgU8
impl<'q> Encode<'q, Postgres> for PgU8
Source§fn encode_by_ref(
&self,
buf: &mut <Postgres as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, BoxDynError>
fn encode_by_ref( &self, buf: &mut <Postgres as Database>::ArgumentBuffer<'q>, ) -> Result<IsNull, BoxDynError>
Source§fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
fn encode(
self,
buf: &mut <DB as Database>::ArgumentBuffer<'q>,
) -> Result<IsNull, Box<dyn Error + Send + Sync>>where
Self: Sized,
Writes the value of
self
into buf
in the expected format for the database.fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
Source§impl From<PgU8> for BigDecimal
impl From<PgU8> for BigDecimal
Source§impl MulAssign for PgU8
impl MulAssign for PgU8
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*=
operation. Read moreSource§impl Ord for PgU8
impl Ord for PgU8
Source§impl PartialOrd for PgU8
impl PartialOrd for PgU8
Source§impl PgHasArrayType for PgU8
impl PgHasArrayType for PgU8
fn array_type_info() -> PgTypeInfo
fn array_compatible(ty: &PgTypeInfo) -> bool
Source§impl SubAssign for PgU8
impl SubAssign for PgU8
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read moreSource§impl TryFrom<BigDecimal> for PgU8
impl TryFrom<BigDecimal> for PgU8
impl Eq for PgU8
impl StructuralPartialEq for PgU8
Auto Trait Implementations§
impl Freeze for PgU8
impl RefUnwindSafe for PgU8
impl Send for PgU8
impl Sync for PgU8
impl Unpin for PgU8
impl UnwindSafe for PgU8
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<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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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