pub enum UsbSourceRequest {
GetSpec {
responder: UsbSourceGetSpecResponder,
},
GetStatus {
responder: UsbSourceGetStatusResponder,
},
SetInputCurrentLimit {
limit_ua: u32,
responder: UsbSourceSetInputCurrentLimitResponder,
},
Watch {
interest: Status,
wake_on: Status,
lease: Option<EventPair>,
responder: UsbSourceWatchResponder,
},
#[non_exhaustive] _UnknownMethod {
ordinal: u64,
control_handle: UsbSourceControlHandle,
method_type: MethodType,
},
}Variants§
GetSpec
Returns static hardware characteristics of the USB source immediately.
Fields
§
responder: UsbSourceGetSpecResponderGetStatus
Returns dynamic status of the USB source immediately.
Fields
§
responder: UsbSourceGetStatusResponderSetInputCurrentLimit
Set the maximum current limit for this USB input.
Watch
Hanging get for status updates.
See [fuchsia.hardware.power.source/Source.Watch] for semantics.
§Errors
ALREADY_BOUNDifWatchis called before the previous call completes.
#[non_exhaustive]_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: UsbSourceControlHandle§
method_type: MethodTypeImplementations§
Source§impl UsbSourceRequest
impl UsbSourceRequest
pub fn into_get_spec(self) -> Option<UsbSourceGetSpecResponder>
pub fn into_get_status(self) -> Option<UsbSourceGetStatusResponder>
pub fn into_set_input_current_limit( self, ) -> Option<(u32, UsbSourceSetInputCurrentLimitResponder)>
pub fn into_watch( self, ) -> Option<(Status, Status, Option<EventPair>, UsbSourceWatchResponder)>
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 !RefUnwindSafe for UsbSourceRequest
impl !UnwindSafe for UsbSourceRequest
impl Freeze for UsbSourceRequest
impl Send for UsbSourceRequest
impl Sync for UsbSourceRequest
impl Unpin for UsbSourceRequest
impl UnsafeUnpin for UsbSourceRequest
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