pub struct NoInspector;Expand description
An inspector that accepts everything; it compiles to nothing.
§Examples
use form_net::{Limits, NoInspector, Policy};
let form = form_net::parse_urlencoded_inspected(b"a=1", &Limits::DEFAULT, &Policy::DEFAULT, &mut NoInspector)?;
assert_eq!(form.get("a"), Some("1"));Trait Implementations§
Source§impl Clone for NoInspector
impl Clone for NoInspector
impl Copy for NoInspector
Source§impl Debug for NoInspector
impl Debug for NoInspector
Source§impl Default for NoInspector
impl Default for NoInspector
Source§impl Inspector for NoInspector
impl Inspector for NoInspector
Source§fn part_start(&mut self, head: &PartHead<'_>) -> Verdict
fn part_start(&mut self, head: &PartHead<'_>) -> Verdict
A part’s headers were read and passed every rule. Called before any
byte of the part reaches a sink.
Source§fn sniff(&mut self, head: &PartHead<'_>, first: &[u8]) -> Verdict
fn sniff(&mut self, head: &PartHead<'_>, first: &[u8]) -> Verdict
The first
min(sniff_bytes, part length) bytes of a file part, as one
contiguous slice however the input was split, before any data call
for that part.Source§fn data(&mut self, part: u32, chunk: &[u8]) -> Verdict
fn data(&mut self, part: u32, chunk: &[u8]) -> Verdict
Bytes of part
part’s data, text fields included.Source§fn field(&mut self, name: &str, value: &[u8]) -> Verdict
fn field(&mut self, name: &str, value: &[u8]) -> Verdict
A complete text field (multipart) or a decoded pair (urlencoded): the
value as bytes, so the inspector can apply its own charset rules.
Skip leaves the field out of the result.Source§fn part_end(&mut self, summary: &PartSummary) -> Verdict
fn part_end(&mut self, summary: &PartSummary) -> Verdict
A part ended.
Skip here is treated as Continue.Auto Trait Implementations§
impl Freeze for NoInspector
impl RefUnwindSafe for NoInspector
impl Send for NoInspector
impl Sync for NoInspector
impl Unpin for NoInspector
impl UnsafeUnpin for NoInspector
impl UnwindSafe for NoInspector
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