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