Struct fluent_uri::encoding::Table
source · pub struct Table { /* private fields */ }Expand description
A table specifying the byte patterns allowed in a string.
Implementations§
source§impl Table
impl Table
sourcepub const fn gen(bytes: &[u8]) -> Table
pub const fn gen(bytes: &[u8]) -> Table
Generates a table that only allows the given unencoded bytes.
§Panics
Panics if any of the bytes is not ASCII or equals b'%'.
sourcepub const fn or(self, other: &Table) -> Table
pub const fn or(self, other: &Table) -> Table
Combines two tables into one.
Returns a new table that allows all the byte patterns allowed
by self or by other.
sourcepub const fn sub(self, other: &Table) -> Table
pub const fn sub(self, other: &Table) -> Table
Subtracts from this table.
Returns a new table that allows all the byte patterns allowed
by self but not allowed by other.
sourcepub const fn is_subset(&self, other: &Table) -> bool
pub const fn is_subset(&self, other: &Table) -> bool
Checks whether the table is a subset of another, i.e., other
allows at least all the byte patterns allowed by self.
sourcepub const fn allows(&self, x: u8) -> bool
pub const fn allows(&self, x: u8) -> bool
Checks whether the given unencoded byte is allowed by the table.
sourcepub const fn allows_enc(&self) -> bool
pub const fn allows_enc(&self) -> bool
Checks whether percent-encoded octets are allowed by the table.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Table
impl RefUnwindSafe for Table
impl Send for Table
impl Sync for Table
impl Unpin for Table
impl UnwindSafe for Table
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)