pub struct CanInterface { /* private fields */ }
Expand description
A CAN interface identified by its index.
This type is used as a socket address to bind CAN sockets to a specific interface.
Implementations§
Source§impl CanInterface
impl CanInterface
Sourcepub fn from_index(index: u32) -> Self
pub fn from_index(index: u32) -> Self
Create a new CanInterface
from a raw index.
Index 0
represents the “bind all” interface.
Sourcepub fn from_name(name: &str) -> Result<Self>
pub fn from_name(name: &str) -> Result<Self>
Resolve a CAN interface name to a CanInterface
.
Trait Implementations§
Source§impl Clone for CanInterface
impl Clone for CanInterface
Source§fn clone(&self) -> CanInterface
fn clone(&self) -> CanInterface
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 CanInterface
impl Debug for CanInterface
Source§impl Hash for CanInterface
impl Hash for CanInterface
Source§impl Ord for CanInterface
impl Ord for CanInterface
Source§fn cmp(&self, other: &CanInterface) -> Ordering
fn cmp(&self, other: &CanInterface) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CanInterface
impl PartialEq for CanInterface
Source§impl PartialOrd for CanInterface
impl PartialOrd for CanInterface
impl Eq for CanInterface
impl StructuralPartialEq for CanInterface
Auto Trait Implementations§
impl Freeze for CanInterface
impl RefUnwindSafe for CanInterface
impl Send for CanInterface
impl Sync for CanInterface
impl Unpin for CanInterface
impl UnwindSafe for CanInterface
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