[−][src]Enum genio::ext::ReadResult
Result of successful read operation.
Variants
Bytes(&'a mut [u8])
Some bytes were read. The slice will always contain at least one byte.
End
No bytes available (End reached).
Methods
impl<'a> ReadResult<'a>
[src]
pub fn require_bytes<T>(self) -> Result<&'a mut [u8], ReadExactError<T>>
[src]
Helps mapping ReadResult
to ReadExactError
Example
Assuming a function returns ReadExactError<T>
let bytes = reader.read_ext(&mut buf)?.require_bytes()?;
Auto Trait Implementations
impl<'a> Send for ReadResult<'a>
impl<'a> Sync for ReadResult<'a>
Blanket Implementations
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> From for T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,