pub enum LocalServiceRequest {
RemoveService {
control_handle: LocalServiceControlHandle,
},
NotifyValue {
characteristic_id: u64,
peer_id: String,
value: Vec<u8>,
confirm: bool,
control_handle: LocalServiceControlHandle,
},
}
Expand description
Interface for communicating with a published service.
Variants§
RemoveService
Removes the service that this interface instance corresponds to. Does nothing if the service is already removed.
Fields
§
control_handle: LocalServiceControlHandle
NotifyValue
Sends a notification carrying the value
of the characteristic with the
given characteristic_id
to the device with peer_id
.
If confirm
is true, then this method sends an indication instead. If the
peer fails to confirm the indication, the link between the peer and the
local adapter will be closed.
This method has no effect if the peer has not enabled notifications or indications on the requested characteristic.
Implementations§
Source§impl LocalServiceRequest
impl LocalServiceRequest
pub fn into_remove_service(self) -> Option<LocalServiceControlHandle>
pub fn into_notify_value( self, ) -> Option<(u64, String, Vec<u8>, bool, LocalServiceControlHandle)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LocalServiceRequest
impl !RefUnwindSafe for LocalServiceRequest
impl Send for LocalServiceRequest
impl Sync for LocalServiceRequest
impl Unpin for LocalServiceRequest
impl !UnwindSafe for LocalServiceRequest
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