pub struct StrLit {
pub escaped: String,
}
Expand description
String literal, both string
and bytes
.
Fields§
§escaped: String
Implementations§
source§impl StrLit
impl StrLit
sourcepub fn decode_utf8(&self) -> StrLitDecodeResult<String>
pub fn decode_utf8(&self) -> StrLitDecodeResult<String>
May fail if not valid UTF8
pub fn decode_bytes(&self) -> StrLitDecodeResult<Vec<u8>>
pub fn quoted(&self) -> String
Trait Implementations§
impl Eq for StrLit
impl StructuralPartialEq for StrLit
Auto Trait Implementations§
impl Freeze for StrLit
impl RefUnwindSafe for StrLit
impl Send for StrLit
impl Sync for StrLit
impl Unpin for StrLit
impl UnwindSafe for StrLit
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§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
)