Type Alias async_graphql::FieldResult

source ·
pub type FieldResult<T> = Result<T>;
Expand description

An alias of async_graphql::Result. Present for backward compatibility reasons.

Aliased Type§

enum FieldResult<T> {
    Ok(T),
    Err(Error),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(Error)

Contains the error value

Trait Implementations§

source§

impl<T: ContainerType, E: Into<Error> + Send + Sync + Clone> ContainerType for Result<T, E>

source§

fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 Context<'life2> ) -> Pin<Box<dyn Future<Output = ServerResult<Option<Value>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Resolves a field value and outputs it as a json value async_graphql::Value. Read more
source§

fn find_entity<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, ctx: &'life1 Context<'life2>, params: &'life3 Value ) -> Pin<Box<dyn Future<Output = ServerResult<Option<Value>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Find the GraphQL entity with the given name from the parameter. Read more
source§

fn collect_all_fields<'a>( &'a self, ctx: &ContextSelectionSet<'a>, fields: &mut Fields<'a> ) -> ServerResult<()>where Self: Send + Sync,

Collect all the fields of the container that are queried in the selection set. Read more
source§

impl<T, E> ResultExt<T, E> for Result<T, E>where E: ErrorExtensions + Send + Sync + 'static,

source§

fn extend_err<C>(self, cb: C) -> Result<T>where C: FnOnce(&E, &mut ErrorExtensionValues),

Extend the error value of the result with the callback.
source§

fn extend(self) -> Result<T>

Extend the result to a Result.