pub struct Class(/* private fields */);Expand description
A set of byte classes, for all and the scanning functions.
The named constants are the classes of dev/PLAN.md section 7.1.
§Examples
use parse_net::class::Class;
let host_chars = Class::UNRESERVED.union(Class::SUB_DELIM);
assert!(host_chars.contains(b'!') && !host_chars.contains(b'/'));Implementations§
Source§impl Class
impl Class
Sourcepub const FIELD_TEXT: Self
pub const FIELD_TEXT: Self
field-vchar / SP / HTAB (RFC 9110 section 5.5).
Sourcepub const QUOTED_PAIR: Self
pub const QUOTED_PAIR: Self
The byte after \ in a quoted-pair: HTAB / SP / VCHAR / obs-text.
Sourcepub const MIME_TOKEN: Self
pub const MIME_TOKEN: Self
The MIME token characters (RFC 2045 section 5.1); unlike tchar,
they include { and }.
Sourcepub const UNRESERVED: Self
pub const UNRESERVED: Self
unreserved (RFC 3986 section 2.3).
Sourcepub const PCHAR_NO_PCT: Self
pub const PCHAR_NO_PCT: Self
unreserved / sub-delims / ":" / "@": pchar without pct-encoded.
Sourcepub const URI_TARGET: Self
pub const URI_TARGET: Self
pchar / "/" / "?" plus %: the characters of a request target.
Sourcepub const SF_KEY_START: Self
pub const SF_KEY_START: Self
The first byte of a Structured Field key: lcalpha / "*".
Sourcepub const SF_STRING: Self
pub const SF_STRING: Self
An unescaped Structured Field string byte: %x20-21 / %x23-5B / %x5D-7E.
Sourcepub const BCHAR_NOSPACE: Self
pub const BCHAR_NOSPACE: Self
bcharsnospace (RFC 2046 section 5.1.1).
Sourcepub const COOKIE_OCTET: Self
pub const COOKIE_OCTET: Self
cookie-octet (rfc6265bis section 4.1.1), for cookie-net.
Trait Implementations§
impl Copy for Class
impl Eq for Class
impl StructuralPartialEq for Class
Auto Trait Implementations§
impl Freeze for Class
impl RefUnwindSafe for Class
impl Send for Class
impl Sync for Class
impl Unpin for Class
impl UnsafeUnpin for Class
impl UnwindSafe for Class
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