pub enum ConfigurationRequest {
GetConfiguration {
responder: ConfigurationGetConfigurationResponder,
},
SetConfiguration {
device_desc: DeviceDescriptor,
config_descriptors: Vec<Vec<FunctionDescriptor>>,
responder: ConfigurationSetConfigurationResponder,
},
#[non_exhaustive] _UnknownMethod {
ordinal: u64,
control_handle: ConfigurationControlHandle,
method_type: MethodType,
},
}Expand description
Protocol for querying and dynamically reconfiguring USB peripheral functions.
Enables policy managers and system command-line tools to inspect active USB peripheral configurations and reconfigure the peripheral device function stack at runtime.
Variants§
GetConfiguration
Retrieves the current USB device descriptor and active configuration descriptors.
§Errors
ZX_ERR_NOT_SUPPORTED: Peripheral function querying is not supported on the target hardware.
Fields
§
responder: ConfigurationGetConfigurationResponderSetConfiguration
Sets and activates a new USB peripheral function configuration.
Teardown of the previous peripheral function stack occurs before initializing and binding the newly specified functions. The call completes once the peripheral controller and underlying function drivers are registered and ready.
§Errors
ZX_ERR_INVALID_ARGS: Configuration parameters are invalid.ZX_ERR_ALREADY_BOUND: An existing peripheral configuration is locked or undergoing transition.ZX_ERR_NOT_SUPPORTED: The requested combination of functions cannot be supported simultaneously.
#[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: ConfigurationControlHandle§
method_type: MethodTypeImplementations§
Source§impl ConfigurationRequest
impl ConfigurationRequest
pub fn into_get_configuration( self, ) -> Option<ConfigurationGetConfigurationResponder>
pub fn into_set_configuration( self, ) -> Option<(DeviceDescriptor, Vec<Vec<FunctionDescriptor>>, ConfigurationSetConfigurationResponder)>
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 ConfigurationRequest
impl !UnwindSafe for ConfigurationRequest
impl Freeze for ConfigurationRequest
impl Send for ConfigurationRequest
impl Sync for ConfigurationRequest
impl Unpin for ConfigurationRequest
impl UnsafeUnpin for ConfigurationRequest
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