Skip to main content

AnyEndpointGenerator

Trait AnyEndpointGenerator 

Source
pub trait AnyEndpointGenerator:
    Any
    + AnyExt
    + BoxedAny
    + DynClone
    + Send
    + Sync
    + Debug
    + Serialize
    + Deserialize {
    // Required methods
    fn generate<'life0, 'async_trait>(
        &'life0 self,
        db_conns: DbConns,
    ) -> Pin<Box<dyn Future<Output = Result<(Endpoints, Option<Bytes>)>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn id(&self) -> Result<Bytes>;
}
Expand description

Establishes a method to discover a given schema and generates endpoints associated to it.

Required Methods§

Source

fn generate<'life0, 'async_trait>( &'life0 self, db_conns: DbConns, ) -> Pin<Box<dyn Future<Output = Result<(Endpoints, Option<Bytes>)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn id(&self) -> Result<Bytes>

Unique identifier associated with generator’s config.

Trait Implementations§

Source§

impl<'typetag> Serialize for dyn AnyEndpointGenerator + 'typetag

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<'typetag> Serialize for dyn AnyEndpointGenerator + Send + 'typetag

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<'typetag> Serialize for dyn AnyEndpointGenerator + Sync + 'typetag

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<'typetag> Serialize for dyn AnyEndpointGenerator + Send + Sync + 'typetag

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§