pub trait Pairing:
Send
+ Sync
+ 'static {
// Required methods
fn pair_device<'life0, 'async_trait>(
&'life0 self,
request: Request<PairDeviceRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<PairDeviceResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_pairing_data<'life0, 'async_trait>(
&'life0 self,
request: Request<GetPairingDataRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetPairingDataResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn approve_pairing<'life0, 'async_trait>(
&'life0 self,
request: Request<ApprovePairingRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, 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 PairingServer.
Required Methods§
Sourcefn pair_device<'life0, 'async_trait>(
&'life0 self,
request: Request<PairDeviceRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<PairDeviceResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pair_device<'life0, 'async_trait>(
&'life0 self,
request: Request<PairDeviceRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<PairDeviceResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Initiates a new Pairing Sessions. This is called by the new device that wants to request a pairing from an existing device. The session lifetime is bound to the stream so closing the stream destroys the session.
Sourcefn get_pairing_data<'life0, 'async_trait>(
&'life0 self,
request: Request<GetPairingDataRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetPairingDataResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_pairing_data<'life0, 'async_trait>(
&'life0 self,
request: Request<GetPairingDataRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetPairingDataResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the pairing related data that belongs to a pairing session. This is meant to be called from a device that can approve a pairing request, we sometimes call it “old device”.
Sourcefn approve_pairing<'life0, 'async_trait>(
&'life0 self,
request: Request<ApprovePairingRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn approve_pairing<'life0, 'async_trait>(
&'life0 self,
request: Request<ApprovePairingRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Approves a pairing request. The ApprovePairingRequest is forwarded to a signer for further processing.