[−][src]Struct async_graphql::Connection
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<(Cursor, E, T)>
) -> Self
[src]
total_count: Option<usize>,
has_previous_page: bool,
has_next_page: bool,
nodes: Vec<(Cursor, E, T)>
) -> Self
Create a connection object.
pub fn map<O, F>(self, f: F) -> Connection<O, E> where
F: FnMut(T) -> O,
[src]
F: FnMut(T) -> O,
Convert node type.
Trait Implementations
Auto Trait Implementations
impl<T, E> RefUnwindSafe for Connection<T, E> where
E: RefUnwindSafe,
T: RefUnwindSafe,
E: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, E> Send for Connection<T, E> where
T: Send,
T: Send,
impl<T, E> Sync for Connection<T, E> where
T: Sync,
T: Sync,
impl<T, E> Unpin for Connection<T, E> where
E: Unpin,
T: Unpin,
E: Unpin,
T: Unpin,
impl<T, E> UnwindSafe for Connection<T, E> where
E: UnwindSafe,
T: UnwindSafe,
E: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,