Trait rincon_core::api::method::Method [] [src]

pub trait Method {
    type Result: DeserializeOwned;

    const RETURN_TYPE: RpcReturnType;
    fn return_type(&self) -> RpcReturnType { ... }
}

A Method type can be used to represent method calls.

This trait defines the result type of a method. As the rincon driver uses the serde crate as its serialization framework the return type must implement the DeserializeOwned trait of serde.

Associated Types

The type of the result of a method call.

Associated Constants

Specification of the fields of RPC-like return type.

The design of the ArangoDB REST API is not very type safe friendly as different operations use different fields in the top level result type. Mainly it does not stick to one RPC-like style of fields returned as operation results. Hence this hack is used to overcome this issue and allows the driver to always return specific types for each operation.

Provided Methods

Returns the specification of the RPC-like return type.

Implementors