pub enum AccessorRequest {
GetDetails {
handle: u64,
include_attachment: bool,
responder: AccessorGetDetailsResponder,
},
ListAllMasInstances {
responder: AccessorListAllMasInstancesResponder,
},
SetNotificationRegistration {
payload: AccessorSetNotificationRegistrationRequest,
responder: AccessorSetNotificationRegistrationResponder,
},
_UnknownMethod {
ordinal: u64,
control_handle: AccessorControlHandle,
method_type: MethodType,
},
}
Expand description
Protocol used for accessing messages and notifications for a connected Bluetooth peer.
Variants§
GetDetails
Retrieve all available message details.
- request
handle
Unique identifier for a Messsage. - request
include_attachment
Whether or not attachment should be included as part of Message content if it’s available.
- response NOT_FOUND error is returned if the message with the given handle does not exist.
ListAllMasInstances
Fields
§
responder: AccessorListAllMasInstancesResponder
SetNotificationRegistration
Registers for notifications from the specified MAS instances. Note that notification registration may only be open one at a time. If the NotificationRegistration protocol is active when a new request is made, the request will fail with an Unavailable error until the existing channel is closed. Hangs until registration process is completed.
- request
mas_instance_ids
If empty, registration for notifications is done for all known MAS instances. - request
server
Client end of the repository notifier protocol that needs to be passed to the Accessor server. Caller should hold onto the server end to receive incoming notifications. Should not be empty.
Fields
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§
control_handle: AccessorControlHandle
§
method_type: MethodType
Implementations§
Source§impl AccessorRequest
impl AccessorRequest
pub fn into_get_details( self, ) -> Option<(u64, bool, AccessorGetDetailsResponder)>
pub fn into_list_all_mas_instances( self, ) -> Option<AccessorListAllMasInstancesResponder>
pub fn into_set_notification_registration( self, ) -> Option<(AccessorSetNotificationRegistrationRequest, AccessorSetNotificationRegistrationResponder)>
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 AccessorRequest
impl !RefUnwindSafe for AccessorRequest
impl Send for AccessorRequest
impl Sync for AccessorRequest
impl Unpin for AccessorRequest
impl !UnwindSafe for AccessorRequest
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