pub struct RfcommManager { /* private fields */ }
Implementations§
Source§impl RfcommManager
impl RfcommManager
pub fn new() -> Result<Self, Error>
pub fn from_proxy(profile: ProfileProxy, rfcomm: RfcommTestProxy) -> Self
pub fn clear_services(&self)
Sourcepub fn advertise(&self) -> Result<(), Error>
pub fn advertise(&self) -> Result<(), Error>
Advertises an SPP service and searches for other compatible SPP clients. Overwrites any existing service advertisement & search.
Sourcepub fn close_session(&self, id: PeerId) -> Result<(), Error>
pub fn close_session(&self, id: PeerId) -> Result<(), Error>
Terminates the RFCOMM session with the remote peer id
.
Sourcepub fn close_rfcomm_channel(
&self,
id: PeerId,
server_channel: ServerChannel,
) -> Result<(), Error>
pub fn close_rfcomm_channel( &self, id: PeerId, server_channel: ServerChannel, ) -> Result<(), Error>
Closes the RFCOMM channel with the remote peer.
Sourcepub async fn outgoing_rfcomm_channel(
&self,
id: PeerId,
server_channel: ServerChannel,
) -> Result<(), Error>
pub async fn outgoing_rfcomm_channel( &self, id: PeerId, server_channel: ServerChannel, ) -> Result<(), Error>
Makes an outgoing RFCOMM channel to the remote peer.
Sourcepub fn send_rls(
&self,
id: PeerId,
server_channel: ServerChannel,
) -> Result<(), Error>
pub fn send_rls( &self, id: PeerId, server_channel: ServerChannel, ) -> Result<(), Error>
Send a Remote Line Status update for the RFCOMM server_channel
with peer id
. Returns
Error if there is no such established RFCOMM channel with the peer.
Sourcepub fn send_user_data(
&self,
id: PeerId,
server_channel: ServerChannel,
data: Vec<u8>,
) -> Result<(), Error>
pub fn send_user_data( &self, id: PeerId, server_channel: ServerChannel, data: Vec<u8>, ) -> Result<(), Error>
Attempts to send user data
to the remote peer id
. Returns Error if there is no such
established RFCOMM channel with the peer.
Trait Implementations§
Source§impl Clone for RfcommManager
impl Clone for RfcommManager
Source§impl Debug for RfcommManager
impl Debug for RfcommManager
Source§impl Default for RfcommManager
impl Default for RfcommManager
Source§fn default() -> RfcommManager
fn default() -> RfcommManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for RfcommManager
impl !RefUnwindSafe for RfcommManager
impl Send for RfcommManager
impl !Sync for RfcommManager
impl Unpin for RfcommManager
impl !UnwindSafe for RfcommManager
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)