Struct can_socket::CanSocket
source · pub struct CanSocket { /* private fields */ }
Implementations§
source§impl CanSocket
impl CanSocket
pub fn bind(interface: impl AsRef<str>) -> Result<Self>
pub fn bind_interface_index(index: u32) -> Result<Self>
pub fn bind_all() -> Result<Self>
pub fn set_nonblocking(&self, non_blocking: bool) -> Result<()>
pub fn send(&self, frame: &CanFrame) -> Result<()>
pub fn send_to(&self, frame: &CanFrame, interface: &CanInterface) -> Result<()>
pub fn recv(&self) -> Result<CanFrame>
pub fn recv_from(&self) -> Result<(CanFrame, CanInterface)>
Trait Implementations§
source§impl AsFd for CanSocket
impl AsFd for CanSocket
source§fn as_fd(&self) -> BorrowedFd<'_>
fn as_fd(&self) -> BorrowedFd<'_>
Borrows the file descriptor. Read more
Auto Trait Implementations§
impl RefUnwindSafe for CanSocket
impl Send for CanSocket
impl Sync for CanSocket
impl Unpin for CanSocket
impl UnwindSafe for CanSocket
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