pub struct DbRow(/* private fields */);Expand description
A database row that exposes stable typed access without exposing sqlx.
Implementations§
Source§impl DbRow
impl DbRow
pub fn bool(&self, column: &str) -> Result<bool, SaddleError>
pub fn i64(&self, column: &str) -> Result<i64, SaddleError>
pub fn u64(&self, column: &str) -> Result<u64, SaddleError>
pub fn f64(&self, column: &str) -> Result<f64, SaddleError>
pub fn string(&self, column: &str) -> Result<String, SaddleError>
pub fn bytes(&self, column: &str) -> Result<Vec<u8>, SaddleError>
pub fn optional_i64(&self, column: &str) -> Result<Option<i64>, SaddleError>
pub fn optional_bool(&self, column: &str) -> Result<Option<bool>, SaddleError>
pub fn optional_u64(&self, column: &str) -> Result<Option<u64>, SaddleError>
pub fn optional_f64(&self, column: &str) -> Result<Option<f64>, SaddleError>
pub fn optional_string( &self, column: &str, ) -> Result<Option<String>, SaddleError>
pub fn optional_bytes( &self, column: &str, ) -> Result<Option<Vec<u8>>, SaddleError>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for DbRow
impl RefUnwindSafe for DbRow
impl Send for DbRow
impl Sync for DbRow
impl Unpin for DbRow
impl UnsafeUnpin for DbRow
impl UnwindSafe for DbRow
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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