pub trait Destination: Send + Sync + 'static {
type GetStream: Stream<Item = Result<Update, Status>> + Send + 'static;
type GetProfileStream: Stream<Item = Result<DestinationProfile, Status>> + Send + 'static;
fn get<'life0, 'async_trait>(
&'life0 self,
request: Request<GetDestination>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetStream>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn get_profile<'life0, 'async_trait>(
&'life0 self,
request: Request<GetDestination>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetProfileStream>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
}
Expand description
Generated trait containing gRPC methods that should be implemented for use with DestinationServer.
Required Associated Types
Server streaming response type for the Get method.
type GetProfileStream: Stream<Item = Result<DestinationProfile, Status>> + Send + 'static
type GetProfileStream: Stream<Item = Result<DestinationProfile, Status>> + Send + 'static
Server streaming response type for the GetProfile method.
Required Methods
Given a destination, return all addresses in that destination as a long- running stream of updates.
fn get_profile<'life0, 'async_trait>(
&'life0 self,
request: Request<GetDestination>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetProfileStream>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn get_profile<'life0, 'async_trait>(
&'life0 self,
request: Request<GetDestination>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetProfileStream>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Given a destination, return that destination’s profile and send an update whenever it changes.