Trait Links

Source
pub trait Links:
    Send
    + Sync
    + 'static {
    // Required methods
    fn get_redirect<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetRedirectRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<GetRedirectResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_redirect<'life0, 'async_trait>(
        &'life0 self,
        request: Request<SetRedirectRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<SetRedirectResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn rem_redirect<'life0, 'async_trait>(
        &'life0 self,
        request: Request<RemRedirectRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<RemRedirectResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_vanity<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetVanityRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<GetVanityResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_vanity<'life0, 'async_trait>(
        &'life0 self,
        request: Request<SetVanityRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<SetVanityResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn rem_vanity<'life0, 'async_trait>(
        &'life0 self,
        request: Request<RemVanityRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<RemVanityResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_statistics<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetStatisticsRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<GetStatisticsResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn rem_statistics<'life0, 'async_trait>(
        &'life0 self,
        request: Request<RemStatisticsRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<RemStatisticsResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Generated trait containing gRPC methods that should be implemented for use with LinksServer.

Required Methods§

Source

fn get_redirect<'life0, 'async_trait>( &'life0 self, request: Request<GetRedirectRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GetRedirectResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the link corresponding to the id.

Source

fn set_redirect<'life0, 'async_trait>( &'life0 self, request: Request<SetRedirectRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<SetRedirectResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Set a redirect by its id and link. Returns the old link, if any.

Source

fn rem_redirect<'life0, 'async_trait>( &'life0 self, request: Request<RemRedirectRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<RemRedirectResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Remove a redirect by its id. Returns the old link, if any.

Source

fn get_vanity<'life0, 'async_trait>( &'life0 self, request: Request<GetVanityRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GetVanityResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the id corresponding to the vanity path.

Source

fn set_vanity<'life0, 'async_trait>( &'life0 self, request: Request<SetVanityRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<SetVanityResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Set a vanity redirect by its path and id. Returns the old id, if any.

Source

fn rem_vanity<'life0, 'async_trait>( &'life0 self, request: Request<RemVanityRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<RemVanityResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Remove a vanity path by its text content. Returns the old id, if any.

Source

fn get_statistics<'life0, 'async_trait>( &'life0 self, request: Request<GetStatisticsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<GetStatisticsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get statistics’ counts.

Source

fn rem_statistics<'life0, 'async_trait>( &'life0 self, request: Request<RemStatisticsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<RemStatisticsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Remove statistics. Returns the old counts, if available.

Implementors§