pub struct Response<E: EntityKind>(pub Vec<Row<E>>);Expand description
Response
Materialized query result: ordered (Id, 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 try_row(self) -> Result<Option<Row<E>>, ResponseError>
pub fn row(self) -> Result<Row<E>, ResponseError>
pub fn rows(self) -> Vec<Row<E>> ⓘ
pub fn try_entity(self) -> Result<Option<E>, ResponseError>
pub fn entity(self) -> Result<E, ResponseError>
pub fn entities(self) -> Vec<E>
pub fn id(&self) -> Option<E::Id>
pub fn require_id(self) -> Result<E::Id, ResponseError>
pub fn ids(&self) -> Vec<E::Id>
pub fn contains_id(&self, id: &E::Id) -> bool
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>
impl<E> Send for Response<E>
impl<E> Sync for Response<E>
impl<E> Unpin for Response<E>
impl<E> UnsafeUnpin for Response<E>
impl<E> UnwindSafe for Response<E>
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