pub struct VendorProxy { /* private fields */ }
Implementations§
source§impl VendorProxy
impl VendorProxy
sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.hardware.bluetooth/Vendor.
sourcepub fn take_event_stream(&self) -> VendorEventStream
pub fn take_event_stream(&self) -> VendorEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
sourcepub fn get_features(&self) -> QueryResponseFut<BtVendorFeatures>
pub fn get_features(&self) -> QueryResponseFut<BtVendorFeatures>
Returns bitmask of the features the vendor supports.
sourcepub fn encode_command(
&self,
command: &BtVendorCommand
) -> QueryResponseFut<VendorEncodeCommandResult>
pub fn encode_command( &self, command: &BtVendorCommand ) -> QueryResponseFut<VendorEncodeCommandResult>
Encodes the vendor HCI command command
using params
and returns the encoded command as
a buffer. params
must contain the parameter struct for the specified command, as
documented in BtVendorCommand
.
Returns an error status if the command is not supported or the paramaters are invalid.
sourcepub fn open_hci(&self) -> QueryResponseFut<VendorOpenHciResult>
pub fn open_hci(&self) -> QueryResponseFut<VendorOpenHciResult>
Open the HCI protocol to the controller. This call may block until the controller has been initialized. Returns ALREADY_BOUND if another client has already connected.
Trait Implementations§
source§impl Clone for VendorProxy
impl Clone for VendorProxy
source§fn clone(&self) -> VendorProxy
fn clone(&self) -> VendorProxy
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for VendorProxy
impl Debug for VendorProxy
source§impl Proxy for VendorProxy
impl Proxy for VendorProxy
§type Protocol = VendorMarker
type Protocol = VendorMarker
The protocol which this
Proxy
controls.source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Create a proxy over the given channel.
source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Attempt to convert the proxy back into a channel. Read more
source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Get a reference to the proxy’s underlying channel. Read more
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Attempt to convert the proxy back into a client end. Read more
source§impl VendorProxyInterface for VendorProxy
impl VendorProxyInterface for VendorProxy
type GetFeaturesResponseFut = QueryResponseFut<BtVendorFeatures>
fn get_features(&self) -> Self::GetFeaturesResponseFut
type EncodeCommandResponseFut = QueryResponseFut<Result<Vec<u8>, i32>>
fn encode_command( &self, command: &BtVendorCommand ) -> Self::EncodeCommandResponseFut
type OpenHciResponseFut = QueryResponseFut<Result<ClientEnd<HciMarker>, i32>>
fn open_hci(&self) -> Self::OpenHciResponseFut
Auto Trait Implementations§
impl Freeze for VendorProxy
impl !RefUnwindSafe for VendorProxy
impl Send for VendorProxy
impl Sync for VendorProxy
impl Unpin for VendorProxy
impl !UnwindSafe for VendorProxy
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