Enum tidb_query_datatype::codec::mysql::decimal::Res[][src]

pub enum Res<T> {
    Ok(T),
    Truncated(T),
    Overflow(T),
}

Variants

Ok(T)
Truncated(T)
Overflow(T)

Implementations

impl<T> Res<T>[src]

pub fn map<U, F: FnOnce(T) -> U>(self, f: F) -> Res<U>[src]

pub fn unwrap(self) -> T[src]

pub fn is_ok(&self) -> bool[src]

pub fn is_overflow(&self) -> bool[src]

pub fn is_truncated(&self) -> bool[src]

fn into_result_impl(
    self,
    ctx: &mut EvalContext,
    truncated_err: Option<Error>,
    overflow_err: Option<Error>
) -> Result<T>
[src]

Convert Res into Result with an EvalContext that handling the errors If truncated_err is None, ctx will try to handle the default truncated error: Error::truncated(), otherwise handle the specified error inside truncated_err. Same does overflow_err means.

pub fn into_result_with_overflow_err(
    self,
    ctx: &mut EvalContext,
    overflow_err: Error
) -> Result<T>
[src]

pub fn into_result(self, ctx: &mut EvalContext) -> Result<T>[src]

Trait Implementations

impl<T: Clone> Clone for Res<T>[src]

impl<T: Copy> Copy for Res<T>[src]

impl<T: Debug> Debug for Res<T>[src]

impl<T> Deref for Res<T>[src]

type Target = T

The resulting type after dereferencing.

impl<T> DerefMut for Res<T>[src]

impl<T> From<Res<T>> for Result<T>[src]

impl<T: PartialEq> PartialEq<Res<T>> for Res<T>[src]

impl<T> StructuralPartialEq for Res<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Res<T> where
    T: RefUnwindSafe

impl<T> Send for Res<T> where
    T: Send

impl<T> Sync for Res<T> where
    T: Sync

impl<T> Unpin for Res<T> where
    T: Unpin

impl<T> UnwindSafe for Res<T> where
    T: UnwindSafe

Blanket Implementations

impl<T, A, P> Access<T> for P where
    A: Access<T>,
    P: Deref<Target = A>, 
[src]

type Guard = <A as Access<T>>::Guard

A guard object containing the value and keeping it alive. Read more

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<V, W> ConvertFrom<W> for V where
    W: ConvertTo<V>, 
[src]

impl<T, A> DynAccess<T> for A where
    A: Access<T>,
    <A as Access<T>>::Guard: 'static, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> Sealed<T> for T where
    T: ?Sized
[src]

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]