#[repr(transparent)]pub struct Slice {
pub inner: [u8],
}Fields§
§inner: [u8]Implementations§
Source§impl Slice
impl Slice
pub fn as_encoded_bytes(&self) -> &[u8] ⓘ
pub unsafe fn from_encoded_bytes_unchecked(s: &[u8]) -> &Slice
pub fn check_public_boundary(&self, index: usize)
pub fn try_check_public_boundary(&self, index: usize) -> Option<()>
pub fn from_str(s: &str) -> &Slice
pub fn to_str(&self) -> Result<&str, Utf8Error>
pub fn to_string_lossy(&self) -> Cow<'_, str>
pub fn to_owned(&self) -> Buf
pub fn clone_into(&self, buf: &mut Buf)
pub fn empty_box() -> Box<Slice>
pub fn into_arc(&self) -> Arc<Slice> ⓘ
pub fn into_rc(&self) -> Rc<Slice>
pub fn make_ascii_lowercase(&mut self)
pub fn make_ascii_uppercase(&mut self)
pub fn to_ascii_lowercase(&self) -> Buf
pub fn to_ascii_uppercase(&self) -> Buf
pub fn is_ascii(&self) -> bool
pub fn eq_ignore_ascii_case(&self, other: &Self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl !Sized for Slice
impl Freeze for Slice
impl RefUnwindSafe for Slice
impl Send for Slice
impl Sync for Slice
impl Unpin for Slice
impl UnsafeUnpin for Slice
impl UnwindSafe for Slice
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> SizeHint for Twhere
T: ?Sized,
impl<T> SizeHint for Twhere
T: ?Sized,
Source§default fn lower_bound(&self) -> usize
default fn lower_bound(&self) -> usize
🔬This is a nightly-only experimental API. (
core_io_internals)Returns a lower bound on the number of elements this container-like item
contains.
For example, an array
[u8; 12] could return any value between 0 and
12 inclusively as a correct implementation. Read more