pub struct CombinedList<'a, I> { /* private fields */ }Expand description
Several validated field lines read as one list.
§Examples
use parse_net::{list, Limits};
let lines: [&[u8]; 2] = [b"gzip", b"br, zstd"];
let c = list::combined(lines, &Limits::DEFAULT)?;
assert_eq!(c.len(), 3);
assert!(c.iter().any(|e| e == b"zstd"));Implementations§
Source§impl<'a, I: Iterator<Item = &'a [u8]> + Clone> CombinedList<'a, I>
impl<'a, I: Iterator<Item = &'a [u8]> + Clone> CombinedList<'a, I>
Sourcepub fn iter(&self) -> CombinedElements<'a, I> ⓘ
pub fn iter(&self) -> CombinedElements<'a, I> ⓘ
The elements of every line, in order.
§Examples
use parse_net::{list, Limits};
let lines: [&[u8]; 2] = [b"gzip", b"br, zstd"];
let c = list::combined(lines, &Limits::DEFAULT)?;
assert_eq!(c.iter().collect::<Vec<_>>(), [&b"gzip"[..], b"br", b"zstd"]);Trait Implementations§
Source§impl<'a, I: Clone> Clone for CombinedList<'a, I>
impl<'a, I: Clone> Clone for CombinedList<'a, I>
Auto Trait Implementations§
impl<'a, I> Freeze for CombinedList<'a, I>where
I: Freeze,
impl<'a, I> RefUnwindSafe for CombinedList<'a, I>where
I: RefUnwindSafe,
impl<'a, I> Send for CombinedList<'a, I>where
I: Send,
impl<'a, I> Sync for CombinedList<'a, I>where
I: Sync,
impl<'a, I> Unpin for CombinedList<'a, I>where
I: Unpin,
impl<'a, I> UnsafeUnpin for CombinedList<'a, I>where
I: UnsafeUnpin,
impl<'a, I> UnwindSafe for CombinedList<'a, I>where
I: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more