[][src]Struct async_graphql::Connection

pub struct Connection<T, E: ObjectType + Sync + Send> { /* fields omitted */ }

Connection type

Connection is the result of a query for DataSource, If the T type is OutputValueType, you can return the value as a field function directly, otherwise you can use the Connection::map function to convert to a type that implements OutputValueType. E is an extension object type that extends the edge fields.

Methods

impl<T, E: ObjectType + Sync + Send> Connection<T, E>[src]

pub fn new(
    total_count: Option<usize>,
    has_previous_page: bool,
    has_next_page: bool,
    nodes: Vec<(String, E, T)>
) -> Self
[src]

Create a connection object.

pub fn map<O, F>(self, f: F) -> Connection<O, E> where
    F: FnMut(T) -> O, 
[src]

Convert node type.

Trait Implementations

impl<T: OutputValueType + Send + Sync, E: ObjectType + Sync + Send> Type for Connection<T, E>[src]

Auto Trait Implementations

impl<T, E> RefUnwindSafe for Connection<T, E> where
    E: RefUnwindSafe,
    T: RefUnwindSafe

impl<T, E> Send for Connection<T, E> where
    T: Send

impl<T, E> Sync for Connection<T, E> where
    T: Sync

impl<T, E> Unpin for Connection<T, E> where
    E: Unpin,
    T: Unpin

impl<T, E> UnwindSafe for Connection<T, E> where
    E: UnwindSafe,
    T: UnwindSafe

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> From<T> for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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>,