Enum tidb_query_datatype::codec::mysql::decimal::Res [−][src]
pub enum Res<T> { Ok(T), Truncated(T), Overflow(T), }
Variants
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][−]
self,
ctx: &mut EvalContext,
truncated_err: Option<Error>,
overflow_err: Option<Error>
) -> Result<T>
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]
self,
ctx: &mut EvalContext,
overflow_err: Error
) -> Result<T>
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][+]
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,
T: RefUnwindSafe,
impl<T> Send for Res<T> where
T: Send,
T: Send,
impl<T> Sync for Res<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Res<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Res<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T, A, P> Access<T> for P where
A: Access<T>,
P: Deref<Target = A>,
[src][+]
A: Access<T>,
P: Deref<Target = A>,
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<V, W> ConvertFrom<W> for V where
W: ConvertTo<V>,
[src][+]
W: ConvertTo<V>,
impl<T, A> DynAccess<T> for A where
A: Access<T>,
<A as Access<T>>::Guard: 'static,
[src][+]
A: Access<T>,
<A as Access<T>>::Guard: 'static,
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][+]
U: From<T>,
impl<T> Pointable for T
[src][+]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> Sealed<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src][+]
V: MultiLane<T>,