pub struct EscapedSlice(/* private fields */);Expand description
A slice buffer which is in an escaped format: containing possible 0u8 and 1u8 bytes escaped with a 1u8 as well as a final terminating null byte.
Implementations§
Source§impl EscapedSlice
impl EscapedSlice
Sourcepub unsafe fn from_slice(b: &[u8]) -> &EscapedSlice
pub unsafe fn from_slice(b: &[u8]) -> &EscapedSlice
Sourcepub fn as_bytes(&self) -> &[u8] ⓘ
pub fn as_bytes(&self) -> &[u8] ⓘ
Returns the raw underlying byte representation of the escaped string, including escaped bytes.
Sourcepub fn iter(&self) -> EscapedIter<'_> ⓘ
pub fn iter(&self) -> EscapedIter<'_> ⓘ
Returns an iterator over the bytes in this slice, unescaping escaped bytes.