pub struct DeviceIdentificationSynchronousProxy { /* private fields */ }
Implementations§
Source§impl DeviceIdentificationSynchronousProxy
impl DeviceIdentificationSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<DeviceIdentificationEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<DeviceIdentificationEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn set_device_identification(
&self,
records: &[DeviceIdentificationRecord],
token: ServerEnd<DeviceIdentificationHandleMarker>,
___deadline: MonotonicInstant,
) -> Result<DeviceIdentificationSetDeviceIdentificationResult, Error>
pub fn set_device_identification( &self, records: &[DeviceIdentificationRecord], token: ServerEnd<DeviceIdentificationHandleMarker>, ___deadline: MonotonicInstant, ) -> Result<DeviceIdentificationSetDeviceIdentificationResult, Error>
Request to set the device information to be advertised over Bluetooth.
The device information can only be set once per provided token
. To cancel the request,
close the token
with any epitaph.
At most one record in records
may be denoted as the primary
record. If multiple records
have primary
set, ZX_ERR_INVALID_ARGS
will be returned.
If the server is already advertising a primary
record, a subsequent request with primary
may be rejected with ZX_ERR_ALREADY_EXISTS
.
- request
records
is the set of device information records that identify the device. - request
token
is used to manage the lifetime of the advertised device information. Therecords
will remain advertised as long as the channel is open. The device identification advertisement will be removed whentoken
is closed with any epitaph.
- response An empty response will be sent when the
token
has been closed and the server has processed the closure.
- error Returns
ZX_ERR_INVALID_ARGS
if any of the providedrecords
are invalidly formatted. - error Returns
ZX_ERR_NO_RESOURCES
if the server has reached the maximum number of device information advertisements. - error Returns
ZX_ERR_CANCELLED
if the request was cancelled by the server for all other errors.
Trait Implementations§
Source§impl SynchronousProxy for DeviceIdentificationSynchronousProxy
impl SynchronousProxy for DeviceIdentificationSynchronousProxy
Source§type Proxy = DeviceIdentificationProxy
type Proxy = DeviceIdentificationProxy
The async proxy for the same protocol.
Source§type Protocol = DeviceIdentificationMarker
type Protocol = DeviceIdentificationMarker
The protocol which this
Proxy
controls.Source§fn from_channel(inner: Channel) -> Self
fn from_channel(inner: Channel) -> Self
Create a proxy over the given channel.
Source§fn into_channel(self) -> Channel
fn into_channel(self) -> Channel
Convert the proxy back into a channel.
Source§fn as_channel(&self) -> &Channel
fn as_channel(&self) -> &Channel
Get a reference to the proxy’s underlying channel. Read more
Auto Trait Implementations§
impl Freeze for DeviceIdentificationSynchronousProxy
impl RefUnwindSafe for DeviceIdentificationSynchronousProxy
impl Send for DeviceIdentificationSynchronousProxy
impl Sync for DeviceIdentificationSynchronousProxy
impl Unpin for DeviceIdentificationSynchronousProxy
impl UnwindSafe for DeviceIdentificationSynchronousProxy
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