[][src]Struct rttrust::device::CharDevice

pub struct CharDevice<'a> { /* fields omitted */ }

Providing regular device operation for non-block device

Implementations

impl<'a> CharDevice<'a>[src]

pub fn new(device: &'a mut Device) -> Result<Self>[src]

Create a CharDevice for reading and writing non-block device.

If device is DeviceType::RT_Device_Class_Block, the method will return RtError::NoSys.

Trait Implementations

impl<'_> Read for CharDevice<'_>[src]

type ReadError = RtError

Value of this type is returned when read() fails. Read more

impl<'_> Seek for CharDevice<'_>[src]

impl<'_> Write for CharDevice<'_>[src]

type WriteError = RtError

Value of this type is returned when write() fails. Read more

type FlushError = RtError

Value of this type is returned when flush() fails. In case of low-level writers flush often does nothing and therefore doesn't return error, so this type might be Void. Read more

impl<'_> WriteFmt for CharDevice<'_>[src]

Auto Trait Implementations

impl<'a> !Send for CharDevice<'a>

impl<'a> !Sync for CharDevice<'a>

impl<'a> Unpin for CharDevice<'a>

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<R> ReadExt for R where
    R: Read + ?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.