Struct tendril::fmt::Bytes
[−]
[src]
pub struct Bytes;
Marker type for uninterpreted bytes.
Validation will never fail for this format.
Trait Implementations
impl Copy for Bytes
[src]
impl Clone for Bytes
[src]
fn clone(&self) -> Bytes
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for Bytes
[src]
impl Debug for Bytes
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Format for Bytes
[src]
fn validate(_: &[u8]) -> bool
[src]
Check whether the buffer is valid for this format.
fn validate_prefix(buf: &[u8]) -> bool
[src]
Check whether the buffer is valid for this format. Read more
fn validate_suffix(buf: &[u8]) -> bool
[src]
Check whether the buffer is valid for this format. Read more
fn validate_subseq(buf: &[u8]) -> bool
[src]
Check whether the buffer is valid for this format. Read more
unsafe fn fixup(_lhs: &[u8], _rhs: &[u8]) -> Fixup
[src]
Compute any fixup needed when concatenating buffers. Read more
impl SliceFormat for Bytes
[src]
impl<Sink, A> TendrilSink<Bytes, A> for Utf8LossyDecoder<Sink, A> where
Sink: TendrilSink<UTF8, A>,
A: Atomicity,
[src]
Sink: TendrilSink<UTF8, A>,
A: Atomicity,
fn process(&mut self, t: Tendril<Bytes, A>)
[src]
Process this tendril.
fn error(&mut self, desc: Cow<'static, str>)
[src]
Indicates that an error has occurred.
type Output = Sink::Output
What the overall result of processing is.
fn finish(self) -> Sink::Output
[src]
Indicates the end of the stream.
fn one<T>(self, t: T) -> Self::Output where
Self: Sized,
T: Into<Tendril<F, A>>,
[src]
Self: Sized,
T: Into<Tendril<F, A>>,
Process one tendril and finish.
fn from_iter<I>(self, i: I) -> Self::Output where
Self: Sized,
I: IntoIterator,
I::Item: Into<Tendril<F, A>>,
[src]
Self: Sized,
I: IntoIterator,
I::Item: Into<Tendril<F, A>>,
Consume an iterator of tendrils, processing each item, then finish.
fn read_from<R>(self, r: &mut R) -> Result<Self::Output> where
Self: Sized,
R: Read,
F: SliceFormat<Slice = [u8]>,
[src]
Self: Sized,
R: Read,
F: SliceFormat<Slice = [u8]>,
Read from the given stream of bytes until exhaustion and process incrementally, then finish. Return Err
at the first I/O error. Read more
fn from_file<P>(self, path: P) -> Result<Self::Output> where
Self: Sized,
P: AsRef<Path>,
F: SliceFormat<Slice = [u8]>,
[src]
Self: Sized,
P: AsRef<Path>,
F: SliceFormat<Slice = [u8]>,
Read from the file at the given path and process incrementally, then finish. Return Err
at the first I/O error. Read more
impl SliceExt<Bytes> for [u8]
[src]
fn to_tendril(&self) -> Tendril<F>
[src]
Make a Tendril
from this slice.