Struct tokio_socketcan::CANSocket[][src]

pub struct CANSocket(_);

An asynchronous I/O wrapped socketcan::CANSocket

Implementations

impl CANSocket[src]

pub fn open(ifname: &str) -> Result<CANSocket, Error>[src]

Open a named CAN device such as "vcan0"

pub fn open_if(if_index: c_uint) -> Result<CANSocket, Error>[src]

Open CAN device by kernel interface number

pub fn set_filter(&self, filters: &[CANFilter]) -> Result<()>[src]

Sets the filter mask on the socket

pub fn filter_drop_all(&self) -> Result<()>[src]

Disable reception of CAN frames by setting an empty filter

pub fn filter_accept_all(&self) -> Result<()>[src]

Accept all frames, disabling any kind of filtering.

pub fn set_error_filter(&self, mask: u32) -> Result<()>[src]

pub fn error_filter_drop_all(&self) -> Result<()>[src]

pub fn error_filter_accept_all(&self) -> Result<()>[src]

pub fn write_frame(&self, frame: CANFrame) -> Result<CANWriteFuture, Error>[src]

Write a CANFrame to the socket asynchronously

This uses the semantics of socketcan's write_frame_insist, IE: it will automatically retry when it fails on an EINTR

Trait Implementations

impl Debug for CANSocket[src]

impl Sink<CANFrame> for CANSocket[src]

type Error = Error

The type of value produced by the sink when an error occurs.

impl Stream for CANSocket[src]

type Item = Result<CANFrame>

Values yielded by the stream.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, Item> SinkExt<Item> for T where
    T: Sink<Item> + ?Sized
[src]

impl<T> StreamExt for T where
    T: Stream + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err

impl<S, T, E> TryStream for S where
    S: Stream<Item = Result<T, E>> + ?Sized
[src]

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future

impl<S> TryStreamExt for S where
    S: TryStream + ?Sized
[src]