LoadQuery

Struct LoadQuery 

Source
pub struct LoadQuery {
    pub filter: Option<FilterExpr>,
    pub limit: Option<LimitExpr>,
    pub sort: Option<SortExpr>,
}
Expand description

LoadQuery

Fields§

§filter: Option<FilterExpr>§limit: Option<LimitExpr>§sort: Option<SortExpr>

Implementations§

Source§

impl LoadQuery

Source

pub fn new() -> Self

Source

pub const fn is_empty(&self) -> bool

Source

pub fn one<E: EntityKind>(self, value: impl FieldValue) -> Self

SHAPES

Source

pub fn only<E: EntityKind>(self) -> Self

Source

pub fn many<E: EntityKind>( self, values: impl IntoIterator<Item = impl FieldValue>, ) -> Self

Source

pub fn all() -> Self

Trait Implementations§

Source§

impl CandidType for LoadQuery

Source§

fn _ty() -> Type

Source§

fn id() -> TypeId

Source§

fn idl_serialize<__S>(&self, __serializer: __S) -> Result<(), __S::Error>
where __S: Serializer,

Source§

fn ty() -> Type

Source§

impl Clone for LoadQuery

Source§

fn clone(&self) -> LoadQuery

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LoadQuery

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for LoadQuery

Source§

fn default() -> LoadQuery

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for LoadQuery

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl FilterSlot for LoadQuery

Source§

fn filter_slot(&mut self) -> &mut Option<FilterExpr>

Source§

impl LimitSlot for LoadQuery

Source§

fn limit_slot(&mut self) -> &mut Option<LimitExpr>

Source§

impl<E: EntityKind> QueryValidate<E> for LoadQuery

Source§

impl Serialize for LoadQuery

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl SortSlot for LoadQuery

Source§

fn sort_slot(&mut self) -> &mut Option<SortExpr>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> FilterExt for T
where T: FilterSlot,

Source§

fn filter<F, I>(self, f: F) -> Self
where F: FnOnce(FilterDsl) -> I, I: IntoFilterExpr,

Source§

fn filter_opt<F, I>(self, f: F) -> Self
where F: FnOnce(FilterDsl) -> Option<I>, I: IntoFilterExpr,

Source§

fn or_filter<F>(self, f: F) -> Self

Source§

fn or_filter_expr(self, expr: FilterExpr) -> Self

Source§

fn or_filter_expr_opt(self, expr: Option<FilterExpr>) -> Self

Source§

fn simplify(self) -> Self

Source§

fn one<E: EntityKind>(self, value: impl FieldValue) -> Self

Source§

fn only<E: EntityKind>(self) -> Self

Source§

fn many<E, I>(self, values: I) -> Self

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> LimitExt for T
where T: LimitSlot,

Source§

fn page(self, limit: Option<u32>, offset: Option<u32>) -> Self

Source§

fn limit(self, limit: u32) -> Self

Source§

fn limit_opt(self, opt: Option<u32>) -> Self

Source§

fn offset(self, offset: u32) -> Self

Source§

fn offset_opt(self, opt: Option<u32>) -> Self

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SortExt for T
where T: SortSlot,

Source§

fn sort<F, R>(self, f: F) -> Self
where F: FnOnce(SortExprBuilder) -> R, R: Into<SortExpr>,

Closure-based DSL (matches .filter(|f| ...))
Source§

fn sort_opt(self, expr: Option<SortExpr>) -> Self

Source§

fn sort_by(self, field: &str, order: Order) -> Self

Source§

fn sort_expr(self, expr: SortExpr) -> Self

Source§

fn set_sort_expr(self, expr: SortExpr) -> Self

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,