pub struct RpPairingSocket<R: ReadWrite> {
pub inner: R,
/* private fields */
}Fields§
§inner: RImplementations§
Source§impl<R: ReadWrite> RpPairingSocket<R>
impl<R: ReadWrite> RpPairingSocket<R>
Sourcepub fn new(socket: R) -> Self
pub fn new(socket: R) -> Self
Creates a socket for the initiating host (sends originatedBy: "host").
Sourcepub fn new_device(socket: R) -> Self
pub fn new_device(socket: R) -> Self
Creates a socket for the responder side (sends originatedBy: "device").
Use this when accepting a device-initiated pairing with
crate::remote_pairing::PairableHost.
Trait Implementations§
Source§impl<R: ReadWrite> RpPairingSocketProvider for RpPairingSocket<R>
impl<R: ReadWrite> RpPairingSocketProvider for RpPairingSocket<R>
fn send_plain( &mut self, value: impl Serialize, seq: usize, ) -> Pin<Box<dyn Future<Output = Result<(), IdeviceError>> + Send + '_>>
fn send_encrypted( &mut self, ciphertext: Vec<u8>, seq: usize, ) -> Pin<Box<dyn Future<Output = Result<(), IdeviceError>> + Send + '_>>
fn recv_plain<'a>( &'a mut self, ) -> Pin<Box<dyn Future<Output = Result<Value, IdeviceError>> + Send + 'a>>
Source§fn serialize_bytes(b: &[u8]) -> Value
fn serialize_bytes(b: &[u8]) -> Value
rppairing uses b64, while RemoteXPC uses raw bytes just fine
fn deserialize_bytes(v: Value) -> Option<Vec<u8>>
Auto Trait Implementations§
impl<R> Freeze for RpPairingSocket<R>where
R: Freeze,
impl<R> RefUnwindSafe for RpPairingSocket<R>where
R: RefUnwindSafe,
impl<R> Send for RpPairingSocket<R>
impl<R> Sync for RpPairingSocket<R>
impl<R> Unpin for RpPairingSocket<R>
impl<R> UnsafeUnpin for RpPairingSocket<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for RpPairingSocket<R>where
R: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more