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§
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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,
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.