Skip to main content

Repeat

Struct Repeat 

Source
pub struct Repeat { /* private fields */ }
Expand description

A reader that gives one byte over and over, without end. Made by repeat.

Trait Implementations§

Source§

impl AsyncRead for Repeat

Source§

fn poll_read( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut [u8], ) -> Poll<Result<usize>>

Attempt to read from the AsyncRead into buf. Read more
§

fn poll_read_vectored( self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &mut [IoSliceMut<'_>], ) -> Poll<Result<usize, Error>>

Attempt to read from the AsyncRead into bufs using vectored IO operations. Read more
Source§

impl Clone for Repeat

Source§

fn clone(&self) -> Repeat

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Repeat

Source§

impl Debug for Repeat

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<R> AsyncReadExt for R
where R: AsyncRead + ?Sized,

Source§

fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self> ⓘ
where Self: Unpin,

Reads some bytes into buf, answering how many (0 at the end).
Source§

fn read_buf<'a, 'b>( &'a mut self, buf: &'a mut ReadBuf<'b>, ) -> ReadBufFuture<'a, 'b, Self> ⓘ
where Self: Unpin,

Reads some bytes into the unfilled part of buf and counts them filled, answering how many (0 at the end, or when buf is full).
Source§

fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self> ⓘ
where Self: Unpin,

Fills buf exactly, answering its length; an end of the stream first is an UnexpectedEof error.
Source§

fn read_to_end<'a>(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEnd<'a, Self> ⓘ
where Self: Unpin,

Reads to the end of the stream, appending to buf; answers how many bytes it appended.
Source§

fn read_to_string<'a>( &'a mut self, buf: &'a mut String, ) -> ReadToString<'a, Self> ⓘ
where Self: Unpin,

Reads to the end of the stream, appending to buf if what it read is UTF-8 (an InvalidData error and buf as it was otherwise); answers how many bytes it appended.
Source§

fn take(self, limit: u64) -> Take<Self>
where Self: Sized,

A reader that ends after limit bytes of this one.
Source§

fn chain<R: AsyncRead>(self, next: R) -> Chain<Self, R>
where Self: Sized,

A reader that reads this one to its end, then next.
Source§

fn read_u8(&mut self) -> ReadNumber<'_, Self, u8, 1> ⓘ
where Self: Unpin,

Reads an unsigned byte (1 bytes, exactly).
Source§

fn read_i8(&mut self) -> ReadNumber<'_, Self, i8, 1> ⓘ
where Self: Unpin,

Reads a signed byte (1 bytes, exactly).
Source§

fn read_u16(&mut self) -> ReadNumber<'_, Self, u16, 2> ⓘ
where Self: Unpin,

Reads a big-endian u16 (2 bytes, exactly).
Source§

fn read_u16_le(&mut self) -> ReadNumber<'_, Self, u16, 2> ⓘ
where Self: Unpin,

Reads a little-endian u16 (2 bytes, exactly).
Source§

fn read_i16(&mut self) -> ReadNumber<'_, Self, i16, 2> ⓘ
where Self: Unpin,

Reads a big-endian i16 (2 bytes, exactly).
Source§

fn read_i16_le(&mut self) -> ReadNumber<'_, Self, i16, 2> ⓘ
where Self: Unpin,

Reads a little-endian i16 (2 bytes, exactly).
Source§

fn read_u32(&mut self) -> ReadNumber<'_, Self, u32, 4> ⓘ
where Self: Unpin,

Reads a big-endian u32 (4 bytes, exactly).
Source§

fn read_u32_le(&mut self) -> ReadNumber<'_, Self, u32, 4> ⓘ
where Self: Unpin,

Reads a little-endian u32 (4 bytes, exactly).
Source§

fn read_i32(&mut self) -> ReadNumber<'_, Self, i32, 4> ⓘ
where Self: Unpin,

Reads a big-endian i32 (4 bytes, exactly).
Source§

fn read_i32_le(&mut self) -> ReadNumber<'_, Self, i32, 4> ⓘ
where Self: Unpin,

Reads a little-endian i32 (4 bytes, exactly).
Source§

fn read_u64(&mut self) -> ReadNumber<'_, Self, u64, 8> ⓘ
where Self: Unpin,

Reads a big-endian u64 (8 bytes, exactly).
Source§

fn read_u64_le(&mut self) -> ReadNumber<'_, Self, u64, 8> ⓘ
where Self: Unpin,

Reads a little-endian u64 (8 bytes, exactly).
Source§

fn read_i64(&mut self) -> ReadNumber<'_, Self, i64, 8> ⓘ
where Self: Unpin,

Reads a big-endian i64 (8 bytes, exactly).
Source§

fn read_i64_le(&mut self) -> ReadNumber<'_, Self, i64, 8> ⓘ
where Self: Unpin,

Reads a little-endian i64 (8 bytes, exactly).
Source§

fn read_u128(&mut self) -> ReadNumber<'_, Self, u128, 16> ⓘ
where Self: Unpin,

Reads a big-endian u128 (16 bytes, exactly).
Source§

fn read_u128_le(&mut self) -> ReadNumber<'_, Self, u128, 16> ⓘ
where Self: Unpin,

Reads a little-endian u128 (16 bytes, exactly).
Source§

fn read_i128(&mut self) -> ReadNumber<'_, Self, i128, 16> ⓘ
where Self: Unpin,

Reads a big-endian i128 (16 bytes, exactly).
Source§

fn read_i128_le(&mut self) -> ReadNumber<'_, Self, i128, 16> ⓘ
where Self: Unpin,

Reads a little-endian i128 (16 bytes, exactly).
Source§

fn read_f32(&mut self) -> ReadNumber<'_, Self, f32, 4> ⓘ
where Self: Unpin,

Reads a big-endian f32 (4 bytes, exactly).
Source§

fn read_f32_le(&mut self) -> ReadNumber<'_, Self, f32, 4> ⓘ
where Self: Unpin,

Reads a little-endian f32 (4 bytes, exactly).
Source§

fn read_f64(&mut self) -> ReadNumber<'_, Self, f64, 8> ⓘ
where Self: Unpin,

Reads a big-endian f64 (8 bytes, exactly).
Source§

fn read_f64_le(&mut self) -> ReadNumber<'_, Self, f64, 8> ⓘ
where Self: Unpin,

Reads a little-endian f64 (8 bytes, exactly).
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> MaybeSend for T
where T: Send + ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.