pub struct Response<E: EntityKind>(pub Vec<Row<E>>);Expand description
Response
Materialized query result: ordered (Key, Entity) pairs.
Tuple Fields§
§0: Vec<Row<E>>Implementations§
Source§impl<E: EntityKind> Response<E>
impl<E: EntityKind> Response<E>
pub const fn count(&self) -> u32
pub const fn is_empty(&self) -> bool
pub const fn require_one(&self) -> Result<(), ResponseError>
pub const fn require_some(&self) -> Result<(), ResponseError>
pub fn row(self) -> Result<Row<E>, ResponseError>
pub fn try_row(self) -> Result<Option<Row<E>>, ResponseError>
pub fn rows(self) -> Vec<Row<E>> ⓘ
pub fn entity(self) -> Result<E, ResponseError>
pub fn try_entity(self) -> Result<Option<E>, ResponseError>
pub fn entities(self) -> Vec<E>
pub fn key(&self) -> Option<Key>
pub fn key_strict(self) -> Result<Key, ResponseError>
pub fn try_key(self) -> Result<Option<Key>, ResponseError>
pub fn keys(&self) -> Vec<Key>
pub fn contains_key(&self, key: &Key) -> bool
pub fn primary_key(self) -> Result<E::PrimaryKey, ResponseError>
pub fn try_primary_key(self) -> Result<Option<E::PrimaryKey>, ResponseError>
pub fn primary_keys(self) -> Vec<E::PrimaryKey>
pub fn view(&self) -> Result<View<E>, ResponseError>
pub fn view_opt(&self) -> Result<Option<View<E>>, ResponseError>
pub fn views(&self) -> Vec<View<E>> ⓘ
Trait Implementations§
Source§impl<E: EntityKind> IntoIterator for Response<E>
impl<E: EntityKind> IntoIterator for Response<E>
Auto Trait Implementations§
impl<E> Freeze for Response<E>
impl<E> RefUnwindSafe for Response<E>where
E: RefUnwindSafe,
impl<E> Send for Response<E>where
E: Send,
impl<E> Sync for Response<E>where
E: Sync,
impl<E> Unpin for Response<E>where
E: Unpin,
impl<E> UnwindSafe for Response<E>where
E: 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