pub struct Projection {
pub include: Vec<FieldPath>,
pub exclude: Vec<FieldPath>,
}Expand description
Optional field projection narrowing which fields of each selected
entity appear in the Response. Combined with Selection, this
completes the ‘filter + projection’ shape.
include and exclude are mutually exclusive — if both non-empty,
the resolver must return ErrorCode::ValidationError. A projection
with both empty is treated the same as None (return all fields).
Fields§
§include: Vec<FieldPath>Fields to include. Mutually exclusive with exclude.
exclude: Vec<FieldPath>Fields to exclude. Mutually exclusive with include.
Implementations§
Source§impl Projection
impl Projection
Trait Implementations§
Source§impl Clone for Projection
impl Clone for Projection
Source§impl Debug for Projection
impl Debug for Projection
Source§impl Default for Projection
impl Default for Projection
Source§impl<'de> Deserialize<'de> for Projection
impl<'de> Deserialize<'de> for Projection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Projection
Source§impl PartialEq for Projection
impl PartialEq for Projection
Source§impl Serialize for Projection
impl Serialize for Projection
impl StructuralPartialEq for Projection
Auto Trait Implementations§
impl Freeze for Projection
impl RefUnwindSafe for Projection
impl Send for Projection
impl Sync for Projection
impl Unpin for Projection
impl UnsafeUnpin for Projection
impl UnwindSafe for Projection
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