[][src]Struct warpgrapher::engine::config::EndpointsFilter

pub struct EndpointsFilter { /* fields omitted */ }

Configuration item for endpoint filters. This allows configuration to control which of the basic create, read, update, and delete (CRUD) operations are auto-generated for a Type or a Relationship. If a filter boolean is set to true, the operation is generated. False indicates that the operation should not be generated.

Examples


let ef = EndpointsFilter::new(true, true, true, true);

Implementations

impl EndpointsFilter[src]

pub fn new(
    read: bool,
    create: bool,
    update: bool,
    delete: bool
) -> EndpointsFilter
[src]

Creates a new filter with the option to configure all endpoints

Examples


let ef = EndpointsFilter::new(true, true, false, false);

pub fn all() -> EndpointsFilter[src]

Creates a new filter with all endpoints -- create, read, update, and delete

Examples


let ef = EndpointsFilter::all();

pub fn create(self) -> bool[src]

Returns true if Warpgrapher should generate a create operation for the relationship

Examples


let ef = EndpointsFilter::all();
assert_eq!(true, ef.create());

pub fn delete(self) -> bool[src]

Returns true if Warpgrapher should generate a delete operation for the relationship

Examples


let ef = EndpointsFilter::all();
assert_eq!(true, ef.delete());

pub fn none() -> EndpointsFilter[src]

Creates a new filter with all endpoints -- create, read, update, and delete -- filtered out

Examples


let ef = EndpointsFilter::none();

pub fn read(self) -> bool[src]

Returns true if Warpgrapher should generate a read operation for the relationship

Examples


let ef = EndpointsFilter::all();
assert_eq!(true, ef.read());

pub fn update(self) -> bool[src]

Returns true if Warpgrapher should generate a update operation for the relationship

Examples


let ef = EndpointsFilter::all();
assert_eq!(true, ef.update());

Trait Implementations

impl Clone for EndpointsFilter[src]

impl Copy for EndpointsFilter[src]

impl Debug for EndpointsFilter[src]

impl Default for EndpointsFilter[src]

impl<'de> Deserialize<'de> for EndpointsFilter[src]

impl Eq for EndpointsFilter[src]

impl Hash for EndpointsFilter[src]

impl Ord for EndpointsFilter[src]

impl PartialEq<EndpointsFilter> for EndpointsFilter[src]

impl PartialOrd<EndpointsFilter> for EndpointsFilter[src]

impl Serialize for EndpointsFilter[src]

impl StructuralEq for EndpointsFilter[src]

impl StructuralPartialEq for EndpointsFilter[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,