Type Alias async_graphql::Result

source ·
pub type Result<T, E = Error> = Result<T, E>;
Expand description

An alias for Result<T, Error>.

Aliased Type§

enum Result<T, E = Error> {
    Ok(T),
    Err(E),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(E)

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: OutputType + Sync, E: Into<Error> + Send + Sync + Clone> OutputType for Result<T, E>

source§

fn type_name() -> Cow<'static, str>

Type the name.
source§

fn create_type_info(registry: &mut Registry) -> String

Create type information in the registry and return qualified typename.
source§

fn resolve<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, ctx: &'life1 ContextSelectionSet<'life2>, field: &'life3 Positioned<Field> ) -> Pin<Box<dyn Future<Output = ServerResult<Value>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Resolve an output value to async_graphql::Value.
source§

fn qualified_type_name() -> String

Qualified typename.
source§

fn introspection_type_name(&self) -> Cow<'static, str>

Introspection type name 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.