Struct buf::Write [−][src]
pub struct Write<T, W, A: Alloc> { /* fields omitted */ }
Methods
impl<T, W, A: Alloc> Write<T, W, A>
[src]
impl<T, W, A: Alloc> Write<T, W, A>
pub fn with_capacity_in(a: A, w: W, cap: usize) -> Option<Self>
[src]
pub fn with_capacity_in(a: A, w: W, cap: usize) -> Option<Self>
pub const fn from_raw(w: W, raw: RawVec<T, A>) -> Self
[src]
pub const fn from_raw(w: W, raw: RawVec<T, A>) -> Self
pub const fn as_ref(&self) -> &W
[src]
pub const fn as_ref(&self) -> &W
pub fn as_mut(&mut self) -> &mut W
[src]
pub fn as_mut(&mut self) -> &mut W
impl<T: Copy, W: Write<T>, A: Alloc> Write<T, W, A>
[src]
impl<T: Copy, W: Write<T>, A: Alloc> Write<T, W, A>
Trait Implementations
impl<T: Debug, W: Debug, A: Debug + Alloc> Debug for Write<T, W, A>
[src]
impl<T: Debug, W: Debug, A: Debug + Alloc> Debug for Write<T, W, A>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T: PartialEq, W: PartialEq, A: PartialEq + Alloc> PartialEq for Write<T, W, A>
[src]
impl<T: PartialEq, W: PartialEq, A: PartialEq + Alloc> PartialEq for Write<T, W, A>
fn eq(&self, other: &Write<T, W, A>) -> bool
[src]
fn eq(&self, other: &Write<T, W, A>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Write<T, W, A>) -> bool
[src]
fn ne(&self, other: &Write<T, W, A>) -> bool
This method tests for !=
.
impl<T: Eq, W: Eq, A: Eq + Alloc> Eq for Write<T, W, A>
[src]
impl<T: Eq, W: Eq, A: Eq + Alloc> Eq for Write<T, W, A>
impl<T: PartialOrd, W: PartialOrd, A: PartialOrd + Alloc> PartialOrd for Write<T, W, A>
[src]
impl<T: PartialOrd, W: PartialOrd, A: PartialOrd + Alloc> PartialOrd for Write<T, W, A>
fn partial_cmp(&self, other: &Write<T, W, A>) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Write<T, W, A>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Write<T, W, A>) -> bool
[src]
fn lt(&self, other: &Write<T, W, A>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Write<T, W, A>) -> bool
[src]
fn le(&self, other: &Write<T, W, A>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Write<T, W, A>) -> bool
[src]
fn gt(&self, other: &Write<T, W, A>) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Write<T, W, A>) -> bool
[src]
fn ge(&self, other: &Write<T, W, A>) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<T: Ord, W: Ord, A: Ord + Alloc> Ord for Write<T, W, A>
[src]
impl<T: Ord, W: Ord, A: Ord + Alloc> Ord for Write<T, W, A>
fn cmp(&self, other: &Write<T, W, A>) -> Ordering
[src]
fn cmp(&self, other: &Write<T, W, A>) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl<T: Hash, W: Hash, A: Hash + Alloc> Hash for Write<T, W, A>
[src]
impl<T: Hash, W: Hash, A: Hash + Alloc> Hash for Write<T, W, A>
fn hash<__HTWA: Hasher>(&self, state: &mut __HTWA)
[src]
fn hash<__HTWA: Hasher>(&self, state: &mut __HTWA)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<T: Copy, W: Write<T>, A: Alloc> Write<T> for Write<T, W, A>
[src]
impl<T: Copy, W: Write<T>, A: Alloc> Write<T> for Write<T, W, A>
type Err = Either<W::Err, EndOfFile>
fn flush(&mut self) -> Result<(), Self::Err>
[src]
fn flush(&mut self) -> Result<(), Self::Err>
fn write(&mut self, buf: &[T]) -> Result<usize, Self::Err>
[src]
fn write(&mut self, buf: &[T]) -> Result<usize, Self::Err>
w.write(buf) = self.writev(&[buf])
fn writev(&mut self, bufs: &[&[T]]) -> Result<usize, Self::Err>
[src]
fn writev(&mut self, bufs: &[&[T]]) -> Result<usize, Self::Err>
Push some data, at most bufs.fold(0, |n, buf| n+buf.len())
, to this sink from given buffers; return how many data were actually written, or a failure. May block if no data can be written when called. Read more
fn write_all(&mut self, buf: &[T]) -> Result<(), (Self::Err, usize)> where
Self::Err: From<EndOfFile>,
[src]
fn write_all(&mut self, buf: &[T]) -> Result<(), (Self::Err, usize)> where
Self::Err: From<EndOfFile>,
Push buf.len()
data to this sink from given buffer; return ()
if so many data were actually written, or a failure and how many data were written before the failure.
impl<W: Write<u8>, A: Alloc> Write for Write<u8, W, A>
[src]
impl<W: Write<u8>, A: Alloc> Write for Write<u8, W, A>
fn write_str(&mut self, s: &str) -> Result
[src]
fn write_str(&mut self, s: &str) -> Result
Writes a slice of bytes into this writer, returning whether the write succeeded. Read more
fn write_char(&mut self, c: char) -> Result<(), Error>
1.1.0[src]
fn write_char(&mut self, c: char) -> Result<(), Error>
Writes a [char
] into this writer, returning whether the write succeeded. Read more
fn write_fmt(&mut self, args: Arguments) -> Result<(), Error>
1.0.0[src]
fn write_fmt(&mut self, args: Arguments) -> Result<(), Error>
Glue for usage of the [write!
] macro with implementors of this trait. Read more
impl<T: Copy, W: Read<T>, A: Alloc> Read<T> for Write<T, W, A>
[src]
impl<T: Copy, W: Read<T>, A: Alloc> Read<T> for Write<T, W, A>
Pass-thru
type Err = W::Err
fn read(&mut self, buf: &mut [T]) -> Result<usize, Self::Err>
[src]
fn read(&mut self, buf: &mut [T]) -> Result<usize, Self::Err>
r.read(buf) = self.readv(&mut [buf])
fn readv(&mut self, bufs: &mut [&mut [T]]) -> Result<usize, Self::Err>
[src]
fn readv(&mut self, bufs: &mut [&mut [T]]) -> Result<usize, Self::Err>
Pull some data, at most bufs.fold(0, |n, buf| n+buf.len())
, from this source into given buffers; return how many data were actually read, or a failure. May block if no data can be read when called. Read more
fn size_hint(&self) -> (usize, Option<usize>)
[src]
fn size_hint(&self) -> (usize, Option<usize>)
Return bounds on number of data ready to read. Read more
fn read_full<E>(&mut self, buf: &mut [T]) -> Result<(), (E, usize)> where
E: From<Self::Err> + From<EndOfFile>,
[src]
fn read_full<E>(&mut self, buf: &mut [T]) -> Result<(), (E, usize)> where
E: From<Self::Err> + From<EndOfFile>,
Pull buf.len()
data from this source into given buffer; return ()
if so many data were actually read, or a failure and how many data were read before the failure.
fn data(self) -> Data<Self, T>
[src]
fn data(self) -> Data<Self, T>
Make an Iterator
over the data of this reader.
fn read_onto_vec<A>(&mut self, xs: &mut Vec<T, A>) -> Result<usize, Self::Err> where
A: Alloc,
[src]
fn read_onto_vec<A>(&mut self, xs: &mut Vec<T, A>) -> Result<usize, Self::Err> where
A: Alloc,
Pull data from this source into the spare storage of xs
, and modify its length to include the data read. If this fails, xs
is unmodified. Read more
fn split<P, E>(self, p: P, keep_delim: bool) -> Split<Self, T, P, E> where
E: From<Self::Err> + From<NoMemory>,
P: FnMut(T) -> bool,
[src]
fn split<P, E>(self, p: P, keep_delim: bool) -> Split<Self, T, P, E> where
E: From<Self::Err> + From<NoMemory>,
P: FnMut(T) -> bool,