pub struct UsbSourceSynchronousProxy { /* private fields */ }Implementations§
Source§impl UsbSourceSynchronousProxy
impl UsbSourceSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<UsbSourceEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<UsbSourceEvent, 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 get_spec(
&self,
___deadline: MonotonicInstant,
) -> Result<UsbSourceGetSpecResult, Error>
pub fn get_spec( &self, ___deadline: MonotonicInstant, ) -> Result<UsbSourceGetSpecResult, Error>
Returns static hardware characteristics of the USB source immediately.
Sourcepub fn get_status(
&self,
___deadline: MonotonicInstant,
) -> Result<UsbSourceGetStatusResult, Error>
pub fn get_status( &self, ___deadline: MonotonicInstant, ) -> Result<UsbSourceGetStatusResult, Error>
Returns dynamic status of the USB source immediately.
Sourcepub fn set_input_current_limit(
&self,
limit_ua: u32,
___deadline: MonotonicInstant,
) -> Result<UsbSourceSetInputCurrentLimitResult, Error>
pub fn set_input_current_limit( &self, limit_ua: u32, ___deadline: MonotonicInstant, ) -> Result<UsbSourceSetInputCurrentLimitResult, Error>
Set the maximum current limit for this USB input.
Sourcepub fn watch(
&self,
interest: &Status,
wake_on: &Status,
lease: Option<EventPair>,
___deadline: MonotonicInstant,
) -> Result<UsbSourceWatchResult, Error>
pub fn watch( &self, interest: &Status, wake_on: &Status, lease: Option<EventPair>, ___deadline: MonotonicInstant, ) -> Result<UsbSourceWatchResult, Error>
Hanging get for status updates.
See [fuchsia.hardware.power.source/Source.Watch] for semantics.
§Errors
ALREADY_BOUNDifWatchis called before the previous call completes.
Trait Implementations§
Source§impl Debug for UsbSourceSynchronousProxy
impl Debug for UsbSourceSynchronousProxy
Source§impl From<Channel> for UsbSourceSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for UsbSourceSynchronousProxy
Available on Fuchsia only.
Source§impl From<UsbSourceSynchronousProxy> for NullableHandle
Available on Fuchsia only.
impl From<UsbSourceSynchronousProxy> for NullableHandle
Available on Fuchsia only.
Source§fn from(value: UsbSourceSynchronousProxy) -> Self
fn from(value: UsbSourceSynchronousProxy) -> Self
Converts to this type from the input type.
Source§impl FromClient for UsbSourceSynchronousProxy
Available on Fuchsia only.
impl FromClient for UsbSourceSynchronousProxy
Available on Fuchsia only.
Source§type Protocol = UsbSourceMarker
type Protocol = UsbSourceMarker
The protocol.
Source§fn from_client(value: ClientEnd<UsbSourceMarker>) -> Self
fn from_client(value: ClientEnd<UsbSourceMarker>) -> Self
Converts from a client.
Source§impl SynchronousProxy for UsbSourceSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for UsbSourceSynchronousProxy
Available on Fuchsia only.
Source§type Proxy = UsbSourceProxy
type Proxy = UsbSourceProxy
The async proxy for the same protocol.
Source§type Protocol = UsbSourceMarker
type Protocol = UsbSourceMarker
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 UsbSourceSynchronousProxy
impl RefUnwindSafe for UsbSourceSynchronousProxy
impl Send for UsbSourceSynchronousProxy
impl Sync for UsbSourceSynchronousProxy
impl Unpin for UsbSourceSynchronousProxy
impl UnsafeUnpin for UsbSourceSynchronousProxy
impl UnwindSafe for UsbSourceSynchronousProxy
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