pub enum DatabaseResult<T> {
Return(T),
Error(String),
NamedReturns(HashMap<String, T>),
}Expand description
数据库查询期望
Variants§
Implementations§
Source§impl<T: Clone> DatabaseResult<T>
impl<T: Clone> DatabaseResult<T>
Sourcepub fn return_value(value: T) -> Self
pub fn return_value(value: T) -> Self
创建返回值
Sourcepub fn named_returns(map: HashMap<String, T>) -> Self
pub fn named_returns(map: HashMap<String, T>) -> Self
创建命名返回映射
Trait Implementations§
Source§impl<T: Clone> Clone for DatabaseResult<T>
impl<T: Clone> Clone for DatabaseResult<T>
Source§fn clone(&self) -> DatabaseResult<T>
fn clone(&self) -> DatabaseResult<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for DatabaseResult<T>where
T: Freeze,
impl<T> RefUnwindSafe for DatabaseResult<T>where
T: RefUnwindSafe,
impl<T> Send for DatabaseResult<T>where
T: Send,
impl<T> Sync for DatabaseResult<T>where
T: Sync,
impl<T> Unpin for DatabaseResult<T>where
T: Unpin,
impl<T> UnsafeUnpin for DatabaseResult<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for DatabaseResult<T>where
T: UnwindSafe,
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