Struct Slice

Source
#[repr(transparent)]
pub struct Slice { pub inner: [u8], }

Fields§

§inner: [u8]

Implementations§

Source§

impl Slice

Source

pub fn as_encoded_bytes(&self) -> &[u8]

Source

pub unsafe fn from_encoded_bytes_unchecked(s: &[u8]) -> &Slice

Source

pub fn check_public_boundary(&self, index: usize)

Source

pub fn from_str(s: &str) -> &Slice

Source

pub fn to_str(&self) -> Result<&str, Utf8Error>

Source

pub fn to_string_lossy(&self) -> Cow<'_, str>

Source

pub fn to_owned(&self) -> Buf

Source

pub fn clone_into(&self, buf: &mut Buf)

Source

pub fn into_box(&self) -> Box<Slice>

Source

pub fn empty_box() -> Box<Slice>

Source

pub fn into_arc(&self) -> Arc<Slice>

Source

pub fn into_rc(&self) -> Rc<Slice>

Source

pub fn make_ascii_lowercase(&mut self)

Source

pub fn make_ascii_uppercase(&mut self)

Source

pub fn to_ascii_lowercase(&self) -> Buf

Source

pub fn to_ascii_uppercase(&self) -> Buf

Source

pub fn is_ascii(&self) -> bool

Source

pub fn eq_ignore_ascii_case(&self, other: &Self) -> bool

Trait Implementations§

Source§

impl AsInner<Slice> for OsStr

Source§

fn as_inner(&self) -> &Slice

Source§

impl CloneToUninit for Slice

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit #126799)
Performs copy-assignment from self to dest. Read more
Source§

impl Debug for Slice

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Slice

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Slice

§

impl RefUnwindSafe for Slice

§

impl Send for Slice

§

impl !Sized for Slice

§

impl Sync for Slice

§

impl Unpin for Slice

§

impl UnwindSafe for Slice

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more