#[non_exhaustive]pub struct Location {
pub part: Option<u32>,
pub offset: u64,
}Expand description
Where an error was found.
§Examples
let err = form_net::parse_urlencoded(b"a=1&b=%").unwrap_err();
let at = err.location().unwrap();
assert_eq!((at.part, at.offset), (None, 6));Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.part: Option<u32>The multipart part index (from 0), when the error is inside a part.
offset: u64The byte offset in the body (or in the component, for decode_into).
Implementations§
Trait Implementations§
impl Copy for Location
impl Eq for Location
impl StructuralPartialEq for Location
Auto Trait Implementations§
impl Freeze for Location
impl RefUnwindSafe for Location
impl Send for Location
impl Sync for Location
impl Unpin for Location
impl UnsafeUnpin for Location
impl UnwindSafe for Location
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