pub trait AsBytesRef {
// Required method
fn as_bytes_ref(&self) -> &[u8] ⓘ;
}Expand description
Converts to &'a [u8]
Required Methods§
Sourcefn as_bytes_ref(&self) -> &[u8] ⓘ
fn as_bytes_ref(&self) -> &[u8] ⓘ
Converts to a u8 slice
Implementations on Foreign Types§
Source§impl AsBytesRef for Box<[u8]>
Available on crate feature alloc only.
impl AsBytesRef for Box<[u8]>
Available on crate feature
alloc only.fn as_bytes_ref(&self) -> &[u8] ⓘ
Source§impl AsBytesRef for String
impl AsBytesRef for String
fn as_bytes_ref(&self) -> &[u8] ⓘ
Source§impl AsBytesRef for Vec<u8>
Available on crate feature alloc only.
impl AsBytesRef for Vec<u8>
Available on crate feature
alloc only.fn as_bytes_ref(&self) -> &[u8] ⓘ
Source§impl AsBytesRef for Bytes
Available on crate feature bytes only.
impl AsBytesRef for Bytes
Available on crate feature
bytes only.fn as_bytes_ref(&self) -> &[u8] ⓘ
Source§impl AsBytesRef for BytesMut
Available on crate feature bytes only.
impl AsBytesRef for BytesMut
Available on crate feature
bytes only.fn as_bytes_ref(&self) -> &[u8] ⓘ
Source§impl<'a> AsBytesRef for &'a str
impl<'a> AsBytesRef for &'a str
fn as_bytes_ref(&self) -> &[u8] ⓘ
Source§impl<'a> AsBytesRef for &'a Box<[u8]>
Available on crate feature alloc only.
impl<'a> AsBytesRef for &'a Box<[u8]>
Available on crate feature
alloc only.fn as_bytes_ref(&self) -> &[u8] ⓘ
Source§impl<'a> AsBytesRef for &'a String
impl<'a> AsBytesRef for &'a String
fn as_bytes_ref(&self) -> &[u8] ⓘ
Source§impl<'a> AsBytesRef for &'a Vec<u8>
Available on crate feature alloc only.
impl<'a> AsBytesRef for &'a Vec<u8>
Available on crate feature
alloc only.fn as_bytes_ref(&self) -> &[u8] ⓘ
Source§impl<'a> AsBytesRef for &'a Bytes
Available on crate feature bytes only.
impl<'a> AsBytesRef for &'a Bytes
Available on crate feature
bytes only.fn as_bytes_ref(&self) -> &[u8] ⓘ
Source§impl<'a> AsBytesRef for &'a BytesMut
Available on crate feature bytes only.
impl<'a> AsBytesRef for &'a BytesMut
Available on crate feature
bytes only.fn as_bytes_ref(&self) -> &[u8] ⓘ
Source§impl<'a> AsBytesRef for &'a [u8]
impl<'a> AsBytesRef for &'a [u8]
fn as_bytes_ref(&self) -> &[u8] ⓘ
Source§impl<'a> AsBytesRef for &'a mut str
impl<'a> AsBytesRef for &'a mut str
fn as_bytes_ref(&self) -> &[u8] ⓘ
Source§impl<'a> AsBytesRef for &'a mut Box<[u8]>
Available on crate feature alloc only.
impl<'a> AsBytesRef for &'a mut Box<[u8]>
Available on crate feature
alloc only.fn as_bytes_ref(&self) -> &[u8] ⓘ
Source§impl<'a> AsBytesRef for &'a mut String
impl<'a> AsBytesRef for &'a mut String
fn as_bytes_ref(&self) -> &[u8] ⓘ
Source§impl<'a> AsBytesRef for &'a mut Vec<u8>
Available on crate feature alloc only.
impl<'a> AsBytesRef for &'a mut Vec<u8>
Available on crate feature
alloc only.fn as_bytes_ref(&self) -> &[u8] ⓘ
Source§impl<'a> AsBytesRef for &'a mut BytesMut
Available on crate feature bytes only.
impl<'a> AsBytesRef for &'a mut BytesMut
Available on crate feature
bytes only.