Execute

Trait Execute 

Source
pub trait Execute<C, P> {
    type Output;
    type Error;

    // Required method
    fn execute_on(
        self,
        context: &mut C,
        parameters: &P,
    ) -> Result<Self::Output, Self::Error>;
}
Expand description

A trait providing ergonomic method-style execution for API operations.

Required Associated Types§

Source

type Output

The type returned by a successful operation execution.

Source

type Error

The error type returned when an operation fails.

Required Methods§

Source

fn execute_on( self, context: &mut C, parameters: &P, ) -> Result<Self::Output, Self::Error>

Execute the API operation on the given context with the specified properties.

Implementors§

Source§

impl<T, C, P> Execute<C, P> for T
where T: ApiOperation<C, P>,

Blanket implementation of Execute for all ApiOperation implementors.

Source§

type Output = <T as ApiOperation<C, P>>::Output

Source§

type Error = <T as ApiOperation<C, P>>::Error