pub struct EndpointPath { /* private fields */ }Expand description
Path to an endpoint on a device
Implementations§
Source§impl EndpointPath
impl EndpointPath
Sourcepub fn new_with_device_path(device_path: DevicePath, endpoint: u8) -> Self
pub fn new_with_device_path(device_path: DevicePath, endpoint: u8) -> Self
Create a new endpoint path from PortPath, configuration, interface and endpoint number
Sourcepub fn new_with_port_path(
port_path: PortPath,
config: u8,
interface: u8,
alt_setting: u8,
endpoint: u8,
) -> Self
pub fn new_with_port_path( port_path: PortPath, config: u8, interface: u8, alt_setting: u8, endpoint: u8, ) -> Self
Create a new endpoint path from PortPath, configuration, interface and endpoint number
Sourcepub fn new(
bus: u8,
ports: Vec<u8>,
config: u8,
interface: u8,
alt_setting: u8,
endpoint: u8,
) -> Self
pub fn new( bus: u8, ports: Vec<u8>, config: u8, interface: u8, alt_setting: u8, endpoint: u8, ) -> Self
Create a new endpoint path from bus number, port tree positions, configuration, interface and endpoint number
Sourcepub fn device_path(&self) -> &DevicePath
pub fn device_path(&self) -> &DevicePath
Get the device path
Sourcepub fn endpoint_address(&self) -> EndpointAddress
pub fn endpoint_address(&self) -> EndpointAddress
Get the EndpointAddress from the endpoint number
Trait Implementations§
Source§impl Clone for EndpointPath
impl Clone for EndpointPath
Source§fn clone(&self) -> EndpointPath
fn clone(&self) -> EndpointPath
Returns a duplicate 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 EndpointPath
impl Debug for EndpointPath
Source§impl<'de> Deserialize<'de> for EndpointPath
impl<'de> Deserialize<'de> for EndpointPath
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for EndpointPath
impl Display for EndpointPath
Source§impl From<EndpointPath> for EndpointAddress
impl From<EndpointPath> for EndpointAddress
Source§fn from(path: EndpointPath) -> Self
fn from(path: EndpointPath) -> Self
Converts to this type from the input type.
Source§impl From<EndpointPath> for UsbPath
impl From<EndpointPath> for UsbPath
Source§fn from(ep: EndpointPath) -> Self
fn from(ep: EndpointPath) -> Self
Converts to this type from the input type.
Source§impl FromStr for EndpointPath
impl FromStr for EndpointPath
Source§impl PartialEq for EndpointPath
impl PartialEq for EndpointPath
Source§impl Serialize for EndpointPath
impl Serialize for EndpointPath
Source§impl TryFrom<&Path> for EndpointPath
impl TryFrom<&Path> for EndpointPath
impl Eq for EndpointPath
impl StructuralPartialEq for EndpointPath
Auto Trait Implementations§
impl Freeze for EndpointPath
impl RefUnwindSafe for EndpointPath
impl Send for EndpointPath
impl Sync for EndpointPath
impl Unpin for EndpointPath
impl UnsafeUnpin for EndpointPath
impl UnwindSafe for EndpointPath
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more