[−][src]Struct brokaw::raw::DataBlocks
The Multi-line Data Blocks portion of an NNTP response
Usage
DataBlocks::payload
returns the raw bytes in the payload
DataBlocks::lines
returns an iterator over the lines within the blockDataBlocks::unterminated
returns an iterator over the lines with the CRLF terminator and the final.
line of the response stripped
Implementations
impl DataBlocks
[src]
pub fn payload(&self) -> &[u8]
[src]
Return the raw contained by the payload of the Datablocks
pub fn payload_as_utf8(&self) -> Result<&str, Utf8Error>
[src]
A convenience function that simply calls from_utf8
pub fn lines(&self) -> Lines
[src]
An iterator over the lines within the data block
pub fn unterminated(&self) -> Unterminated
[src]
An iterator over the unterminated data block
- Lines yielded by this iterator WILL NOT include the CRLF terminator
- The final line of the message containing only
.
will not be returend
pub fn lines_len(&self) -> usize
[src]
The number of lines
pub fn payload_len(&self) -> usize
[src]
The number of bytes in the data block
pub fn is_empty(&self) -> bool
[src]
Returns true if there are no lines
Trait Implementations
impl Clone for DataBlocks
[src]
fn clone(&self) -> DataBlocks
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for DataBlocks
[src]
Auto Trait Implementations
impl RefUnwindSafe for DataBlocks
impl Send for DataBlocks
impl Sync for DataBlocks
impl Unpin for DataBlocks
impl UnwindSafe for DataBlocks
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,