pub struct Text<'a> { /* private fields */ }Expand description
A string claim’s text, read without copying it. Its escapes were checked by text, so reading it cannot fail.
Implementations§
Source§impl<'a> Text<'a>
impl<'a> Text<'a>
pub fn is_empty(&self) -> bool
pub fn bytes(&self) -> TextBytes<'a> ⓘ
Sourcepub fn is(&self, want: impl AsRef<[u8]>) -> bool
pub fn is(&self, want: impl AsRef<[u8]>) -> bool
Whether the text is exactly want (a byte string or a str).
pub fn starts_with(&self, prefix: impl AsRef<[u8]>) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Text<'a>
impl<'a> RefUnwindSafe for Text<'a>
impl<'a> Send for Text<'a>
impl<'a> Sync for Text<'a>
impl<'a> Unpin for Text<'a>
impl<'a> UnsafeUnpin for Text<'a>
impl<'a> UnwindSafe for Text<'a>
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