(function() { var type_impls = Object.fromEntries([["auth",[["
§

impl Adler32Hash for &[u8]

§

fn hash(&self) -> u32

Feeds this value into Adler32.
","Adler32Hash","auth::common::HashedPassword","auth::common::Salt"],["
§

impl Arg for &[u8]

§

fn as_str(&self) -> Result<&str, Errno>

Returns a view of this string as a string slice.
§

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

Returns a potentially-lossy rendering of this string as a\nCow<'_, str>.
§

fn as_cow_c_str(&self) -> Result<Cow<'_, CStr>, Errno>

Returns a view of this string as a maybe-owned CStr.
§

fn into_c_str<'b>(self) -> Result<Cow<'b, CStr>, Errno>
where\n &[u8]: 'b,

Consumes self and returns a view of this string as a maybe-owned\nCStr.
§

fn into_with_c_str<T, F>(self, f: F) -> Result<T, Errno>
where\n &[u8]: Sized,\n F: FnOnce(&CStr) -> Result<T, Errno>,

Runs a closure with self passed in as a &CStr.
","Arg","auth::common::HashedPassword","auth::common::Salt"],["
§

impl Arg for &[u8]

§

fn as_str(&self) -> Result<&str, Errno>

Returns a view of this string as a string slice.
§

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

Returns a potentially-lossy rendering of this string as a\nCow<'_, str>.
§

fn as_cow_c_str(&self) -> Result<Cow<'_, CStr>, Errno>

Returns a view of this string as a maybe-owned CStr.
§

fn into_c_str<'b>(self) -> Result<Cow<'b, CStr>, Errno>
where\n &[u8]: 'b,

Consumes self and returns a view of this string as a maybe-owned\nCStr.
§

fn into_with_c_str<T, F>(self, f: F) -> Result<T, Errno>
where\n &[u8]: Sized,\n F: FnOnce(&CStr) -> Result<T, Errno>,

Runs a closure with self passed in as a &CStr.
","Arg","auth::common::HashedPassword","auth::common::Salt"],["
§

impl AsBStr for &[u8]

§

fn as_bstr(&self) -> &[u8] ⓘ

Casts the input type to a byte slice
","AsBStr","auth::common::HashedPassword","auth::common::Salt"],["
§

impl AsBytes for &[u8]

§

fn as_bytes(&self) -> &[u8] ⓘ

Casts the input type to a byte slice
","AsBytes","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> AsBytes for &'a [u8]

§

fn as_bytes(&self) -> &[u8] ⓘ

Casts the input type to a byte slice
","AsBytes","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> AsBytes for &'a [u8]

§

fn as_bytes(&self) -> &[u8] ⓘ

Casts the input type to a byte slice
","AsBytes","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<T> AsRef<ZeroSlice<T>> for &[<T as AsULE>::ULE]
where\n T: AsULE,

§

fn as_ref(&self) -> &ZeroSlice<T>

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl AsyncBufRead for &[u8]

§

fn poll_fill_buf(\n self: Pin<&mut &[u8]>,\n _: &mut Context<'_>,\n) -> Poll<Result<&[u8], Error>>

Attempt to return the contents of the internal buffer, filling it with more data\nfrom the inner reader if it is empty. Read more
§

fn consume(self: Pin<&mut &[u8]>, amt: usize)

Tells this buffer that amt bytes have been consumed from the buffer,\nso they should no longer be returned in calls to poll_read. Read more
","AsyncBufRead","auth::common::HashedPassword","auth::common::Salt"],["
§

impl AsyncBufRead for &[u8]

§

fn poll_fill_buf(\n self: Pin<&mut &[u8]>,\n _cx: &mut Context<'_>,\n) -> Poll<Result<&[u8], Error>>

Attempts to return the contents of the internal buffer, filling it with more data\nfrom the inner reader if it is empty. Read more
§

fn consume(self: Pin<&mut &[u8]>, amt: usize)

Tells this buffer that amt bytes have been consumed from the buffer,\nso they should no longer be returned in calls to poll_read. Read more
","AsyncBufRead","auth::common::HashedPassword","auth::common::Salt"],["
§

impl AsyncRead for &[u8]

§

fn poll_read(\n self: Pin<&mut &[u8]>,\n _: &mut Context<'_>,\n buf: &mut [u8],\n) -> Poll<Result<usize, Error>>

Attempt to read from the AsyncRead into buf. Read more
§

fn poll_read_vectored(\n self: Pin<&mut &[u8]>,\n _: &mut Context<'_>,\n bufs: &mut [IoSliceMut<'_>],\n) -> Poll<Result<usize, Error>>

Attempt to read from the AsyncRead into bufs using vectored\nIO operations. Read more
","AsyncRead","auth::common::HashedPassword","auth::common::Salt"],["
§

impl AsyncRead for &[u8]

§

fn poll_read(\n self: Pin<&mut &[u8]>,\n _cx: &mut Context<'_>,\n buf: &mut ReadBuf<'_>,\n) -> Poll<Result<(), Error>>

Attempts to read from the AsyncRead into buf. Read more
","AsyncRead","auth::common::HashedPassword","auth::common::Salt"],["
§

impl Buf for &[u8]

§

fn remaining(&self) -> usize

Returns the number of bytes between the current position and the end of\nthe buffer. Read more
§

fn chunk(&self) -> &[u8] ⓘ

Returns a slice starting at the current position and of length between 0\nand Buf::remaining(). Note that this can return a shorter slice (this\nallows non-continuous internal representation). Read more
§

fn advance(&mut self, cnt: usize)

Advance the internal cursor of the Buf Read more
§

fn copy_to_slice(&mut self, dst: &mut [u8])

Copies bytes from self into dst. Read more
§

fn chunks_vectored<'a>(&'a self, dst: &mut [IoSlice<'a>]) -> usize

Fills dst with potentially multiple slices starting at self’s\ncurrent position. Read more
§

fn has_remaining(&self) -> bool

Returns true if there are any more bytes to consume Read more
§

fn get_u8(&mut self) -> u8

Gets an unsigned 8 bit integer from self. Read more
§

fn get_i8(&mut self) -> i8

Gets a signed 8 bit integer from self. Read more
§

fn get_u16(&mut self) -> u16

Gets an unsigned 16 bit integer from self in big-endian byte order. Read more
§

fn get_u16_le(&mut self) -> u16

Gets an unsigned 16 bit integer from self in little-endian byte order. Read more
§

fn get_u16_ne(&mut self) -> u16

Gets an unsigned 16 bit integer from self in native-endian byte order. Read more
§

fn get_i16(&mut self) -> i16

Gets a signed 16 bit integer from self in big-endian byte order. Read more
§

fn get_i16_le(&mut self) -> i16

Gets a signed 16 bit integer from self in little-endian byte order. Read more
§

fn get_i16_ne(&mut self) -> i16

Gets a signed 16 bit integer from self in native-endian byte order. Read more
§

fn get_u32(&mut self) -> u32

Gets an unsigned 32 bit integer from self in the big-endian byte order. Read more
§

fn get_u32_le(&mut self) -> u32

Gets an unsigned 32 bit integer from self in the little-endian byte order. Read more
§

fn get_u32_ne(&mut self) -> u32

Gets an unsigned 32 bit integer from self in native-endian byte order. Read more
§

fn get_i32(&mut self) -> i32

Gets a signed 32 bit integer from self in big-endian byte order. Read more
§

fn get_i32_le(&mut self) -> i32

Gets a signed 32 bit integer from self in little-endian byte order. Read more
§

fn get_i32_ne(&mut self) -> i32

Gets a signed 32 bit integer from self in native-endian byte order. Read more
§

fn get_u64(&mut self) -> u64

Gets an unsigned 64 bit integer from self in big-endian byte order. Read more
§

fn get_u64_le(&mut self) -> u64

Gets an unsigned 64 bit integer from self in little-endian byte order. Read more
§

fn get_u64_ne(&mut self) -> u64

Gets an unsigned 64 bit integer from self in native-endian byte order. Read more
§

fn get_i64(&mut self) -> i64

Gets a signed 64 bit integer from self in big-endian byte order. Read more
§

fn get_i64_le(&mut self) -> i64

Gets a signed 64 bit integer from self in little-endian byte order. Read more
§

fn get_i64_ne(&mut self) -> i64

Gets a signed 64 bit integer from self in native-endian byte order. Read more
§

fn get_u128(&mut self) -> u128

Gets an unsigned 128 bit integer from self in big-endian byte order. Read more
§

fn get_u128_le(&mut self) -> u128

Gets an unsigned 128 bit integer from self in little-endian byte order. Read more
§

fn get_u128_ne(&mut self) -> u128

Gets an unsigned 128 bit integer from self in native-endian byte order. Read more
§

fn get_i128(&mut self) -> i128

Gets a signed 128 bit integer from self in big-endian byte order. Read more
§

fn get_i128_le(&mut self) -> i128

Gets a signed 128 bit integer from self in little-endian byte order. Read more
§

fn get_i128_ne(&mut self) -> i128

Gets a signed 128 bit integer from self in native-endian byte order. Read more
§

fn get_uint(&mut self, nbytes: usize) -> u64

Gets an unsigned n-byte integer from self in big-endian byte order. Read more
§

fn get_uint_le(&mut self, nbytes: usize) -> u64

Gets an unsigned n-byte integer from self in little-endian byte order. Read more
§

fn get_uint_ne(&mut self, nbytes: usize) -> u64

Gets an unsigned n-byte integer from self in native-endian byte order. Read more
§

fn get_int(&mut self, nbytes: usize) -> i64

Gets a signed n-byte integer from self in big-endian byte order. Read more
§

fn get_int_le(&mut self, nbytes: usize) -> i64

Gets a signed n-byte integer from self in little-endian byte order. Read more
§

fn get_int_ne(&mut self, nbytes: usize) -> i64

Gets a signed n-byte integer from self in native-endian byte order. Read more
§

fn get_f32(&mut self) -> f32

Gets an IEEE754 single-precision (4 bytes) floating point number from\nself in big-endian byte order. Read more
§

fn get_f32_le(&mut self) -> f32

Gets an IEEE754 single-precision (4 bytes) floating point number from\nself in little-endian byte order. Read more
§

fn get_f32_ne(&mut self) -> f32

Gets an IEEE754 single-precision (4 bytes) floating point number from\nself in native-endian byte order. Read more
§

fn get_f64(&mut self) -> f64

Gets an IEEE754 double-precision (8 bytes) floating point number from\nself in big-endian byte order. Read more
§

fn get_f64_le(&mut self) -> f64

Gets an IEEE754 double-precision (8 bytes) floating point number from\nself in little-endian byte order. Read more
§

fn get_f64_ne(&mut self) -> f64

Gets an IEEE754 double-precision (8 bytes) floating point number from\nself in native-endian byte order. Read more
§

fn try_copy_to_slice(&mut self, dst: &mut [u8]) -> Result<(), TryGetError>

Copies bytes from self into dst. Read more
§

fn try_get_u8(&mut self) -> Result<u8, TryGetError>

Gets an unsigned 8 bit integer from self. Read more
§

fn try_get_i8(&mut self) -> Result<i8, TryGetError>

Gets a signed 8 bit integer from self. Read more
§

fn try_get_u16(&mut self) -> Result<u16, TryGetError>

Gets an unsigned 16 bit integer from self in big-endian byte order. Read more
§

fn try_get_u16_le(&mut self) -> Result<u16, TryGetError>

Gets an unsigned 16 bit integer from self in little-endian byte order. Read more
§

fn try_get_u16_ne(&mut self) -> Result<u16, TryGetError>

Gets an unsigned 16 bit integer from self in native-endian byte order. Read more
§

fn try_get_i16(&mut self) -> Result<i16, TryGetError>

Gets a signed 16 bit integer from self in big-endian byte order. Read more
§

fn try_get_i16_le(&mut self) -> Result<i16, TryGetError>

Gets an signed 16 bit integer from self in little-endian byte order. Read more
§

fn try_get_i16_ne(&mut self) -> Result<i16, TryGetError>

Gets a signed 16 bit integer from self in native-endian byte order. Read more
§

fn try_get_u32(&mut self) -> Result<u32, TryGetError>

Gets an unsigned 32 bit integer from self in big-endian byte order. Read more
§

fn try_get_u32_le(&mut self) -> Result<u32, TryGetError>

Gets an unsigned 32 bit integer from self in little-endian byte order. Read more
§

fn try_get_u32_ne(&mut self) -> Result<u32, TryGetError>

Gets an unsigned 32 bit integer from self in native-endian byte order. Read more
§

fn try_get_i32(&mut self) -> Result<i32, TryGetError>

Gets a signed 32 bit integer from self in big-endian byte order. Read more
§

fn try_get_i32_le(&mut self) -> Result<i32, TryGetError>

Gets a signed 32 bit integer from self in little-endian byte order. Read more
§

fn try_get_i32_ne(&mut self) -> Result<i32, TryGetError>

Gets a signed 32 bit integer from self in native-endian byte order. Read more
§

fn try_get_u64(&mut self) -> Result<u64, TryGetError>

Gets an unsigned 64 bit integer from self in big-endian byte order. Read more
§

fn try_get_u64_le(&mut self) -> Result<u64, TryGetError>

Gets an unsigned 64 bit integer from self in little-endian byte order. Read more
§

fn try_get_u64_ne(&mut self) -> Result<u64, TryGetError>

Gets an unsigned 64 bit integer from self in native-endian byte order. Read more
§

fn try_get_i64(&mut self) -> Result<i64, TryGetError>

Gets a signed 64 bit integer from self in big-endian byte order. Read more
§

fn try_get_i64_le(&mut self) -> Result<i64, TryGetError>

Gets a signed 64 bit integer from self in little-endian byte order. Read more
§

fn try_get_i64_ne(&mut self) -> Result<i64, TryGetError>

Gets a signed 64 bit integer from self in native-endian byte order. Read more
§

fn try_get_u128(&mut self) -> Result<u128, TryGetError>

Gets an unsigned 128 bit integer from self in big-endian byte order. Read more
§

fn try_get_u128_le(&mut self) -> Result<u128, TryGetError>

Gets an unsigned 128 bit integer from self in little-endian byte order. Read more
§

fn try_get_u128_ne(&mut self) -> Result<u128, TryGetError>

Gets an unsigned 128 bit integer from self in native-endian byte order. Read more
§

fn try_get_i128(&mut self) -> Result<i128, TryGetError>

Gets a signed 128 bit integer from self in big-endian byte order. Read more
§

fn try_get_i128_le(&mut self) -> Result<i128, TryGetError>

Gets a signed 128 bit integer from self in little-endian byte order. Read more
§

fn try_get_i128_ne(&mut self) -> Result<i128, TryGetError>

Gets a signed 128 bit integer from self in native-endian byte order. Read more
§

fn try_get_uint(&mut self, nbytes: usize) -> Result<u64, TryGetError>

Gets an unsigned n-byte integer from self in big-endian byte order. Read more
§

fn try_get_uint_le(&mut self, nbytes: usize) -> Result<u64, TryGetError>

Gets an unsigned n-byte integer from self in little-endian byte order. Read more
§

fn try_get_uint_ne(&mut self, nbytes: usize) -> Result<u64, TryGetError>

Gets an unsigned n-byte integer from self in native-endian byte order. Read more
§

fn try_get_int(&mut self, nbytes: usize) -> Result<i64, TryGetError>

Gets a signed n-byte integer from self in big-endian byte order. Read more
§

fn try_get_int_le(&mut self, nbytes: usize) -> Result<i64, TryGetError>

Gets a signed n-byte integer from self in little-endian byte order. Read more
§

fn try_get_int_ne(&mut self, nbytes: usize) -> Result<i64, TryGetError>

Gets a signed n-byte integer from self in native-endian byte order. Read more
§

fn try_get_f32(&mut self) -> Result<f32, TryGetError>

Gets an IEEE754 single-precision (4 bytes) floating point number from\nself in big-endian byte order. Read more
§

fn try_get_f32_le(&mut self) -> Result<f32, TryGetError>

Gets an IEEE754 single-precision (4 bytes) floating point number from\nself in little-endian byte order. Read more
§

fn try_get_f32_ne(&mut self) -> Result<f32, TryGetError>

Gets an IEEE754 single-precision (4 bytes) floating point number from\nself in native-endian byte order. Read more
§

fn try_get_f64(&mut self) -> Result<f64, TryGetError>

Gets an IEEE754 double-precision (8 bytes) floating point number from\nself in big-endian byte order. Read more
§

fn try_get_f64_le(&mut self) -> Result<f64, TryGetError>

Gets an IEEE754 double-precision (8 bytes) floating point number from\nself in little-endian byte order. Read more
§

fn try_get_f64_ne(&mut self) -> Result<f64, TryGetError>

Gets an IEEE754 double-precision (8 bytes) floating point number from\nself in native-endian byte order. Read more
§

fn copy_to_bytes(&mut self, len: usize) -> Bytes

Consumes len bytes inside self and returns new instance of Bytes\nwith this data. Read more
§

fn take(self, limit: usize) -> Take<Self>
where\n Self: Sized,

Creates an adaptor which will read at most limit bytes from self. Read more
§

fn chain<U>(self, next: U) -> Chain<Self, U>
where\n U: Buf,\n Self: Sized,

Creates an adaptor which will chain this buffer with another. Read more
§

fn reader(self) -> Reader<Self>
where\n Self: Sized,

Creates an adaptor which implements the Read trait for self. Read more
","Buf","auth::common::HashedPassword","auth::common::Salt"],["
1.0.0 · Source§

impl BufRead for &[u8]

Source§

fn fill_buf(&mut self) -> Result<&[u8], Error>

Returns the contents of the internal buffer, filling it with more data, via Read methods, if empty. Read more
Source§

fn consume(&mut self, amt: usize)

Marks the given amount of additional bytes from the internal buffer as having been read.\nSubsequent calls to read only return bytes that have not been marked as read. Read more
Source§

fn has_data_left(&mut self) -> Result<bool, Error>

🔬This is a nightly-only experimental API. (buf_read_has_data_left)
Checks if there is any data left to be read. Read more
1.0.0 · Source§

fn read_until(&mut self, byte: u8, buf: &mut Vec<u8>) -> Result<usize, Error>

Reads all bytes into buf until the delimiter byte or EOF is reached. Read more
1.83.0 · Source§

fn skip_until(&mut self, byte: u8) -> Result<usize, Error>

Skips all bytes until the delimiter byte or EOF is reached. Read more
1.0.0 · Source§

fn read_line(&mut self, buf: &mut String) -> Result<usize, Error>

Reads all bytes until a newline (the 0xA byte) is reached, and append\nthem to the provided String buffer. Read more
1.0.0 · Source§

fn split(self, byte: u8) -> Split<Self>
where\n Self: Sized,

Returns an iterator over the contents of this reader split on the byte\nbyte. Read more
1.0.0 · Source§

fn lines(self) -> Lines<Self>
where\n Self: Sized,

Returns an iterator over the lines of this reader. Read more
","BufRead","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8]> for &'a [u8]

§

fn compare(&self, t: &'b [u8]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8]> for &'a [u8]

§

fn compare(&self, t: &'b [u8]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'b> Compare<&'b [u8]> for &[u8]

§

fn compare(&self, t: &'b [u8]) -> CompareResult

Compares self to another value for equality
","Compare<&'b [u8]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 0]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 0]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 0]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 0]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 1]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 1]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 1]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 1]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 10]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 10]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 10]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 10]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 11]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 11]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 11]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 11]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 12]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 12]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 12]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 12]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 13]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 13]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 13]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 13]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 14]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 14]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 14]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 14]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 15]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 15]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 15]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 15]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 16]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 16]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 16]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 16]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 17]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 17]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 17]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 17]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 18]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 18]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 18]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 18]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 19]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 19]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 19]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 19]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 2]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 2]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 2]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 2]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 20]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 20]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 20]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 20]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 21]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 21]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 21]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 21]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 22]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 22]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 22]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 22]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 23]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 23]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 23]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 23]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 24]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 24]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 24]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 24]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 25]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 25]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 25]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 25]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 26]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 26]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 26]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 26]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 27]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 27]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 27]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 27]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 28]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 28]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 28]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 28]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 29]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 29]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 29]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 29]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 3]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 3]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 3]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 3]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 30]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 30]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 30]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 30]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 31]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 31]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 31]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 31]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 32]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 32]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 32]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 32]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 4]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 4]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 4]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 4]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 5]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 5]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 5]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 5]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 6]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 6]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 6]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 6]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 7]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 7]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 7]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 7]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 8]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 8]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 8]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 8]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b [u8; 9]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 9]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 9]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 9]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'b, const LEN: usize> Compare<&'b [u8; LEN]> for &[u8]

§

fn compare(&self, t: &'b [u8; LEN]) -> CompareResult

Compares self to another value for equality
","Compare<&'b [u8; LEN]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b, const N: usize> Compare<&'b [u8; N]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; N]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; N]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; N]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b str> for &'a [u8]

§

fn compare(&self, t: &'b str) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b str) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b str>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> Compare<&'b str> for &'a [u8]

§

fn compare(&self, t: &'b str) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b str) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b str>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'b> Compare<&'b str> for &[u8]

§

fn compare(&self, t: &'b str) -> CompareResult

Compares self to another value for equality
","Compare<&'b str>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 0]> for &'a [u8]

§

fn compare(&self, t: [u8; 0]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 0]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 0]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 1]> for &'a [u8]

§

fn compare(&self, t: [u8; 1]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 1]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 1]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 10]> for &'a [u8]

§

fn compare(&self, t: [u8; 10]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 10]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 10]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 11]> for &'a [u8]

§

fn compare(&self, t: [u8; 11]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 11]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 11]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 12]> for &'a [u8]

§

fn compare(&self, t: [u8; 12]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 12]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 12]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 13]> for &'a [u8]

§

fn compare(&self, t: [u8; 13]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 13]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 13]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 14]> for &'a [u8]

§

fn compare(&self, t: [u8; 14]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 14]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 14]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 15]> for &'a [u8]

§

fn compare(&self, t: [u8; 15]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 15]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 15]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 16]> for &'a [u8]

§

fn compare(&self, t: [u8; 16]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 16]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 16]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 17]> for &'a [u8]

§

fn compare(&self, t: [u8; 17]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 17]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 17]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 18]> for &'a [u8]

§

fn compare(&self, t: [u8; 18]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 18]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 18]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 19]> for &'a [u8]

§

fn compare(&self, t: [u8; 19]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 19]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 19]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 2]> for &'a [u8]

§

fn compare(&self, t: [u8; 2]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 2]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 2]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 20]> for &'a [u8]

§

fn compare(&self, t: [u8; 20]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 20]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 20]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 21]> for &'a [u8]

§

fn compare(&self, t: [u8; 21]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 21]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 21]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 22]> for &'a [u8]

§

fn compare(&self, t: [u8; 22]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 22]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 22]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 23]> for &'a [u8]

§

fn compare(&self, t: [u8; 23]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 23]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 23]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 24]> for &'a [u8]

§

fn compare(&self, t: [u8; 24]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 24]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 24]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 25]> for &'a [u8]

§

fn compare(&self, t: [u8; 25]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 25]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 25]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 26]> for &'a [u8]

§

fn compare(&self, t: [u8; 26]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 26]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 26]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 27]> for &'a [u8]

§

fn compare(&self, t: [u8; 27]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 27]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 27]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 28]> for &'a [u8]

§

fn compare(&self, t: [u8; 28]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 28]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 28]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 29]> for &'a [u8]

§

fn compare(&self, t: [u8; 29]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 29]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 29]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 3]> for &'a [u8]

§

fn compare(&self, t: [u8; 3]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 3]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 3]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 30]> for &'a [u8]

§

fn compare(&self, t: [u8; 30]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 30]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 30]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 31]> for &'a [u8]

§

fn compare(&self, t: [u8; 31]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 31]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 31]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 32]> for &'a [u8]

§

fn compare(&self, t: [u8; 32]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 32]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 32]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 4]> for &'a [u8]

§

fn compare(&self, t: [u8; 4]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 4]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 4]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 5]> for &'a [u8]

§

fn compare(&self, t: [u8; 5]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 5]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 5]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 6]> for &'a [u8]

§

fn compare(&self, t: [u8; 6]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 6]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 6]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 7]> for &'a [u8]

§

fn compare(&self, t: [u8; 7]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 7]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 7]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 8]> for &'a [u8]

§

fn compare(&self, t: [u8; 8]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 8]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 8]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Compare<[u8; 9]> for &'a [u8]

§

fn compare(&self, t: [u8; 9]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 9]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 9]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<const LEN: usize> Compare<[u8; LEN]> for &[u8]

§

fn compare(&self, t: [u8; LEN]) -> CompareResult

Compares self to another value for equality
","Compare<[u8; LEN]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, const N: usize> Compare<[u8; N]> for &'a [u8]

§

fn compare(&self, t: [u8; N]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; N]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; N]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'b> Compare<Caseless<&'b [u8]>> for &[u8]

§

fn compare(&self, t: Caseless<&'b [u8]>) -> CompareResult

Compares self to another value for equality
","Compare>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'b, const LEN: usize> Compare<Caseless<&'b [u8; LEN]>> for &[u8]

§

fn compare(&self, t: Caseless<&'b [u8; LEN]>) -> CompareResult

Compares self to another value for equality
","Compare>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'b> Compare<Caseless<&'b str>> for &[u8]

§

fn compare(&self, t: Caseless<&'b str>) -> CompareResult

Compares self to another value for equality
","Compare>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<const LEN: usize> Compare<Caseless<[u8; LEN]>> for &[u8]

§

fn compare(&self, t: Caseless<[u8; LEN]>) -> CompareResult

Compares self to another value for equality
","Compare>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl Compare<Caseless<char>> for &[u8]

§

fn compare(&self, t: Caseless<char>) -> CompareResult

Compares self to another value for equality
","Compare>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl Compare<Caseless<u8>> for &[u8]

§

fn compare(&self, t: Caseless<u8>) -> CompareResult

Compares self to another value for equality
","Compare>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl Compare<char> for &[u8]

§

fn compare(&self, t: char) -> CompareResult

Compares self to another value for equality
","Compare","auth::common::HashedPassword","auth::common::Salt"],["
§

impl Compare<u8> for &[u8]

§

fn compare(&self, t: u8) -> CompareResult

Compares self to another value for equality
","Compare","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<C> ContainsToken<C> for &[u8]
where\n C: AsChar,

§

fn contains_token(&self, token: C) -> bool

Returns true if self contains the token
","ContainsToken","auth::common::HashedPassword","auth::common::Salt"],["
1.0.0 (const: unstable) · Source§

impl<T> Default for &[T]

Source§

fn default() -> &[T]

Creates an empty slice.

\n
","Default","auth::common::HashedPassword","auth::common::Salt"],["
Source§

impl<'de, 'a> Deserialize<'de> for &'a [u8]
where\n 'de: 'a,

Source§

fn deserialize<D>(\n deserializer: D,\n) -> Result<&'a [u8], <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<T, E, F> EncodeAsVarULE<VarZeroSlice<T, F>> for &[E]
where\n T: VarULE + ?Sized,\n E: EncodeAsVarULE<T>,\n F: VarZeroVecFormat,

§

fn encode_var_ule_as_slices<R>(&self, _: impl FnOnce(&[&[u8]]) -> R) -> R

Calls cb with a piecewise list of byte slices that when concatenated\nproduce the memory pattern of the corresponding instance of T. Read more
§

fn encode_var_ule_len(&self) -> usize

Return the length, in bytes, of the corresponding [VarULE] type
§

fn encode_var_ule_write(&self, dst: &mut [u8])

Write the corresponding [VarULE] type to the dst buffer. dst should\nbe the size of [Self::encode_var_ule_len()]
","EncodeAsVarULE>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<T> EncodeAsVarULE<ZeroSlice<T>> for &[T]
where\n T: AsULE + 'static,

§

fn encode_var_ule_as_slices<R>(&self, _: impl FnOnce(&[&[u8]]) -> R) -> R

Calls cb with a piecewise list of byte slices that when concatenated\nproduce the memory pattern of the corresponding instance of T. Read more
§

fn encode_var_ule_len(&self) -> usize

Return the length, in bytes, of the corresponding [VarULE] type
§

fn encode_var_ule_write(&self, dst: &mut [u8])

Write the corresponding [VarULE] type to the dst buffer. dst should\nbe the size of [Self::encode_var_ule_len()]
","EncodeAsVarULE>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl ExtendInto for &[u8]

Available on crate feature alloc only.
§

type Item = u8

The current input type is a sequence of that Item type. Read more
§

type Extender = Vec<u8>

The type that will be produced
§

fn new_builder(&self) -> Vec<u8> ⓘ

Create a new Extend of the correct type
§

fn extend_into(&self, acc: &mut Vec<u8>)

Accumulate the input into an accumulator
","ExtendInto","auth::common::HashedPassword","auth::common::Salt"],["
§

impl ExtendInto for &[u8]

Available on crate feature alloc only.
§

type Item = u8

The current input type is a sequence of that Item type. Read more
§

type Extender = Vec<u8>

The type that will be produced
§

fn new_builder(&self) -> Vec<u8> ⓘ

Create a new Extend of the correct type
§

fn extend_into(&self, acc: &mut Vec<u8>)

Accumulate the input into an accumulator
","ExtendInto","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'s> FindSlice<&'s [u8]> for &[u8]

§

fn find_slice(&self, substr: &'s [u8]) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<&'s [u8]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'s> FindSlice<&'s str> for &[u8]

§

fn find_slice(&self, substr: &'s str) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<&'s str>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'s> FindSlice<(&'s [u8],)> for &[u8]

§

fn find_slice(&self, substr: (&'s [u8],)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(&'s [u8],)>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'s> FindSlice<(&'s [u8], &'s [u8])> for &[u8]

§

fn find_slice(&self, substr: (&'s [u8], &'s [u8])) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(&'s [u8], &'s [u8])>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'s> FindSlice<(&'s [u8], &'s [u8], &'s [u8])> for &[u8]

§

fn find_slice(\n &self,\n substr: (&'s [u8], &'s [u8], &'s [u8]),\n) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(&'s [u8], &'s [u8], &'s [u8])>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'s> FindSlice<(&'s str,)> for &[u8]

§

fn find_slice(&self, substr: (&'s str,)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(&'s str,)>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'s> FindSlice<(&'s str, &'s str)> for &[u8]

§

fn find_slice(&self, substr: (&'s str, &'s str)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(&'s str, &'s str)>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'s> FindSlice<(&'s str, &'s str, &'s str)> for &[u8]

§

fn find_slice(\n &self,\n substr: (&'s str, &'s str, &'s str),\n) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(&'s str, &'s str, &'s str)>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl FindSlice<(char,)> for &[u8]

§

fn find_slice(&self, substr: (char,)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(char,)>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl FindSlice<(char, char)> for &[u8]

§

fn find_slice(&self, substr: (char, char)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(char, char)>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl FindSlice<(char, char, char)> for &[u8]

§

fn find_slice(&self, substr: (char, char, char)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(char, char, char)>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl FindSlice<(u8,)> for &[u8]

§

fn find_slice(&self, substr: (u8,)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(u8,)>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl FindSlice<(u8, u8)> for &[u8]

§

fn find_slice(&self, substr: (u8, u8)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(u8, u8)>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl FindSlice<(u8, u8, u8)> for &[u8]

§

fn find_slice(&self, substr: (u8, u8, u8)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(u8, u8, u8)>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl FindSlice<char> for &[u8]

§

fn find_slice(&self, substr: char) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice","auth::common::HashedPassword","auth::common::Salt"],["
§

impl FindSlice<u8> for &[u8]

§

fn find_slice(&self, substr: u8) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> FindSubstring<&'b [u8]> for &'a [u8]

§

fn find_substring(&self, substr: &'b [u8]) -> Option<usize>

Returns the byte position of the substring if it is found
","FindSubstring<&'b [u8]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> FindSubstring<&'b [u8]> for &'a [u8]

§

fn find_substring(&self, substr: &'b [u8]) -> Option<usize>

Returns the byte position of the substring if it is found
","FindSubstring<&'b [u8]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> FindSubstring<&'b str> for &'a [u8]

§

fn find_substring(&self, substr: &'b str) -> Option<usize>

Returns the byte position of the substring if it is found
","FindSubstring<&'b str>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> FindSubstring<&'b str> for &'a [u8]

§

fn find_substring(&self, substr: &'b str) -> Option<usize>

Returns the byte position of the substring if it is found
","FindSubstring<&'b str>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> FindToken<&'a u8> for &'b [u8]

§

fn find_token(&self, token: &u8) -> bool

Returns true if self contains the token
","FindToken<&'a u8>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, 'b> FindToken<&'a u8> for &'b [u8]

§

fn find_token(&self, token: &u8) -> bool

Returns true if self contains the token
","FindToken<&'a u8>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> FindToken<char> for &'a [u8]

§

fn find_token(&self, token: char) -> bool

Returns true if self contains the token
","FindToken","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> FindToken<char> for &'a [u8]

§

fn find_token(&self, token: char) -> bool

Returns true if self contains the token
","FindToken","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> FindToken<u8> for &'a [u8]

§

fn find_token(&self, token: u8) -> bool

Returns true if self contains the token
","FindToken","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> FindToken<u8> for &'a [u8]

§

fn find_token(&self, token: u8) -> bool

Returns true if self contains the token
","FindToken","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Follow<'a> for &'a [u8]

§

type Inner = &'a [u8]

§

unsafe fn follow(buf: &'a [u8], loc: usize) -> <&'a [u8] as Follow<'a>>::Inner ⓘ

Safety Read more
","Follow<'a>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> From<&'a BStr> for &'a [u8]

§

fn from(s: &'a BStr) -> &'a [u8] ⓘ

Converts to this type from the input type.
","From<&'a BStr>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> From<&'a BStr> for &'a [u8]

§

fn from(s: &'a BStr) -> &'a [u8] ⓘ

Converts to this type from the input type.
","From<&'a BStr>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> From<&'a Bytes> for &'a [u8]

§

fn from(s: &'a Bytes) -> &'a [u8] ⓘ

Converts to this type from the input type.
","From<&'a Bytes>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'h> From<Match<'h>> for &'h [u8]

§

fn from(m: Match<'h>) -> &'h [u8] ⓘ

Converts to this type from the input type.
","From>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> From<OctetStringRef<'a>> for &'a [u8]

§

fn from(octet_string: OctetStringRef<'a>) -> &'a [u8] ⓘ

Converts to this type from the input type.
","From>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> From<VideotexStringRef<'a>> for &'a [u8]

§

fn from(printable_string: VideotexStringRef<'a>) -> &'a [u8] ⓘ

Converts to this type from the input type.
","From>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> FromSql<'a> for &'a [u8]

§

fn from_sql(\n _: &Type,\n raw: &'a [u8],\n) -> Result<&'a [u8], Box<dyn Error + Send + Sync>>

Creates a new value of this type from a buffer of data of the specified\nPostgres Type in its binary format. Read more
§

fn accepts(ty: &Type) -> bool

Determines if a value of this type can be created from the specified\nPostgres Type.
§

fn from_sql_null(ty: &Type) -> Result<Self, Box<dyn Error + Send + Sync>>

Creates a new value of this type from a NULL SQL value. Read more
§

fn from_sql_nullable(\n ty: &Type,\n raw: Option<&'a [u8]>,\n) -> Result<Self, Box<dyn Error + Send + Sync>>

A convenience function that delegates to from_sql and from_sql_null depending on the\nvalue of raw.
","FromSql<'a>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Input for &'a [u8]

§

fn split_at_position_mode<OM, P, E>(\n &self,\n predicate: P,\n) -> Result<(&'a [u8], <<OM as OutputMode>::Output as Mode>::Output<&'a [u8]>), Err<E, <<OM as OutputMode>::Error as Mode>::Output<E>>>
where\n OM: OutputMode,\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as Input>::Item) -> bool,

mode version of split_at_position

\n
§

fn split_at_position_mode1<OM, P, E>(\n &self,\n predicate: P,\n e: ErrorKind,\n) -> Result<(&'a [u8], <<OM as OutputMode>::Output as Mode>::Output<&'a [u8]>), Err<E, <<OM as OutputMode>::Error as Mode>::Output<E>>>
where\n OM: OutputMode,\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as Input>::Item) -> bool,

mode version of split_at_position

\n
§

type Item = u8

The current input type is a sequence of that Item type. Read more
§

type Iter = Copied<Iter<'a, u8>>

An iterator over the input type, producing the item
§

type IterIndices = Enumerate<<&'a [u8] as Input>::Iter>

An iterator over the input type, producing the item and its byte position\nIf we’re iterating over &str, the position\ncorresponds to the byte index of the character
§

fn input_len(&self) -> usize

Calculates the input length, as indicated by its name,\nand the name of the trait itself
§

fn take(&self, index: usize) -> &'a [u8] ⓘ

Returns a slice of index bytes. panics if index > length
§

fn take_from(&self, index: usize) -> &'a [u8] ⓘ

Returns a slice starting at index bytes. panics if index > length
§

fn take_split(&self, index: usize) -> (&'a [u8], &'a [u8])

Split the stream at the index byte offset. panics if index > length
§

fn position<P>(&self, predicate: P) -> Option<usize>
where\n P: Fn(<&'a [u8] as Input>::Item) -> bool,

Returns the byte position of the first element satisfying the predicate
§

fn iter_elements(&self) -> <&'a [u8] as Input>::Iter ⓘ

Returns an iterator over the elements
§

fn iter_indices(&self) -> <&'a [u8] as Input>::IterIndices ⓘ

Returns an iterator over the elements and their byte offsets
§

fn slice_index(&self, count: usize) -> Result<usize, Needed>

Get the byte offset from the element’s position in the stream
§

fn split_at_position<P, E>(\n &self,\n predicate: P,\n) -> Result<(&'a [u8], &'a [u8]), Err<E>>
where\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as Input>::Item) -> bool,

Looks for the first element of the input type for which the condition returns true,\nand returns the input up to this position. Read more
§

fn split_at_position1<P, E>(\n &self,\n predicate: P,\n e: ErrorKind,\n) -> Result<(&'a [u8], &'a [u8]), Err<E>>
where\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as Input>::Item) -> bool,

Looks for the first element of the input type for which the condition returns true\nand returns the input up to this position. Read more
§

fn split_at_position_complete<P, E>(\n &self,\n predicate: P,\n) -> Result<(&'a [u8], &'a [u8]), Err<E>>
where\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as Input>::Item) -> bool,

Looks for the first element of the input type for which the condition returns true,\nand returns the input up to this position. Read more
§

fn split_at_position1_complete<P, E>(\n &self,\n predicate: P,\n e: ErrorKind,\n) -> Result<(&'a [u8], &'a [u8]), Err<E>>
where\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as Input>::Item) -> bool,

Looks for the first element of the input type for which the condition returns true\nand returns the input up to this position. Read more
","Input","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> InputIter for &'a [u8]

§

type Item = u8

The current input type is a sequence of that Item type. Read more
§

type Iter = Enumerate<<&'a [u8] as InputIter>::IterElem>

An iterator over the input type, producing the item and its position\nfor use with [Slice]. If we’re iterating over &str, the position\ncorresponds to the byte index of the character
§

type IterElem = Copied<Iter<'a, u8>>

An iterator over the input type, producing the item
§

fn iter_indices(&self) -> <&'a [u8] as InputIter>::Iter ⓘ

Returns an iterator over the elements and their byte offsets
§

fn iter_elements(&self) -> <&'a [u8] as InputIter>::IterElem ⓘ

Returns an iterator over the elements
§

fn position<P>(&self, predicate: P) -> Option<usize>
where\n P: Fn(<&'a [u8] as InputIter>::Item) -> bool,

Finds the byte position of the element
§

fn slice_index(&self, count: usize) -> Result<usize, Needed>

Get the byte offset from the element’s position in the stream
","InputIter","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, T> InputLength for &'a [T]

§

fn input_len(&self) -> usize

Calculates the input length, as indicated by its name,\nand the name of the trait itself
","InputLength","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> InputTake for &'a [u8]

§

fn take(&self, count: usize) -> &'a [u8] ⓘ

Returns a slice of count bytes. panics if count > length
§

fn take_split(&self, count: usize) -> (&'a [u8], &'a [u8])

Split the stream at the count byte offset. panics if count > length
","InputTake","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> InputTakeAtPosition for &'a [u8]

§

type Item = u8

The current input type is a sequence of that Item type. Read more
§

fn split_at_position<P, E>(\n &self,\n predicate: P,\n) -> Result<(&'a [u8], &'a [u8]), Err<E>>
where\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as InputTakeAtPosition>::Item) -> bool,

Looks for the first element of the input type for which the condition returns true,\nand returns the input up to this position. Read more
§

fn split_at_position1<P, E>(\n &self,\n predicate: P,\n e: ErrorKind,\n) -> Result<(&'a [u8], &'a [u8]), Err<E>>
where\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as InputTakeAtPosition>::Item) -> bool,

Looks for the first element of the input type for which the condition returns true\nand returns the input up to this position. Read more
§

fn split_at_position_complete<P, E>(\n &self,\n predicate: P,\n) -> Result<(&'a [u8], &'a [u8]), Err<E>>
where\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as InputTakeAtPosition>::Item) -> bool,

Looks for the first element of the input type for which the condition returns true,\nand returns the input up to this position. Read more
§

fn split_at_position1_complete<P, E>(\n &self,\n predicate: P,\n e: ErrorKind,\n) -> Result<(&'a [u8], &'a [u8]), Err<E>>
where\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as InputTakeAtPosition>::Item) -> bool,

Looks for the first element of the input type for which the condition returns true\nand returns the input up to this position. Read more
","InputTakeAtPosition","auth::common::HashedPassword","auth::common::Salt"],["
§

impl IntoArrayRef for &[u8]

§

fn into_array_ref(self) -> Arc<dyn Array> ⓘ

","IntoArrayRef","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> IntoByteSlice<'a> for &'a [u8]

§

fn into_byte_slice(self) -> &'a [u8] ⓘ

Coverts self into a &[u8]. Read more
","IntoByteSlice<'a>","auth::common::HashedPassword","auth::common::Salt"],["
Source§

impl<'de, 'a, E> IntoDeserializer<'de, E> for &'a [u8]
where\n E: Error,

Source§

type Deserializer = BytesDeserializer<'a, E>

The type of the deserializer being converted into.
Source§

fn into_deserializer(self) -> BytesDeserializer<'a, E>

Convert this value into a deserializer.
","IntoDeserializer<'de, E>","auth::common::HashedPassword","auth::common::Salt"],["
1.0.0 · Source§

impl<'a, T> IntoIterator for &'a [T]

Source§

type Item = &'a T

The type of the elements being iterated over.
Source§

type IntoIter = Iter<'a, T>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Iter<'a, T>

Creates an iterator from a value. Read more
","IntoIterator","auth::common::HashedPassword","auth::common::Salt"],["
§

impl IntoResponse for &'static [u8]

§

fn into_response(self) -> Response<Body>

Create a response.
","IntoResponse","auth::common::HashedPassword","auth::common::Salt"],["
§

impl Literal for &[u8]

§

fn lit(&self) -> Expr

convert the value to a Literal expression
","Literal","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, T> Offset<<&'a [T] as Stream>::Checkpoint> for &'a [T]
where\n T: Clone + Debug,

§

fn offset_from(&self, other: &<&'a [T] as Stream>::Checkpoint) -> usize

Offset between the first byte of start and the first byte of selfa Read more
","Offset<<&'a [T] as Stream>::Checkpoint>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<T> Offset for &[T]

§

fn offset_from(&self, start: &&[T]) -> usize

Offset between the first byte of start and the first byte of selfa Read more
","Offset","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Offset for &'a [u8]

§

fn offset(&self, second: &&'a [u8]) -> usize

Offset between the first byte of self and the first byte of the argument
","Offset","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Offset for &'a [u8]

§

fn offset(&self, second: &&'a [u8]) -> usize

Offset between the first byte of self and the first byte of the argument\nthe argument must be a part of self, otherwise this can fail with arithmetic\nunderflows as it compares byte offsets
","Offset","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<R> ParseSlice<R> for &[u8]
where\n R: FromStr,

§

fn parse_slice(&self) -> Option<R>

Succeeds if parse() succeeded Read more
","ParseSlice","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, R> ParseTo<R> for &'a [u8]
where\n R: FromStr,

§

fn parse_to(&self) -> Option<R>

Succeeds if parse() succeeded. The byte slice implementation\nwill first convert it to a &str, then apply the parse() function
","ParseTo","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, R> ParseTo<R> for &'a [u8]
where\n R: FromStr,

§

fn parse_to(&self) -> Option<R>

Succeeds if parse() succeeded. The byte slice implementation\nwill first convert it to a &str, then apply the parse() function
","ParseTo","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'s, I, E> Parser<I, <I as Stream>::Slice, E> for &'s [u8]
where\n E: ParserError<I>,\n I: Compare<&'s [u8]> + StreamIsPartial + Stream,

This is a shortcut for [literal][crate::token::literal].

\n

§Example

\n
\nfn parser<'s>(s: &mut &'s [u8]) -> ModalResult<&'s [u8]> {\n  alt((&\"Hello\"[..], take(5usize))).parse_next(s)\n}\n\nassert_eq!(parser.parse_peek(&b\"Hello, World!\"[..]), Ok((&b\", World!\"[..], &b\"Hello\"[..])));\nassert_eq!(parser.parse_peek(&b\"Something\"[..]), Ok((&b\"hing\"[..], &b\"Somet\"[..])));\nassert!(parser.parse_peek(&b\"Some\"[..]).is_err());\nassert!(parser.parse_peek(&b\"\"[..]).is_err());
§

fn parse_next(&mut self, i: &mut I) -> Result<<I as Stream>::Slice, E>

Take tokens from the [Stream], turning it into the output Read more
§

fn parse(\n &mut self,\n input: I,\n) -> Result<O, ParseError<I, <E as ParserError<I>>::Inner>>
where\n Self: Sized,\n I: Stream + StreamIsPartial,\n E: ParserError<I>,\n <E as ParserError<I>>::Inner: ParserError<I>,

Parse all of input, generating O from it
§

fn parse_peek(&mut self, input: I) -> Result<(I, O), E>

Take tokens from the [Stream], turning it into the output Read more
§

fn by_ref(&mut self) -> ByRef<'_, Self, I, O, E>
where\n Self: Sized,

Treat &mut Self as a parser Read more
§

fn value<O2>(self, val: O2) -> Value<Self, I, O, O2, E>
where\n Self: Sized,\n O2: Clone,

Produce the provided value Read more
§

fn default_value<O2>(self) -> DefaultValue<Self, I, O, O2, E>
where\n Self: Sized,\n O2: Default,

Produce a type’s default value Read more
§

fn void(self) -> Void<Self, I, O, E>
where\n Self: Sized,

Discards the output of the Parser Read more
§

fn output_into<O2>(self) -> OutputInto<Self, I, O, O2, E>
where\n Self: Sized,\n O: Into<O2>,

Convert the parser’s output to another type using std::convert::From Read more
§

fn take(self) -> Take<Self, I, O, E>
where\n Self: Sized,\n I: Stream,

Produce the consumed input as produced value. Read more
§

fn with_taken(self) -> WithTaken<Self, I, O, E>
where\n Self: Sized,\n I: Stream,

Produce the consumed input with the output Read more
§

fn span(self) -> Span<Self, I, O, E>
where\n Self: Sized,\n I: Stream + Location,

Produce the location of the consumed input as produced value. Read more
§

fn with_span(self) -> WithSpan<Self, I, O, E>
where\n Self: Sized,\n I: Stream + Location,

Produce the location of consumed input with the output Read more
§

fn map<G, O2>(self, map: G) -> Map<Self, G, I, O, O2, E>
where\n G: FnMut(O) -> O2,\n Self: Sized,

Maps a function over the output of a parser Read more
§

fn try_map<G, O2, E2>(self, map: G) -> TryMap<Self, G, I, O, O2, E, E2>
where\n Self: Sized,\n G: FnMut(O) -> Result<O2, E2>,\n I: Stream,\n E: FromExternalError<I, E2> + ParserError<I>,

Applies a function returning a Result over the output of a parser. Read more
§

fn verify_map<G, O2>(self, map: G) -> VerifyMap<Self, G, I, O, O2, E>
where\n Self: Sized,\n G: FnMut(O) -> Option<O2>,\n I: Stream,\n E: ParserError<I>,

Apply both [Parser::verify] and [Parser::map]. Read more
§

fn flat_map<G, H, O2>(self, map: G) -> FlatMap<Self, G, H, I, O, O2, E>
where\n Self: Sized,\n G: FnMut(O) -> H,\n H: Parser<I, O2, E>,

Creates a parser from the output of this one Read more
§

fn and_then<G, O2>(self, inner: G) -> AndThen<Self, G, I, O, O2, E>
where\n Self: Sized,\n G: Parser<O, O2, E>,\n O: StreamIsPartial,\n I: Stream,

Applies a second parser over the output of the first one Read more
§

fn parse_to<O2>(self) -> ParseTo<Self, I, O, O2, E>
where\n Self: Sized,\n I: Stream,\n O: ParseSlice<O2>,\n E: ParserError<I>,

Apply std::str::FromStr to the output of the parser Read more
§

fn verify<G, O2>(self, filter: G) -> Verify<Self, G, I, O, O2, E>
where\n Self: Sized,\n G: FnMut(&O2) -> bool,\n I: Stream,\n O: Borrow<O2>,\n E: ParserError<I>,\n O2: ?Sized,

Returns the output of the child parser if it satisfies a verification function. Read more
§

fn context<C>(self, context: C) -> Context<Self, I, O, E, C>
where\n Self: Sized,\n I: Stream,\n E: AddContext<I, C> + ParserError<I>,\n C: Clone + Debug,

If parsing fails, add context to the error Read more
§

fn context_with<F, C, FI>(\n self,\n context: F,\n) -> ContextWith<Self, I, O, E, F, C, FI>
where\n Self: Sized,\n I: Stream,\n E: AddContext<I, C> + ParserError<I>,\n F: Fn() -> FI + Clone,\n C: Debug,\n FI: Iterator<Item = C>,

If parsing fails, dynamically add context to the error Read more
§

fn map_err<G, E2>(self, map: G) -> MapErr<Self, G, I, O, E, E2>
where\n G: FnMut(E) -> E2,\n Self: Sized,

Maps a function over the error of a parser Read more
§

fn complete_err(self) -> CompleteErr<Self, I, O, E>
where\n Self: Sized,

Transforms [Incomplete][crate::error::ErrMode::Incomplete] into [Backtrack][crate::error::ErrMode::Backtrack] Read more
§

fn err_into<E2>(self) -> ErrInto<Self, I, O, E, E2>
where\n Self: Sized,\n E: Into<E2>,

Convert the parser’s error to another type using std::convert::From
","Parser::Slice, E>","auth::common::HashedPassword","auth::common::Salt"],["
1.0.0 (const: unstable) · Source§

impl<T, U, const N: usize> PartialEq<[U; N]> for &[T]
where\n T: PartialEq<U>,

Source§

fn eq(&self, other: &[U; N]) -> bool

Tests for self and other values to be equal, and is used by ==.
Source§

fn ne(&self, other: &[U; N]) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq<[U; N]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> PartialEq<BStr> for &'a [u8]

§

fn eq(&self, other: &BStr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> PartialEq<BStr> for &'a [u8]

§

fn eq(&self, other: &BStr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> PartialEq<BString> for &'a [u8]

§

fn eq(&self, other: &BString) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","auth::common::HashedPassword","auth::common::Salt"],["
Source§

impl PartialEq<ByteStr> for &[u8]

Source§

fn eq(&self, other: &ByteStr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","auth::common::HashedPassword","auth::common::Salt"],["
Source§

impl PartialEq<ByteString> for &[u8]

Source§

fn eq(&self, other: &ByteString) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","auth::common::HashedPassword","auth::common::Salt"],["
§

impl PartialEq<Bytes> for &[u8]

§

fn eq(&self, other: &Bytes) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> PartialEq<Bytes> for &'a [u8]

§

fn eq(&self, other: &Bytes) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","auth::common::HashedPassword","auth::common::Salt"],["
§

impl PartialEq<BytesMut> for &[u8]

§

fn eq(&self, other: &BytesMut) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<T, U, A> PartialEq<Vec<U, A>> for &[T]
where\n A: Allocator,\n T: PartialEq<U>,

§

fn eq(&self, other: &Vec<U, A>) -> bool

Tests for self and other values to be equal, and is used by ==.
§

fn ne(&self, other: &Vec<U, A>) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq>","auth::common::HashedPassword","auth::common::Salt"],["
1.46.0 (const: unstable) · Source§

impl<T, U, A> PartialEq<Vec<U, A>> for &[T]
where\n A: Allocator,\n T: PartialEq<U>,

Source§

fn eq(&self, other: &Vec<U, A>) -> bool

Tests for self and other values to be equal, and is used by ==.
Source§

fn ne(&self, other: &Vec<U, A>) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<T> PartialEq<Vec1<T>> for &[T]
where\n T: PartialEq,

§

fn eq(&self, other: &Vec1<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<T> PartialEq<VecList<T>> for &[T]
where\n T: PartialEq,

§

fn eq(&self, other: &VecList<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> PartialOrd<BStr> for &'a [u8]

§

fn partial_cmp(&self, other: &BStr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> PartialOrd<BStr> for &'a [u8]

§

fn partial_cmp(&self, other: &BStr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> PartialOrd<BString> for &'a [u8]

§

fn partial_cmp(&self, other: &BString) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","auth::common::HashedPassword","auth::common::Salt"],["
§

impl PartialOrd<Bytes> for &[u8]

§

fn partial_cmp(&self, other: &Bytes) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> PartialOrd<Bytes> for &'a [u8]

§

fn partial_cmp(&self, other: &Bytes) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","auth::common::HashedPassword","auth::common::Salt"],["
§

impl PartialOrd<BytesMut> for &[u8]

§

fn partial_cmp(&self, other: &BytesMut) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","auth::common::HashedPassword","auth::common::Salt"],["
Source§

impl<'a> PhfBorrow<[u8]> for &'a [u8]

Source§

fn borrow(&self) -> &[u8] ⓘ

Convert a reference to self to a reference to the borrowed type.
","PhfBorrow<[u8]>","auth::common::HashedPassword","auth::common::Salt"],["
1.0.0 · Source§

impl Read for &[u8]

Read is implemented for &[u8] by copying from the slice.

\n

Note that reading updates the slice to point to the yet unread part.\nThe slice will be empty when EOF is reached.

\n
Source§

fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>

Pull some bytes from this source into the specified buffer, returning\nhow many bytes were read. Read more
Source§

fn read_buf(&mut self, cursor: BorrowedCursor<'_, u8>) -> Result<(), Error>

🔬This is a nightly-only experimental API. (read_buf)
Pull some bytes from this source into the specified buffer. Read more
Source§

fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>

Like read, except that it reads into a slice of buffers. Read more
Source§

fn is_read_vectored(&self) -> bool

🔬This is a nightly-only experimental API. (can_vector)
Determines if this Reader has an efficient read_vectored\nimplementation. Read more
Source§

fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>

Reads the exact number of bytes required to fill buf. Read more
Source§

fn read_buf_exact(\n &mut self,\n cursor: BorrowedCursor<'_, u8>,\n) -> Result<(), Error>

🔬This is a nightly-only experimental API. (read_buf)
Reads the exact number of bytes required to fill cursor. Read more
Source§

fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>

Reads all bytes until EOF in this source, placing them into buf. Read more
Source§

fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>

Reads all bytes until EOF in this source, appending them to buf. Read more
1.0.0 · Source§

fn by_ref(&mut self) -> &mut Self
where\n Self: Sized,

Creates a “by reference” adapter for this instance of Read. Read more
1.0.0 · Source§

fn bytes(self) -> Bytes<Self>
where\n Self: Sized,

Transforms this Read instance to an Iterator over its bytes. Read more
1.0.0 · Source§

fn chain<R>(self, next: R) -> Chain<Self, R>
where\n R: Read,\n Self: Sized,

Creates an adapter which will chain this stream with another. Read more
1.0.0 · Source§

fn take(self, limit: u64) -> Take<Self>
where\n Self: Sized,

Creates an adapter which will read at most limit bytes from it. Read more
Source§

fn read_array<const N: usize>(&mut self) -> Result<[u8; N], Error>
where\n Self: Sized,

🔬This is a nightly-only experimental API. (read_array)
Read and return a fixed array of bytes from this source. Read more
Source§

fn read_le<T>(&mut self) -> Result<T, Error>
where\n T: FromEndianBytes,\n Self: Sized,

🔬This is a nightly-only experimental API. (read_le)
Read and return a type (e.g. an integer) in little-endian order. Read more
Source§

fn read_be<T>(&mut self) -> Result<T, Error>
where\n T: FromEndianBytes,\n Self: Sized,

🔬This is a nightly-only experimental API. (read_le)
Read and return a type (e.g. an integer) in big-endian order. Read more
","Read","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> ReadRef<'a> for &'a [u8]

§

fn len(self) -> Result<u64, ()>

The total size of the block of data.
§

fn read_bytes_at(self, offset: u64, size: u64) -> Result<&'a [u8], ()>

Get a reference to a u8 slice at the given offset. Read more
§

fn read_bytes_at_until(\n self,\n range: Range<u64>,\n delimiter: u8,\n) -> Result<&'a [u8], ()>

Get a reference to a delimited u8 slice which starts at range.start. Read more
§

fn read_bytes(self, offset: &mut u64, size: u64) -> Result<&'a [u8], ()>

Get a reference to a u8 slice at the given offset, and update the offset. Read more
§

fn read<T>(self, offset: &mut u64) -> Result<&'a T, ()>
where\n T: Pod,

Get a reference to a Pod type at the given offset, and update the offset. Read more
§

fn read_at<T>(self, offset: u64) -> Result<&'a T, ()>
where\n T: Pod,

Get a reference to a Pod type at the given offset. Read more
§

fn read_slice<T>(self, offset: &mut u64, count: usize) -> Result<&'a [T], ()>
where\n T: Pod,

Get a reference to a slice of a Pod type at the given offset, and update the offset. Read more
§

fn read_slice_at<T>(self, offset: u64, count: usize) -> Result<&'a [T], ()>
where\n T: Pod,

Get a reference to a slice of a Pod type at the given offset. Read more
","ReadRef<'a>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> RefToOwned<'a> for &'a [u8]

§

type Owned = Box<[u8]>

The resulting type after obtaining ownership.
§

fn ref_to_owned(&self) -> <&'a [u8] as RefToOwned<'a>>::Owned ⓘ

Creates a new object taking ownership of the data
","RefToOwned<'a>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> Replacer for &'a [u8]

§

fn replace_append(&mut self, caps: &Captures<'_>, dst: &mut Vec<u8>)

Appends possibly empty data to dst to replace the current match. Read more
§

fn no_expansion(&mut self) -> Option<Cow<'_, [u8]>>

Return a fixed unchanging replacement byte string. Read more
§

fn by_ref<'r>(&'r mut self) -> ReplacerRef<'r, Self>

Returns a type that implements Replacer, but that borrows and wraps\nthis Replacer. Read more
","Replacer","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> ScalarRef<'a> for &'a [u8]

§

type ScalarType = Vec<u8>

The corresponding [Scalar] type.
§

fn to_owned_scalar(&self) -> Vec<u8> ⓘ

Convert the reference into an owned value.
","ScalarRef<'a>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, T> Slice<Range<usize>> for &'a [T]

§

fn slice(&self, range: Range<usize>) -> &'a [T]

Slices self according to the range argument
","Slice>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, T> Slice<RangeFrom<usize>> for &'a [T]

§

fn slice(&self, range: RangeFrom<usize>) -> &'a [T]

Slices self according to the range argument
","Slice>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, T> Slice<RangeFull> for &'a [T]

§

fn slice(&self, range: RangeFull) -> &'a [T]

Slices self according to the range argument
","Slice","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a, T> Slice<RangeTo<usize>> for &'a [T]

§

fn slice(&self, range: RangeTo<usize>) -> &'a [T]

Slices self according to the range argument
","Slice>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<T> SliceLen for &[T]

§

fn slice_len(&self) -> usize

Calculates the input length, as indicated by its name,\nand the name of the trait itself
","SliceLen","auth::common::HashedPassword","auth::common::Salt"],["
§

impl SplitByteSlice for &[u8]

§

unsafe fn split_at_unchecked(self, mid: usize) -> (&[u8], &[u8])

Splits the slice at the midpoint, possibly omitting bounds checks. Read more
§

fn split_at(self, mid: usize) -> Result<(Self, Self), Self>

Attempts to split self at the midpoint. Read more
","SplitByteSlice","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'i, T> Stream for &'i [T]
where\n T: Clone + Debug,

§

type Token = T

The smallest unit being parsed Read more
§

type Slice = &'i [T]

Sequence of Tokens Read more
§

type IterOffsets = Enumerate<Cloned<Iter<'i, T>>>

Iterate with the offset from the current location
§

type Checkpoint = Checkpoint<&'i [T], &'i [T]>

A parse location within the stream
§

fn iter_offsets(&self) -> <&'i [T] as Stream>::IterOffsets ⓘ

Iterate with the offset from the current location
§

fn eof_offset(&self) -> usize

Returns the offset to the end of the input
§

fn next_token(&mut self) -> Option<<&'i [T] as Stream>::Token>

Split off the next token from the input
§

fn peek_token(&self) -> Option<<&'i [T] as Stream>::Token>

Split off the next token from the input
§

fn offset_for<P>(&self, predicate: P) -> Option<usize>
where\n P: Fn(<&'i [T] as Stream>::Token) -> bool,

Finds the offset of the next matching token
§

fn offset_at(&self, tokens: usize) -> Result<usize, Needed>

Get the offset for the number of tokens into the stream Read more
§

fn next_slice(&mut self, offset: usize) -> <&'i [T] as Stream>::Slice ⓘ

Split off a slice of tokens from the input Read more
§

unsafe fn next_slice_unchecked(\n &mut self,\n offset: usize,\n) -> <&'i [T] as Stream>::Slice ⓘ

Split off a slice of tokens from the input Read more
§

fn peek_slice(&self, offset: usize) -> <&'i [T] as Stream>::Slice ⓘ

Split off a slice of tokens from the input
§

unsafe fn peek_slice_unchecked(\n &self,\n offset: usize,\n) -> <&'i [T] as Stream>::Slice ⓘ

Split off a slice of tokens from the input Read more
§

fn checkpoint(&self) -> <&'i [T] as Stream>::Checkpoint ⓘ

Save the current parse location within the stream
§

fn reset(&mut self, checkpoint: &<&'i [T] as Stream>::Checkpoint)

Revert the stream to a prior [Self::Checkpoint] Read more
§

fn raw(&self) -> &dyn Debug

👎Deprecated since 0.7.10:

Replaced with Stream::trace

\n
Deprecated for callers as of 0.7.10, instead call [Stream::trace]
§

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

Write out a single-line summary of the current parse location
§

fn finish(&mut self) -> Self::Slice

Advance to the end of the stream
§

fn peek_finish(&self) -> Self::Slice
where\n Self: Clone,

Advance to the end of the stream
","Stream","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<T> StreamIsPartial for &[T]

§

type PartialState = ()

Whether the stream is currently partial or complete
§

fn complete(&mut self) -> <&[T] as StreamIsPartial>::PartialState ⓘ

Mark the stream is complete
§

fn restore_partial(&mut self, _state: <&[T] as StreamIsPartial>::PartialState)

Restore the stream back to its previous state
§

fn is_partial_supported() -> bool

Report whether the [Stream] is can ever be incomplete
§

fn is_partial(&self) -> bool

Report whether the [Stream] is currently incomplete
","StreamIsPartial","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<T> ToSql for &[T]
where\n T: ToSql,

§

fn to_sql(\n &self,\n ty: &Type,\n w: &mut BytesMut,\n) -> Result<IsNull, Box<dyn Error + Send + Sync>>

Converts the value of self into the binary format of the specified\nPostgres Type, appending it to out. Read more
§

fn accepts(ty: &Type) -> bool

Determines if a value of this type can be converted to the specified\nPostgres Type.
§

fn to_sql_checked(\n &self,\n ty: &Type,\n out: &mut BytesMut,\n) -> Result<IsNull, Box<dyn Error + Send + Sync>>

An adaptor method used internally by Rust-Postgres. Read more
§

fn encode_format(&self, _ty: &Type) -> Format

Specify the encode format
","ToSql","auth::common::HashedPassword","auth::common::Salt"],["
§

impl ToSql for &[u8]

§

fn to_sql(\n &self,\n _: &Type,\n w: &mut BytesMut,\n) -> Result<IsNull, Box<dyn Error + Send + Sync>>

Converts the value of self into the binary format of the specified\nPostgres Type, appending it to out. Read more
§

fn accepts(ty: &Type) -> bool

Determines if a value of this type can be converted to the specified\nPostgres Type.
§

fn to_sql_checked(\n &self,\n ty: &Type,\n out: &mut BytesMut,\n) -> Result<IsNull, Box<dyn Error + Send + Sync>>

An adaptor method used internally by Rust-Postgres. Read more
§

fn encode_format(&self, _ty: &Type) -> Format

Specify the encode format
","ToSql","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> TryFrom<&'a DecryptionContext> for &'a [u8]

§

type Error = Unspecified

The type returned in the event of a conversion error.
§

fn try_from(value: &'a DecryptionContext) -> Result<&'a [u8], Unspecified>

Performs the conversion.
","TryFrom<&'a DecryptionContext>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> TryFrom<&'a EncryptionContext> for &'a [u8]

§

type Error = Unspecified

The type returned in the event of a conversion error.
§

fn try_from(value: &'a EncryptionContext) -> Result<&'a [u8], Unspecified>

Performs the conversion.
","TryFrom<&'a EncryptionContext>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'a> TryFrom<BitStringRef<'a>> for &'a [u8]

§

type Error = Error

The type returned in the event of a conversion error.
§

fn try_from(bit_string: BitStringRef<'a>) -> Result<&'a [u8], Error>

Performs the conversion.
","TryFrom>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<T> UpdateSlice for &[T]
where\n T: Clone + Debug,

§

fn update_slice(self, inner: <&[T] as Stream>::Slice) -> &[T]

Convert an Output type to be used as Stream
","UpdateSlice","auth::common::HashedPassword","auth::common::Salt"],["
§

impl<'zf, T> ZeroFrom<'zf, [T]> for &'zf [T]

§

fn zero_from(other: &'zf [T]) -> &'zf [T]

Clone the other C into a struct that may retain references into C.
","ZeroFrom<'zf, [T]>","auth::common::HashedPassword","auth::common::Salt"],["
§

impl AsSymbolName for &[u8]

","AsSymbolName","auth::common::HashedPassword","auth::common::Salt"],["
§

impl ByteSlice for &[u8]

","ByteSlice","auth::common::HashedPassword","auth::common::Salt"],["
§

impl CloneableByteSlice for &[u8]

","CloneableByteSlice","auth::common::HashedPassword","auth::common::Salt"],["
§

impl CopyableByteSlice for &[u8]

","CopyableByteSlice","auth::common::HashedPassword","auth::common::Salt"]]],["index",[["
§

impl Adler32Hash for &[u8]

§

fn hash(&self) -> u32

Feeds this value into Adler32.
","Adler32Hash","index::BytesRef"],["
§

impl Arg for &[u8]

§

fn as_str(&self) -> Result<&str, Errno>

Returns a view of this string as a string slice.
§

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

Returns a potentially-lossy rendering of this string as a\nCow<'_, str>.
§

fn as_cow_c_str(&self) -> Result<Cow<'_, CStr>, Errno>

Returns a view of this string as a maybe-owned CStr.
§

fn into_c_str<'b>(self) -> Result<Cow<'b, CStr>, Errno>
where\n &[u8]: 'b,

Consumes self and returns a view of this string as a maybe-owned\nCStr.
§

fn into_with_c_str<T, F>(self, f: F) -> Result<T, Errno>
where\n &[u8]: Sized,\n F: FnOnce(&CStr) -> Result<T, Errno>,

Runs a closure with self passed in as a &CStr.
","Arg","index::BytesRef"],["
§

impl Arg for &[u8]

§

fn as_str(&self) -> Result<&str, Errno>

Returns a view of this string as a string slice.
§

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

Returns a potentially-lossy rendering of this string as a\nCow<'_, str>.
§

fn as_cow_c_str(&self) -> Result<Cow<'_, CStr>, Errno>

Returns a view of this string as a maybe-owned CStr.
§

fn into_c_str<'b>(self) -> Result<Cow<'b, CStr>, Errno>
where\n &[u8]: 'b,

Consumes self and returns a view of this string as a maybe-owned\nCStr.
§

fn into_with_c_str<T, F>(self, f: F) -> Result<T, Errno>
where\n &[u8]: Sized,\n F: FnOnce(&CStr) -> Result<T, Errno>,

Runs a closure with self passed in as a &CStr.
","Arg","index::BytesRef"],["
§

impl AsBStr for &[u8]

§

fn as_bstr(&self) -> &[u8] ⓘ

Casts the input type to a byte slice
","AsBStr","index::BytesRef"],["
§

impl AsBytes for &[u8]

§

fn as_bytes(&self) -> &[u8] ⓘ

Casts the input type to a byte slice
","AsBytes","index::BytesRef"],["
§

impl<'a> AsBytes for &'a [u8]

§

fn as_bytes(&self) -> &[u8] ⓘ

Casts the input type to a byte slice
","AsBytes","index::BytesRef"],["
§

impl<'a> AsBytes for &'a [u8]

§

fn as_bytes(&self) -> &[u8] ⓘ

Casts the input type to a byte slice
","AsBytes","index::BytesRef"],["
§

impl<T> AsRef<ZeroSlice<T>> for &[<T as AsULE>::ULE]
where\n T: AsULE,

§

fn as_ref(&self) -> &ZeroSlice<T>

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef>","index::BytesRef"],["
§

impl AsyncBufRead for &[u8]

§

fn poll_fill_buf(\n self: Pin<&mut &[u8]>,\n _: &mut Context<'_>,\n) -> Poll<Result<&[u8], Error>>

Attempt to return the contents of the internal buffer, filling it with more data\nfrom the inner reader if it is empty. Read more
§

fn consume(self: Pin<&mut &[u8]>, amt: usize)

Tells this buffer that amt bytes have been consumed from the buffer,\nso they should no longer be returned in calls to poll_read. Read more
","AsyncBufRead","index::BytesRef"],["
§

impl AsyncBufRead for &[u8]

§

fn poll_fill_buf(\n self: Pin<&mut &[u8]>,\n _cx: &mut Context<'_>,\n) -> Poll<Result<&[u8], Error>>

Attempts to return the contents of the internal buffer, filling it with more data\nfrom the inner reader if it is empty. Read more
§

fn consume(self: Pin<&mut &[u8]>, amt: usize)

Tells this buffer that amt bytes have been consumed from the buffer,\nso they should no longer be returned in calls to poll_read. Read more
","AsyncBufRead","index::BytesRef"],["
§

impl AsyncRead for &[u8]

§

fn poll_read(\n self: Pin<&mut &[u8]>,\n _: &mut Context<'_>,\n buf: &mut [u8],\n) -> Poll<Result<usize, Error>>

Attempt to read from the AsyncRead into buf. Read more
§

fn poll_read_vectored(\n self: Pin<&mut &[u8]>,\n _: &mut Context<'_>,\n bufs: &mut [IoSliceMut<'_>],\n) -> Poll<Result<usize, Error>>

Attempt to read from the AsyncRead into bufs using vectored\nIO operations. Read more
","AsyncRead","index::BytesRef"],["
§

impl AsyncRead for &[u8]

§

fn poll_read(\n self: Pin<&mut &[u8]>,\n _cx: &mut Context<'_>,\n buf: &mut ReadBuf<'_>,\n) -> Poll<Result<(), Error>>

Attempts to read from the AsyncRead into buf. Read more
","AsyncRead","index::BytesRef"],["
§

impl Buf for &[u8]

§

fn remaining(&self) -> usize

Returns the number of bytes between the current position and the end of\nthe buffer. Read more
§

fn chunk(&self) -> &[u8] ⓘ

Returns a slice starting at the current position and of length between 0\nand Buf::remaining(). Note that this can return a shorter slice (this\nallows non-continuous internal representation). Read more
§

fn advance(&mut self, cnt: usize)

Advance the internal cursor of the Buf Read more
§

fn copy_to_slice(&mut self, dst: &mut [u8])

Copies bytes from self into dst. Read more
§

fn chunks_vectored<'a>(&'a self, dst: &mut [IoSlice<'a>]) -> usize

Fills dst with potentially multiple slices starting at self’s\ncurrent position. Read more
§

fn has_remaining(&self) -> bool

Returns true if there are any more bytes to consume Read more
§

fn get_u8(&mut self) -> u8

Gets an unsigned 8 bit integer from self. Read more
§

fn get_i8(&mut self) -> i8

Gets a signed 8 bit integer from self. Read more
§

fn get_u16(&mut self) -> u16

Gets an unsigned 16 bit integer from self in big-endian byte order. Read more
§

fn get_u16_le(&mut self) -> u16

Gets an unsigned 16 bit integer from self in little-endian byte order. Read more
§

fn get_u16_ne(&mut self) -> u16

Gets an unsigned 16 bit integer from self in native-endian byte order. Read more
§

fn get_i16(&mut self) -> i16

Gets a signed 16 bit integer from self in big-endian byte order. Read more
§

fn get_i16_le(&mut self) -> i16

Gets a signed 16 bit integer from self in little-endian byte order. Read more
§

fn get_i16_ne(&mut self) -> i16

Gets a signed 16 bit integer from self in native-endian byte order. Read more
§

fn get_u32(&mut self) -> u32

Gets an unsigned 32 bit integer from self in the big-endian byte order. Read more
§

fn get_u32_le(&mut self) -> u32

Gets an unsigned 32 bit integer from self in the little-endian byte order. Read more
§

fn get_u32_ne(&mut self) -> u32

Gets an unsigned 32 bit integer from self in native-endian byte order. Read more
§

fn get_i32(&mut self) -> i32

Gets a signed 32 bit integer from self in big-endian byte order. Read more
§

fn get_i32_le(&mut self) -> i32

Gets a signed 32 bit integer from self in little-endian byte order. Read more
§

fn get_i32_ne(&mut self) -> i32

Gets a signed 32 bit integer from self in native-endian byte order. Read more
§

fn get_u64(&mut self) -> u64

Gets an unsigned 64 bit integer from self in big-endian byte order. Read more
§

fn get_u64_le(&mut self) -> u64

Gets an unsigned 64 bit integer from self in little-endian byte order. Read more
§

fn get_u64_ne(&mut self) -> u64

Gets an unsigned 64 bit integer from self in native-endian byte order. Read more
§

fn get_i64(&mut self) -> i64

Gets a signed 64 bit integer from self in big-endian byte order. Read more
§

fn get_i64_le(&mut self) -> i64

Gets a signed 64 bit integer from self in little-endian byte order. Read more
§

fn get_i64_ne(&mut self) -> i64

Gets a signed 64 bit integer from self in native-endian byte order. Read more
§

fn get_u128(&mut self) -> u128

Gets an unsigned 128 bit integer from self in big-endian byte order. Read more
§

fn get_u128_le(&mut self) -> u128

Gets an unsigned 128 bit integer from self in little-endian byte order. Read more
§

fn get_u128_ne(&mut self) -> u128

Gets an unsigned 128 bit integer from self in native-endian byte order. Read more
§

fn get_i128(&mut self) -> i128

Gets a signed 128 bit integer from self in big-endian byte order. Read more
§

fn get_i128_le(&mut self) -> i128

Gets a signed 128 bit integer from self in little-endian byte order. Read more
§

fn get_i128_ne(&mut self) -> i128

Gets a signed 128 bit integer from self in native-endian byte order. Read more
§

fn get_uint(&mut self, nbytes: usize) -> u64

Gets an unsigned n-byte integer from self in big-endian byte order. Read more
§

fn get_uint_le(&mut self, nbytes: usize) -> u64

Gets an unsigned n-byte integer from self in little-endian byte order. Read more
§

fn get_uint_ne(&mut self, nbytes: usize) -> u64

Gets an unsigned n-byte integer from self in native-endian byte order. Read more
§

fn get_int(&mut self, nbytes: usize) -> i64

Gets a signed n-byte integer from self in big-endian byte order. Read more
§

fn get_int_le(&mut self, nbytes: usize) -> i64

Gets a signed n-byte integer from self in little-endian byte order. Read more
§

fn get_int_ne(&mut self, nbytes: usize) -> i64

Gets a signed n-byte integer from self in native-endian byte order. Read more
§

fn get_f32(&mut self) -> f32

Gets an IEEE754 single-precision (4 bytes) floating point number from\nself in big-endian byte order. Read more
§

fn get_f32_le(&mut self) -> f32

Gets an IEEE754 single-precision (4 bytes) floating point number from\nself in little-endian byte order. Read more
§

fn get_f32_ne(&mut self) -> f32

Gets an IEEE754 single-precision (4 bytes) floating point number from\nself in native-endian byte order. Read more
§

fn get_f64(&mut self) -> f64

Gets an IEEE754 double-precision (8 bytes) floating point number from\nself in big-endian byte order. Read more
§

fn get_f64_le(&mut self) -> f64

Gets an IEEE754 double-precision (8 bytes) floating point number from\nself in little-endian byte order. Read more
§

fn get_f64_ne(&mut self) -> f64

Gets an IEEE754 double-precision (8 bytes) floating point number from\nself in native-endian byte order. Read more
§

fn try_copy_to_slice(&mut self, dst: &mut [u8]) -> Result<(), TryGetError>

Copies bytes from self into dst. Read more
§

fn try_get_u8(&mut self) -> Result<u8, TryGetError>

Gets an unsigned 8 bit integer from self. Read more
§

fn try_get_i8(&mut self) -> Result<i8, TryGetError>

Gets a signed 8 bit integer from self. Read more
§

fn try_get_u16(&mut self) -> Result<u16, TryGetError>

Gets an unsigned 16 bit integer from self in big-endian byte order. Read more
§

fn try_get_u16_le(&mut self) -> Result<u16, TryGetError>

Gets an unsigned 16 bit integer from self in little-endian byte order. Read more
§

fn try_get_u16_ne(&mut self) -> Result<u16, TryGetError>

Gets an unsigned 16 bit integer from self in native-endian byte order. Read more
§

fn try_get_i16(&mut self) -> Result<i16, TryGetError>

Gets a signed 16 bit integer from self in big-endian byte order. Read more
§

fn try_get_i16_le(&mut self) -> Result<i16, TryGetError>

Gets an signed 16 bit integer from self in little-endian byte order. Read more
§

fn try_get_i16_ne(&mut self) -> Result<i16, TryGetError>

Gets a signed 16 bit integer from self in native-endian byte order. Read more
§

fn try_get_u32(&mut self) -> Result<u32, TryGetError>

Gets an unsigned 32 bit integer from self in big-endian byte order. Read more
§

fn try_get_u32_le(&mut self) -> Result<u32, TryGetError>

Gets an unsigned 32 bit integer from self in little-endian byte order. Read more
§

fn try_get_u32_ne(&mut self) -> Result<u32, TryGetError>

Gets an unsigned 32 bit integer from self in native-endian byte order. Read more
§

fn try_get_i32(&mut self) -> Result<i32, TryGetError>

Gets a signed 32 bit integer from self in big-endian byte order. Read more
§

fn try_get_i32_le(&mut self) -> Result<i32, TryGetError>

Gets a signed 32 bit integer from self in little-endian byte order. Read more
§

fn try_get_i32_ne(&mut self) -> Result<i32, TryGetError>

Gets a signed 32 bit integer from self in native-endian byte order. Read more
§

fn try_get_u64(&mut self) -> Result<u64, TryGetError>

Gets an unsigned 64 bit integer from self in big-endian byte order. Read more
§

fn try_get_u64_le(&mut self) -> Result<u64, TryGetError>

Gets an unsigned 64 bit integer from self in little-endian byte order. Read more
§

fn try_get_u64_ne(&mut self) -> Result<u64, TryGetError>

Gets an unsigned 64 bit integer from self in native-endian byte order. Read more
§

fn try_get_i64(&mut self) -> Result<i64, TryGetError>

Gets a signed 64 bit integer from self in big-endian byte order. Read more
§

fn try_get_i64_le(&mut self) -> Result<i64, TryGetError>

Gets a signed 64 bit integer from self in little-endian byte order. Read more
§

fn try_get_i64_ne(&mut self) -> Result<i64, TryGetError>

Gets a signed 64 bit integer from self in native-endian byte order. Read more
§

fn try_get_u128(&mut self) -> Result<u128, TryGetError>

Gets an unsigned 128 bit integer from self in big-endian byte order. Read more
§

fn try_get_u128_le(&mut self) -> Result<u128, TryGetError>

Gets an unsigned 128 bit integer from self in little-endian byte order. Read more
§

fn try_get_u128_ne(&mut self) -> Result<u128, TryGetError>

Gets an unsigned 128 bit integer from self in native-endian byte order. Read more
§

fn try_get_i128(&mut self) -> Result<i128, TryGetError>

Gets a signed 128 bit integer from self in big-endian byte order. Read more
§

fn try_get_i128_le(&mut self) -> Result<i128, TryGetError>

Gets a signed 128 bit integer from self in little-endian byte order. Read more
§

fn try_get_i128_ne(&mut self) -> Result<i128, TryGetError>

Gets a signed 128 bit integer from self in native-endian byte order. Read more
§

fn try_get_uint(&mut self, nbytes: usize) -> Result<u64, TryGetError>

Gets an unsigned n-byte integer from self in big-endian byte order. Read more
§

fn try_get_uint_le(&mut self, nbytes: usize) -> Result<u64, TryGetError>

Gets an unsigned n-byte integer from self in little-endian byte order. Read more
§

fn try_get_uint_ne(&mut self, nbytes: usize) -> Result<u64, TryGetError>

Gets an unsigned n-byte integer from self in native-endian byte order. Read more
§

fn try_get_int(&mut self, nbytes: usize) -> Result<i64, TryGetError>

Gets a signed n-byte integer from self in big-endian byte order. Read more
§

fn try_get_int_le(&mut self, nbytes: usize) -> Result<i64, TryGetError>

Gets a signed n-byte integer from self in little-endian byte order. Read more
§

fn try_get_int_ne(&mut self, nbytes: usize) -> Result<i64, TryGetError>

Gets a signed n-byte integer from self in native-endian byte order. Read more
§

fn try_get_f32(&mut self) -> Result<f32, TryGetError>

Gets an IEEE754 single-precision (4 bytes) floating point number from\nself in big-endian byte order. Read more
§

fn try_get_f32_le(&mut self) -> Result<f32, TryGetError>

Gets an IEEE754 single-precision (4 bytes) floating point number from\nself in little-endian byte order. Read more
§

fn try_get_f32_ne(&mut self) -> Result<f32, TryGetError>

Gets an IEEE754 single-precision (4 bytes) floating point number from\nself in native-endian byte order. Read more
§

fn try_get_f64(&mut self) -> Result<f64, TryGetError>

Gets an IEEE754 double-precision (8 bytes) floating point number from\nself in big-endian byte order. Read more
§

fn try_get_f64_le(&mut self) -> Result<f64, TryGetError>

Gets an IEEE754 double-precision (8 bytes) floating point number from\nself in little-endian byte order. Read more
§

fn try_get_f64_ne(&mut self) -> Result<f64, TryGetError>

Gets an IEEE754 double-precision (8 bytes) floating point number from\nself in native-endian byte order. Read more
§

fn copy_to_bytes(&mut self, len: usize) -> Bytes

Consumes len bytes inside self and returns new instance of Bytes\nwith this data. Read more
§

fn take(self, limit: usize) -> Take<Self>
where\n Self: Sized,

Creates an adaptor which will read at most limit bytes from self. Read more
§

fn chain<U>(self, next: U) -> Chain<Self, U>
where\n U: Buf,\n Self: Sized,

Creates an adaptor which will chain this buffer with another. Read more
§

fn reader(self) -> Reader<Self>
where\n Self: Sized,

Creates an adaptor which implements the Read trait for self. Read more
","Buf","index::BytesRef"],["
1.0.0 · Source§

impl BufRead for &[u8]

Source§

fn fill_buf(&mut self) -> Result<&[u8], Error>

Returns the contents of the internal buffer, filling it with more data, via Read methods, if empty. Read more
Source§

fn consume(&mut self, amt: usize)

Marks the given amount of additional bytes from the internal buffer as having been read.\nSubsequent calls to read only return bytes that have not been marked as read. Read more
Source§

fn has_data_left(&mut self) -> Result<bool, Error>

🔬This is a nightly-only experimental API. (buf_read_has_data_left)
Checks if there is any data left to be read. Read more
1.0.0 · Source§

fn read_until(&mut self, byte: u8, buf: &mut Vec<u8>) -> Result<usize, Error>

Reads all bytes into buf until the delimiter byte or EOF is reached. Read more
1.83.0 · Source§

fn skip_until(&mut self, byte: u8) -> Result<usize, Error>

Skips all bytes until the delimiter byte or EOF is reached. Read more
1.0.0 · Source§

fn read_line(&mut self, buf: &mut String) -> Result<usize, Error>

Reads all bytes until a newline (the 0xA byte) is reached, and append\nthem to the provided String buffer. Read more
1.0.0 · Source§

fn split(self, byte: u8) -> Split<Self>
where\n Self: Sized,

Returns an iterator over the contents of this reader split on the byte\nbyte. Read more
1.0.0 · Source§

fn lines(self) -> Lines<Self>
where\n Self: Sized,

Returns an iterator over the lines of this reader. Read more
","BufRead","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8]> for &'a [u8]

§

fn compare(&self, t: &'b [u8]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8]> for &'a [u8]

§

fn compare(&self, t: &'b [u8]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8]>","index::BytesRef"],["
§

impl<'b> Compare<&'b [u8]> for &[u8]

§

fn compare(&self, t: &'b [u8]) -> CompareResult

Compares self to another value for equality
","Compare<&'b [u8]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 0]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 0]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 0]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 0]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 1]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 1]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 1]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 1]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 10]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 10]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 10]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 10]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 11]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 11]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 11]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 11]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 12]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 12]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 12]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 12]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 13]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 13]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 13]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 13]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 14]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 14]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 14]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 14]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 15]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 15]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 15]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 15]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 16]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 16]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 16]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 16]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 17]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 17]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 17]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 17]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 18]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 18]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 18]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 18]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 19]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 19]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 19]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 19]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 2]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 2]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 2]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 2]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 20]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 20]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 20]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 20]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 21]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 21]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 21]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 21]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 22]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 22]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 22]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 22]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 23]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 23]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 23]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 23]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 24]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 24]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 24]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 24]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 25]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 25]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 25]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 25]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 26]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 26]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 26]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 26]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 27]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 27]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 27]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 27]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 28]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 28]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 28]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 28]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 29]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 29]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 29]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 29]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 3]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 3]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 3]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 3]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 30]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 30]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 30]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 30]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 31]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 31]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 31]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 31]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 32]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 32]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 32]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 32]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 4]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 4]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 4]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 4]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 5]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 5]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 5]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 5]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 6]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 6]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 6]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 6]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 7]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 7]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 7]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 7]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 8]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 8]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 8]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 8]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b [u8; 9]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 9]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 9]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 9]>","index::BytesRef"],["
§

impl<'b, const LEN: usize> Compare<&'b [u8; LEN]> for &[u8]

§

fn compare(&self, t: &'b [u8; LEN]) -> CompareResult

Compares self to another value for equality
","Compare<&'b [u8; LEN]>","index::BytesRef"],["
§

impl<'a, 'b, const N: usize> Compare<&'b [u8; N]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; N]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; N]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; N]>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b str> for &'a [u8]

§

fn compare(&self, t: &'b str) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b str) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b str>","index::BytesRef"],["
§

impl<'a, 'b> Compare<&'b str> for &'a [u8]

§

fn compare(&self, t: &'b str) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b str) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b str>","index::BytesRef"],["
§

impl<'b> Compare<&'b str> for &[u8]

§

fn compare(&self, t: &'b str) -> CompareResult

Compares self to another value for equality
","Compare<&'b str>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 0]> for &'a [u8]

§

fn compare(&self, t: [u8; 0]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 0]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 0]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 1]> for &'a [u8]

§

fn compare(&self, t: [u8; 1]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 1]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 1]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 10]> for &'a [u8]

§

fn compare(&self, t: [u8; 10]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 10]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 10]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 11]> for &'a [u8]

§

fn compare(&self, t: [u8; 11]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 11]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 11]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 12]> for &'a [u8]

§

fn compare(&self, t: [u8; 12]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 12]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 12]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 13]> for &'a [u8]

§

fn compare(&self, t: [u8; 13]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 13]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 13]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 14]> for &'a [u8]

§

fn compare(&self, t: [u8; 14]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 14]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 14]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 15]> for &'a [u8]

§

fn compare(&self, t: [u8; 15]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 15]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 15]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 16]> for &'a [u8]

§

fn compare(&self, t: [u8; 16]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 16]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 16]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 17]> for &'a [u8]

§

fn compare(&self, t: [u8; 17]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 17]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 17]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 18]> for &'a [u8]

§

fn compare(&self, t: [u8; 18]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 18]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 18]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 19]> for &'a [u8]

§

fn compare(&self, t: [u8; 19]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 19]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 19]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 2]> for &'a [u8]

§

fn compare(&self, t: [u8; 2]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 2]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 2]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 20]> for &'a [u8]

§

fn compare(&self, t: [u8; 20]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 20]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 20]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 21]> for &'a [u8]

§

fn compare(&self, t: [u8; 21]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 21]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 21]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 22]> for &'a [u8]

§

fn compare(&self, t: [u8; 22]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 22]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 22]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 23]> for &'a [u8]

§

fn compare(&self, t: [u8; 23]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 23]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 23]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 24]> for &'a [u8]

§

fn compare(&self, t: [u8; 24]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 24]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 24]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 25]> for &'a [u8]

§

fn compare(&self, t: [u8; 25]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 25]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 25]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 26]> for &'a [u8]

§

fn compare(&self, t: [u8; 26]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 26]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 26]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 27]> for &'a [u8]

§

fn compare(&self, t: [u8; 27]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 27]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 27]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 28]> for &'a [u8]

§

fn compare(&self, t: [u8; 28]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 28]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 28]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 29]> for &'a [u8]

§

fn compare(&self, t: [u8; 29]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 29]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 29]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 3]> for &'a [u8]

§

fn compare(&self, t: [u8; 3]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 3]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 3]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 30]> for &'a [u8]

§

fn compare(&self, t: [u8; 30]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 30]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 30]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 31]> for &'a [u8]

§

fn compare(&self, t: [u8; 31]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 31]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 31]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 32]> for &'a [u8]

§

fn compare(&self, t: [u8; 32]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 32]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 32]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 4]> for &'a [u8]

§

fn compare(&self, t: [u8; 4]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 4]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 4]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 5]> for &'a [u8]

§

fn compare(&self, t: [u8; 5]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 5]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 5]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 6]> for &'a [u8]

§

fn compare(&self, t: [u8; 6]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 6]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 6]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 7]> for &'a [u8]

§

fn compare(&self, t: [u8; 7]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 7]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 7]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 8]> for &'a [u8]

§

fn compare(&self, t: [u8; 8]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 8]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 8]>","index::BytesRef"],["
§

impl<'a> Compare<[u8; 9]> for &'a [u8]

§

fn compare(&self, t: [u8; 9]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 9]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 9]>","index::BytesRef"],["
§

impl<const LEN: usize> Compare<[u8; LEN]> for &[u8]

§

fn compare(&self, t: [u8; LEN]) -> CompareResult

Compares self to another value for equality
","Compare<[u8; LEN]>","index::BytesRef"],["
§

impl<'a, const N: usize> Compare<[u8; N]> for &'a [u8]

§

fn compare(&self, t: [u8; N]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; N]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; N]>","index::BytesRef"],["
§

impl<'b> Compare<Caseless<&'b [u8]>> for &[u8]

§

fn compare(&self, t: Caseless<&'b [u8]>) -> CompareResult

Compares self to another value for equality
","Compare>","index::BytesRef"],["
§

impl<'b, const LEN: usize> Compare<Caseless<&'b [u8; LEN]>> for &[u8]

§

fn compare(&self, t: Caseless<&'b [u8; LEN]>) -> CompareResult

Compares self to another value for equality
","Compare>","index::BytesRef"],["
§

impl<'b> Compare<Caseless<&'b str>> for &[u8]

§

fn compare(&self, t: Caseless<&'b str>) -> CompareResult

Compares self to another value for equality
","Compare>","index::BytesRef"],["
§

impl<const LEN: usize> Compare<Caseless<[u8; LEN]>> for &[u8]

§

fn compare(&self, t: Caseless<[u8; LEN]>) -> CompareResult

Compares self to another value for equality
","Compare>","index::BytesRef"],["
§

impl Compare<Caseless<char>> for &[u8]

§

fn compare(&self, t: Caseless<char>) -> CompareResult

Compares self to another value for equality
","Compare>","index::BytesRef"],["
§

impl Compare<Caseless<u8>> for &[u8]

§

fn compare(&self, t: Caseless<u8>) -> CompareResult

Compares self to another value for equality
","Compare>","index::BytesRef"],["
§

impl Compare<char> for &[u8]

§

fn compare(&self, t: char) -> CompareResult

Compares self to another value for equality
","Compare","index::BytesRef"],["
§

impl Compare<u8> for &[u8]

§

fn compare(&self, t: u8) -> CompareResult

Compares self to another value for equality
","Compare","index::BytesRef"],["
§

impl<C> ContainsToken<C> for &[u8]
where\n C: AsChar,

§

fn contains_token(&self, token: C) -> bool

Returns true if self contains the token
","ContainsToken","index::BytesRef"],["
1.0.0 (const: unstable) · Source§

impl<T> Default for &[T]

Source§

fn default() -> &[T]

Creates an empty slice.

\n
","Default","index::BytesRef"],["
Source§

impl<'de, 'a> Deserialize<'de> for &'a [u8]
where\n 'de: 'a,

Source§

fn deserialize<D>(\n deserializer: D,\n) -> Result<&'a [u8], <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","index::BytesRef"],["
§

impl<T> DeserializeFrom<T> for &[u8]
where\n T: BinarySerializable,

Implement deserialize from &u8 for all types which implement BinarySerializable.

\n

TryFrom would actually be preferable, but not possible because of the orphan\nrules (not completely sure if this could be resolved)

\n
§

fn deserialize(&mut self) -> Result<T, Error>

","DeserializeFrom","index::BytesRef"],["
§

impl<T, E, F> EncodeAsVarULE<VarZeroSlice<T, F>> for &[E]
where\n T: VarULE + ?Sized,\n E: EncodeAsVarULE<T>,\n F: VarZeroVecFormat,

§

fn encode_var_ule_as_slices<R>(&self, _: impl FnOnce(&[&[u8]]) -> R) -> R

Calls cb with a piecewise list of byte slices that when concatenated\nproduce the memory pattern of the corresponding instance of T. Read more
§

fn encode_var_ule_len(&self) -> usize

Return the length, in bytes, of the corresponding [VarULE] type
§

fn encode_var_ule_write(&self, dst: &mut [u8])

Write the corresponding [VarULE] type to the dst buffer. dst should\nbe the size of [Self::encode_var_ule_len()]
","EncodeAsVarULE>","index::BytesRef"],["
§

impl<T> EncodeAsVarULE<ZeroSlice<T>> for &[T]
where\n T: AsULE + 'static,

§

fn encode_var_ule_as_slices<R>(&self, _: impl FnOnce(&[&[u8]]) -> R) -> R

Calls cb with a piecewise list of byte slices that when concatenated\nproduce the memory pattern of the corresponding instance of T. Read more
§

fn encode_var_ule_len(&self) -> usize

Return the length, in bytes, of the corresponding [VarULE] type
§

fn encode_var_ule_write(&self, dst: &mut [u8])

Write the corresponding [VarULE] type to the dst buffer. dst should\nbe the size of [Self::encode_var_ule_len()]
","EncodeAsVarULE>","index::BytesRef"],["
§

impl ExtendInto for &[u8]

Available on crate feature alloc only.
§

type Item = u8

The current input type is a sequence of that Item type. Read more
§

type Extender = Vec<u8>

The type that will be produced
§

fn new_builder(&self) -> Vec<u8> ⓘ

Create a new Extend of the correct type
§

fn extend_into(&self, acc: &mut Vec<u8>)

Accumulate the input into an accumulator
","ExtendInto","index::BytesRef"],["
§

impl ExtendInto for &[u8]

Available on crate feature alloc only.
§

type Item = u8

The current input type is a sequence of that Item type. Read more
§

type Extender = Vec<u8>

The type that will be produced
§

fn new_builder(&self) -> Vec<u8> ⓘ

Create a new Extend of the correct type
§

fn extend_into(&self, acc: &mut Vec<u8>)

Accumulate the input into an accumulator
","ExtendInto","index::BytesRef"],["
§

impl FileHandle for &'static [u8]

§

fn read_bytes(&self, range: Range<usize>) -> Result<OwnedBytes, Error>

Reads a slice of bytes. Read more
","FileHandle","index::BytesRef"],["
§

impl<'s> FindSlice<&'s [u8]> for &[u8]

§

fn find_slice(&self, substr: &'s [u8]) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<&'s [u8]>","index::BytesRef"],["
§

impl<'s> FindSlice<&'s str> for &[u8]

§

fn find_slice(&self, substr: &'s str) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<&'s str>","index::BytesRef"],["
§

impl<'s> FindSlice<(&'s [u8],)> for &[u8]

§

fn find_slice(&self, substr: (&'s [u8],)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(&'s [u8],)>","index::BytesRef"],["
§

impl<'s> FindSlice<(&'s [u8], &'s [u8])> for &[u8]

§

fn find_slice(&self, substr: (&'s [u8], &'s [u8])) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(&'s [u8], &'s [u8])>","index::BytesRef"],["
§

impl<'s> FindSlice<(&'s [u8], &'s [u8], &'s [u8])> for &[u8]

§

fn find_slice(\n &self,\n substr: (&'s [u8], &'s [u8], &'s [u8]),\n) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(&'s [u8], &'s [u8], &'s [u8])>","index::BytesRef"],["
§

impl<'s> FindSlice<(&'s str,)> for &[u8]

§

fn find_slice(&self, substr: (&'s str,)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(&'s str,)>","index::BytesRef"],["
§

impl<'s> FindSlice<(&'s str, &'s str)> for &[u8]

§

fn find_slice(&self, substr: (&'s str, &'s str)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(&'s str, &'s str)>","index::BytesRef"],["
§

impl<'s> FindSlice<(&'s str, &'s str, &'s str)> for &[u8]

§

fn find_slice(\n &self,\n substr: (&'s str, &'s str, &'s str),\n) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(&'s str, &'s str, &'s str)>","index::BytesRef"],["
§

impl FindSlice<(char,)> for &[u8]

§

fn find_slice(&self, substr: (char,)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(char,)>","index::BytesRef"],["
§

impl FindSlice<(char, char)> for &[u8]

§

fn find_slice(&self, substr: (char, char)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(char, char)>","index::BytesRef"],["
§

impl FindSlice<(char, char, char)> for &[u8]

§

fn find_slice(&self, substr: (char, char, char)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(char, char, char)>","index::BytesRef"],["
§

impl FindSlice<(u8,)> for &[u8]

§

fn find_slice(&self, substr: (u8,)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(u8,)>","index::BytesRef"],["
§

impl FindSlice<(u8, u8)> for &[u8]

§

fn find_slice(&self, substr: (u8, u8)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(u8, u8)>","index::BytesRef"],["
§

impl FindSlice<(u8, u8, u8)> for &[u8]

§

fn find_slice(&self, substr: (u8, u8, u8)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(u8, u8, u8)>","index::BytesRef"],["
§

impl FindSlice<char> for &[u8]

§

fn find_slice(&self, substr: char) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice","index::BytesRef"],["
§

impl FindSlice<u8> for &[u8]

§

fn find_slice(&self, substr: u8) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice","index::BytesRef"],["
§

impl<'a, 'b> FindSubstring<&'b [u8]> for &'a [u8]

§

fn find_substring(&self, substr: &'b [u8]) -> Option<usize>

Returns the byte position of the substring if it is found
","FindSubstring<&'b [u8]>","index::BytesRef"],["
§

impl<'a, 'b> FindSubstring<&'b [u8]> for &'a [u8]

§

fn find_substring(&self, substr: &'b [u8]) -> Option<usize>

Returns the byte position of the substring if it is found
","FindSubstring<&'b [u8]>","index::BytesRef"],["
§

impl<'a, 'b> FindSubstring<&'b str> for &'a [u8]

§

fn find_substring(&self, substr: &'b str) -> Option<usize>

Returns the byte position of the substring if it is found
","FindSubstring<&'b str>","index::BytesRef"],["
§

impl<'a, 'b> FindSubstring<&'b str> for &'a [u8]

§

fn find_substring(&self, substr: &'b str) -> Option<usize>

Returns the byte position of the substring if it is found
","FindSubstring<&'b str>","index::BytesRef"],["
§

impl<'a, 'b> FindToken<&'a u8> for &'b [u8]

§

fn find_token(&self, token: &u8) -> bool

Returns true if self contains the token
","FindToken<&'a u8>","index::BytesRef"],["
§

impl<'a, 'b> FindToken<&'a u8> for &'b [u8]

§

fn find_token(&self, token: &u8) -> bool

Returns true if self contains the token
","FindToken<&'a u8>","index::BytesRef"],["
§

impl<'a> FindToken<char> for &'a [u8]

§

fn find_token(&self, token: char) -> bool

Returns true if self contains the token
","FindToken","index::BytesRef"],["
§

impl<'a> FindToken<char> for &'a [u8]

§

fn find_token(&self, token: char) -> bool

Returns true if self contains the token
","FindToken","index::BytesRef"],["
§

impl<'a> FindToken<u8> for &'a [u8]

§

fn find_token(&self, token: u8) -> bool

Returns true if self contains the token
","FindToken","index::BytesRef"],["
§

impl<'a> FindToken<u8> for &'a [u8]

§

fn find_token(&self, token: u8) -> bool

Returns true if self contains the token
","FindToken","index::BytesRef"],["
§

impl<'a> Follow<'a> for &'a [u8]

§

type Inner = &'a [u8]

§

unsafe fn follow(buf: &'a [u8], loc: usize) -> <&'a [u8] as Follow<'a>>::Inner ⓘ

Safety Read more
","Follow<'a>","index::BytesRef"],["
§

impl<'a> From<&'a BStr> for &'a [u8]

§

fn from(s: &'a BStr) -> &'a [u8] ⓘ

Converts to this type from the input type.
","From<&'a BStr>","index::BytesRef"],["
§

impl<'a> From<&'a BStr> for &'a [u8]

§

fn from(s: &'a BStr) -> &'a [u8] ⓘ

Converts to this type from the input type.
","From<&'a BStr>","index::BytesRef"],["
§

impl<'a> From<&'a Bytes> for &'a [u8]

§

fn from(s: &'a Bytes) -> &'a [u8] ⓘ

Converts to this type from the input type.
","From<&'a Bytes>","index::BytesRef"],["
§

impl<'h> From<Match<'h>> for &'h [u8]

§

fn from(m: Match<'h>) -> &'h [u8] ⓘ

Converts to this type from the input type.
","From>","index::BytesRef"],["
§

impl<'a> FromSql<'a> for &'a [u8]

§

fn from_sql(\n _: &Type,\n raw: &'a [u8],\n) -> Result<&'a [u8], Box<dyn Error + Send + Sync>>

Creates a new value of this type from a buffer of data of the specified\nPostgres Type in its binary format. Read more
§

fn accepts(ty: &Type) -> bool

Determines if a value of this type can be created from the specified\nPostgres Type.
§

fn from_sql_null(ty: &Type) -> Result<Self, Box<dyn Error + Send + Sync>>

Creates a new value of this type from a NULL SQL value. Read more
§

fn from_sql_nullable(\n ty: &Type,\n raw: Option<&'a [u8]>,\n) -> Result<Self, Box<dyn Error + Send + Sync>>

A convenience function that delegates to from_sql and from_sql_null depending on the\nvalue of raw.
","FromSql<'a>","index::BytesRef"],["
§

impl<'a> Input for &'a [u8]

§

fn split_at_position_mode<OM, P, E>(\n &self,\n predicate: P,\n) -> Result<(&'a [u8], <<OM as OutputMode>::Output as Mode>::Output<&'a [u8]>), Err<E, <<OM as OutputMode>::Error as Mode>::Output<E>>>
where\n OM: OutputMode,\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as Input>::Item) -> bool,

mode version of split_at_position

\n
§

fn split_at_position_mode1<OM, P, E>(\n &self,\n predicate: P,\n e: ErrorKind,\n) -> Result<(&'a [u8], <<OM as OutputMode>::Output as Mode>::Output<&'a [u8]>), Err<E, <<OM as OutputMode>::Error as Mode>::Output<E>>>
where\n OM: OutputMode,\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as Input>::Item) -> bool,

mode version of split_at_position

\n
§

type Item = u8

The current input type is a sequence of that Item type. Read more
§

type Iter = Copied<Iter<'a, u8>>

An iterator over the input type, producing the item
§

type IterIndices = Enumerate<<&'a [u8] as Input>::Iter>

An iterator over the input type, producing the item and its byte position\nIf we’re iterating over &str, the position\ncorresponds to the byte index of the character
§

fn input_len(&self) -> usize

Calculates the input length, as indicated by its name,\nand the name of the trait itself
§

fn take(&self, index: usize) -> &'a [u8] ⓘ

Returns a slice of index bytes. panics if index > length
§

fn take_from(&self, index: usize) -> &'a [u8] ⓘ

Returns a slice starting at index bytes. panics if index > length
§

fn take_split(&self, index: usize) -> (&'a [u8], &'a [u8])

Split the stream at the index byte offset. panics if index > length
§

fn position<P>(&self, predicate: P) -> Option<usize>
where\n P: Fn(<&'a [u8] as Input>::Item) -> bool,

Returns the byte position of the first element satisfying the predicate
§

fn iter_elements(&self) -> <&'a [u8] as Input>::Iter ⓘ

Returns an iterator over the elements
§

fn iter_indices(&self) -> <&'a [u8] as Input>::IterIndices ⓘ

Returns an iterator over the elements and their byte offsets
§

fn slice_index(&self, count: usize) -> Result<usize, Needed>

Get the byte offset from the element’s position in the stream
§

fn split_at_position<P, E>(\n &self,\n predicate: P,\n) -> Result<(&'a [u8], &'a [u8]), Err<E>>
where\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as Input>::Item) -> bool,

Looks for the first element of the input type for which the condition returns true,\nand returns the input up to this position. Read more
§

fn split_at_position1<P, E>(\n &self,\n predicate: P,\n e: ErrorKind,\n) -> Result<(&'a [u8], &'a [u8]), Err<E>>
where\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as Input>::Item) -> bool,

Looks for the first element of the input type for which the condition returns true\nand returns the input up to this position. Read more
§

fn split_at_position_complete<P, E>(\n &self,\n predicate: P,\n) -> Result<(&'a [u8], &'a [u8]), Err<E>>
where\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as Input>::Item) -> bool,

Looks for the first element of the input type for which the condition returns true,\nand returns the input up to this position. Read more
§

fn split_at_position1_complete<P, E>(\n &self,\n predicate: P,\n e: ErrorKind,\n) -> Result<(&'a [u8], &'a [u8]), Err<E>>
where\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as Input>::Item) -> bool,

Looks for the first element of the input type for which the condition returns true\nand returns the input up to this position. Read more
","Input","index::BytesRef"],["
§

impl<'a> InputIter for &'a [u8]

§

type Item = u8

The current input type is a sequence of that Item type. Read more
§

type Iter = Enumerate<<&'a [u8] as InputIter>::IterElem>

An iterator over the input type, producing the item and its position\nfor use with [Slice]. If we’re iterating over &str, the position\ncorresponds to the byte index of the character
§

type IterElem = Copied<Iter<'a, u8>>

An iterator over the input type, producing the item
§

fn iter_indices(&self) -> <&'a [u8] as InputIter>::Iter ⓘ

Returns an iterator over the elements and their byte offsets
§

fn iter_elements(&self) -> <&'a [u8] as InputIter>::IterElem ⓘ

Returns an iterator over the elements
§

fn position<P>(&self, predicate: P) -> Option<usize>
where\n P: Fn(<&'a [u8] as InputIter>::Item) -> bool,

Finds the byte position of the element
§

fn slice_index(&self, count: usize) -> Result<usize, Needed>

Get the byte offset from the element’s position in the stream
","InputIter","index::BytesRef"],["
§

impl<'a, T> InputLength for &'a [T]

§

fn input_len(&self) -> usize

Calculates the input length, as indicated by its name,\nand the name of the trait itself
","InputLength","index::BytesRef"],["
§

impl<'a> InputTake for &'a [u8]

§

fn take(&self, count: usize) -> &'a [u8] ⓘ

Returns a slice of count bytes. panics if count > length
§

fn take_split(&self, count: usize) -> (&'a [u8], &'a [u8])

Split the stream at the count byte offset. panics if count > length
","InputTake","index::BytesRef"],["
§

impl<'a> InputTakeAtPosition for &'a [u8]

§

type Item = u8

The current input type is a sequence of that Item type. Read more
§

fn split_at_position<P, E>(\n &self,\n predicate: P,\n) -> Result<(&'a [u8], &'a [u8]), Err<E>>
where\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as InputTakeAtPosition>::Item) -> bool,

Looks for the first element of the input type for which the condition returns true,\nand returns the input up to this position. Read more
§

fn split_at_position1<P, E>(\n &self,\n predicate: P,\n e: ErrorKind,\n) -> Result<(&'a [u8], &'a [u8]), Err<E>>
where\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as InputTakeAtPosition>::Item) -> bool,

Looks for the first element of the input type for which the condition returns true\nand returns the input up to this position. Read more
§

fn split_at_position_complete<P, E>(\n &self,\n predicate: P,\n) -> Result<(&'a [u8], &'a [u8]), Err<E>>
where\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as InputTakeAtPosition>::Item) -> bool,

Looks for the first element of the input type for which the condition returns true,\nand returns the input up to this position. Read more
§

fn split_at_position1_complete<P, E>(\n &self,\n predicate: P,\n e: ErrorKind,\n) -> Result<(&'a [u8], &'a [u8]), Err<E>>
where\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as InputTakeAtPosition>::Item) -> bool,

Looks for the first element of the input type for which the condition returns true\nand returns the input up to this position. Read more
","InputTakeAtPosition","index::BytesRef"],["
§

impl IntoArrayRef for &[u8]

§

fn into_array_ref(self) -> Arc<dyn Array> ⓘ

","IntoArrayRef","index::BytesRef"],["
§

impl<'a> IntoByteSlice<'a> for &'a [u8]

§

fn into_byte_slice(self) -> &'a [u8] ⓘ

Coverts self into a &[u8]. Read more
","IntoByteSlice<'a>","index::BytesRef"],["
Source§

impl<'de, 'a, E> IntoDeserializer<'de, E> for &'a [u8]
where\n E: Error,

Source§

type Deserializer = BytesDeserializer<'a, E>

The type of the deserializer being converted into.
Source§

fn into_deserializer(self) -> BytesDeserializer<'a, E>

Convert this value into a deserializer.
","IntoDeserializer<'de, E>","index::BytesRef"],["
1.0.0 · Source§

impl<'a, T> IntoIterator for &'a [T]

Source§

type Item = &'a T

The type of the elements being iterated over.
Source§

type IntoIter = Iter<'a, T>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Iter<'a, T>

Creates an iterator from a value. Read more
","IntoIterator","index::BytesRef"],["
§

impl<'data, T> IntoParallelIterator for &'data [T]
where\n T: Sync + 'data,

§

type Item = &'data T

The type of item that the parallel iterator will produce.
§

type Iter = Iter<'data, T>

The parallel iterator type that will be created.
§

fn into_par_iter(self) -> <&'data [T] as IntoParallelIterator>::Iter ⓘ

Converts self into a parallel iterator. Read more
","IntoParallelIterator","index::BytesRef"],["
§

impl IntoResponse for &'static [u8]

§

fn into_response(self) -> Response<Body>

Create a response.
","IntoResponse","index::BytesRef"],["
§

impl Literal for &[u8]

§

fn lit(&self) -> Expr

convert the value to a Literal expression
","Literal","index::BytesRef"],["
§

impl<'a, T> Offset<<&'a [T] as Stream>::Checkpoint> for &'a [T]
where\n T: Clone + Debug,

§

fn offset_from(&self, other: &<&'a [T] as Stream>::Checkpoint) -> usize

Offset between the first byte of start and the first byte of selfa Read more
","Offset<<&'a [T] as Stream>::Checkpoint>","index::BytesRef"],["
§

impl<T> Offset for &[T]

§

fn offset_from(&self, start: &&[T]) -> usize

Offset between the first byte of start and the first byte of selfa Read more
","Offset","index::BytesRef"],["
§

impl<'a> Offset for &'a [u8]

§

fn offset(&self, second: &&'a [u8]) -> usize

Offset between the first byte of self and the first byte of the argument
","Offset","index::BytesRef"],["
§

impl<'a> Offset for &'a [u8]

§

fn offset(&self, second: &&'a [u8]) -> usize

Offset between the first byte of self and the first byte of the argument\nthe argument must be a part of self, otherwise this can fail with arithmetic\nunderflows as it compares byte offsets
","Offset","index::BytesRef"],["
§

impl<R> ParseSlice<R> for &[u8]
where\n R: FromStr,

§

fn parse_slice(&self) -> Option<R>

Succeeds if parse() succeeded Read more
","ParseSlice","index::BytesRef"],["
§

impl<'a, R> ParseTo<R> for &'a [u8]
where\n R: FromStr,

§

fn parse_to(&self) -> Option<R>

Succeeds if parse() succeeded. The byte slice implementation\nwill first convert it to a &str, then apply the parse() function
","ParseTo","index::BytesRef"],["
§

impl<'a, R> ParseTo<R> for &'a [u8]
where\n R: FromStr,

§

fn parse_to(&self) -> Option<R>

Succeeds if parse() succeeded. The byte slice implementation\nwill first convert it to a &str, then apply the parse() function
","ParseTo","index::BytesRef"],["
§

impl<'s, I, E> Parser<I, <I as Stream>::Slice, E> for &'s [u8]
where\n E: ParserError<I>,\n I: Compare<&'s [u8]> + StreamIsPartial + Stream,

This is a shortcut for [literal][crate::token::literal].

\n

§Example

\n
\nfn parser<'s>(s: &mut &'s [u8]) -> ModalResult<&'s [u8]> {\n  alt((&\"Hello\"[..], take(5usize))).parse_next(s)\n}\n\nassert_eq!(parser.parse_peek(&b\"Hello, World!\"[..]), Ok((&b\", World!\"[..], &b\"Hello\"[..])));\nassert_eq!(parser.parse_peek(&b\"Something\"[..]), Ok((&b\"hing\"[..], &b\"Somet\"[..])));\nassert!(parser.parse_peek(&b\"Some\"[..]).is_err());\nassert!(parser.parse_peek(&b\"\"[..]).is_err());
§

fn parse_next(&mut self, i: &mut I) -> Result<<I as Stream>::Slice, E>

Take tokens from the [Stream], turning it into the output Read more
§

fn parse(\n &mut self,\n input: I,\n) -> Result<O, ParseError<I, <E as ParserError<I>>::Inner>>
where\n Self: Sized,\n I: Stream + StreamIsPartial,\n E: ParserError<I>,\n <E as ParserError<I>>::Inner: ParserError<I>,

Parse all of input, generating O from it
§

fn parse_peek(&mut self, input: I) -> Result<(I, O), E>

Take tokens from the [Stream], turning it into the output Read more
§

fn by_ref(&mut self) -> ByRef<'_, Self, I, O, E>
where\n Self: Sized,

Treat &mut Self as a parser Read more
§

fn value<O2>(self, val: O2) -> Value<Self, I, O, O2, E>
where\n Self: Sized,\n O2: Clone,

Produce the provided value Read more
§

fn default_value<O2>(self) -> DefaultValue<Self, I, O, O2, E>
where\n Self: Sized,\n O2: Default,

Produce a type’s default value Read more
§

fn void(self) -> Void<Self, I, O, E>
where\n Self: Sized,

Discards the output of the Parser Read more
§

fn output_into<O2>(self) -> OutputInto<Self, I, O, O2, E>
where\n Self: Sized,\n O: Into<O2>,

Convert the parser’s output to another type using std::convert::From Read more
§

fn take(self) -> Take<Self, I, O, E>
where\n Self: Sized,\n I: Stream,

Produce the consumed input as produced value. Read more
§

fn with_taken(self) -> WithTaken<Self, I, O, E>
where\n Self: Sized,\n I: Stream,

Produce the consumed input with the output Read more
§

fn span(self) -> Span<Self, I, O, E>
where\n Self: Sized,\n I: Stream + Location,

Produce the location of the consumed input as produced value. Read more
§

fn with_span(self) -> WithSpan<Self, I, O, E>
where\n Self: Sized,\n I: Stream + Location,

Produce the location of consumed input with the output Read more
§

fn map<G, O2>(self, map: G) -> Map<Self, G, I, O, O2, E>
where\n G: FnMut(O) -> O2,\n Self: Sized,

Maps a function over the output of a parser Read more
§

fn try_map<G, O2, E2>(self, map: G) -> TryMap<Self, G, I, O, O2, E, E2>
where\n Self: Sized,\n G: FnMut(O) -> Result<O2, E2>,\n I: Stream,\n E: FromExternalError<I, E2> + ParserError<I>,

Applies a function returning a Result over the output of a parser. Read more
§

fn verify_map<G, O2>(self, map: G) -> VerifyMap<Self, G, I, O, O2, E>
where\n Self: Sized,\n G: FnMut(O) -> Option<O2>,\n I: Stream,\n E: ParserError<I>,

Apply both [Parser::verify] and [Parser::map]. Read more
§

fn flat_map<G, H, O2>(self, map: G) -> FlatMap<Self, G, H, I, O, O2, E>
where\n Self: Sized,\n G: FnMut(O) -> H,\n H: Parser<I, O2, E>,

Creates a parser from the output of this one Read more
§

fn and_then<G, O2>(self, inner: G) -> AndThen<Self, G, I, O, O2, E>
where\n Self: Sized,\n G: Parser<O, O2, E>,\n O: StreamIsPartial,\n I: Stream,

Applies a second parser over the output of the first one Read more
§

fn parse_to<O2>(self) -> ParseTo<Self, I, O, O2, E>
where\n Self: Sized,\n I: Stream,\n O: ParseSlice<O2>,\n E: ParserError<I>,

Apply std::str::FromStr to the output of the parser Read more
§

fn verify<G, O2>(self, filter: G) -> Verify<Self, G, I, O, O2, E>
where\n Self: Sized,\n G: FnMut(&O2) -> bool,\n I: Stream,\n O: Borrow<O2>,\n E: ParserError<I>,\n O2: ?Sized,

Returns the output of the child parser if it satisfies a verification function. Read more
§

fn context<C>(self, context: C) -> Context<Self, I, O, E, C>
where\n Self: Sized,\n I: Stream,\n E: AddContext<I, C> + ParserError<I>,\n C: Clone + Debug,

If parsing fails, add context to the error Read more
§

fn context_with<F, C, FI>(\n self,\n context: F,\n) -> ContextWith<Self, I, O, E, F, C, FI>
where\n Self: Sized,\n I: Stream,\n E: AddContext<I, C> + ParserError<I>,\n F: Fn() -> FI + Clone,\n C: Debug,\n FI: Iterator<Item = C>,

If parsing fails, dynamically add context to the error Read more
§

fn map_err<G, E2>(self, map: G) -> MapErr<Self, G, I, O, E, E2>
where\n G: FnMut(E) -> E2,\n Self: Sized,

Maps a function over the error of a parser Read more
§

fn complete_err(self) -> CompleteErr<Self, I, O, E>
where\n Self: Sized,

Transforms [Incomplete][crate::error::ErrMode::Incomplete] into [Backtrack][crate::error::ErrMode::Backtrack] Read more
§

fn err_into<E2>(self) -> ErrInto<Self, I, O, E, E2>
where\n Self: Sized,\n E: Into<E2>,

Convert the parser’s error to another type using std::convert::From
","Parser::Slice, E>","index::BytesRef"],["
1.0.0 (const: unstable) · Source§

impl<T, U, const N: usize> PartialEq<[U; N]> for &[T]
where\n T: PartialEq<U>,

Source§

fn eq(&self, other: &[U; N]) -> bool

Tests for self and other values to be equal, and is used by ==.
Source§

fn ne(&self, other: &[U; N]) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq<[U; N]>","index::BytesRef"],["
§

impl<'a> PartialEq<BStr> for &'a [u8]

§

fn eq(&self, other: &BStr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","index::BytesRef"],["
§

impl<'a> PartialEq<BStr> for &'a [u8]

§

fn eq(&self, other: &BStr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","index::BytesRef"],["
§

impl<'a> PartialEq<BString> for &'a [u8]

§

fn eq(&self, other: &BString) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","index::BytesRef"],["
Source§

impl PartialEq<ByteStr> for &[u8]

Source§

fn eq(&self, other: &ByteStr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","index::BytesRef"],["
Source§

impl PartialEq<ByteString> for &[u8]

Source§

fn eq(&self, other: &ByteString) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","index::BytesRef"],["
§

impl PartialEq<Bytes> for &[u8]

§

fn eq(&self, other: &Bytes) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","index::BytesRef"],["
§

impl<'a> PartialEq<Bytes> for &'a [u8]

§

fn eq(&self, other: &Bytes) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","index::BytesRef"],["
§

impl PartialEq<BytesMut> for &[u8]

§

fn eq(&self, other: &BytesMut) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","index::BytesRef"],["
§

impl<T, U, A> PartialEq<Vec<U, A>> for &[T]
where\n A: Allocator,\n T: PartialEq<U>,

§

fn eq(&self, other: &Vec<U, A>) -> bool

Tests for self and other values to be equal, and is used by ==.
§

fn ne(&self, other: &Vec<U, A>) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq>","index::BytesRef"],["
1.46.0 (const: unstable) · Source§

impl<T, U, A> PartialEq<Vec<U, A>> for &[T]
where\n A: Allocator,\n T: PartialEq<U>,

Source§

fn eq(&self, other: &Vec<U, A>) -> bool

Tests for self and other values to be equal, and is used by ==.
Source§

fn ne(&self, other: &Vec<U, A>) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq>","index::BytesRef"],["
§

impl<T> PartialEq<Vec1<T>> for &[T]
where\n T: PartialEq,

§

fn eq(&self, other: &Vec1<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq>","index::BytesRef"],["
§

impl<'a> PartialOrd<BStr> for &'a [u8]

§

fn partial_cmp(&self, other: &BStr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","index::BytesRef"],["
§

impl<'a> PartialOrd<BStr> for &'a [u8]

§

fn partial_cmp(&self, other: &BStr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","index::BytesRef"],["
§

impl<'a> PartialOrd<BString> for &'a [u8]

§

fn partial_cmp(&self, other: &BString) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","index::BytesRef"],["
§

impl PartialOrd<Bytes> for &[u8]

§

fn partial_cmp(&self, other: &Bytes) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","index::BytesRef"],["
§

impl<'a> PartialOrd<Bytes> for &'a [u8]

§

fn partial_cmp(&self, other: &Bytes) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","index::BytesRef"],["
§

impl PartialOrd<BytesMut> for &[u8]

§

fn partial_cmp(&self, other: &BytesMut) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","index::BytesRef"],["
Source§

impl<'a> PhfBorrow<[u8]> for &'a [u8]

Source§

fn borrow(&self) -> &[u8] ⓘ

Convert a reference to self to a reference to the borrowed type.
","PhfBorrow<[u8]>","index::BytesRef"],["
1.0.0 · Source§

impl Read for &[u8]

Read is implemented for &[u8] by copying from the slice.

\n

Note that reading updates the slice to point to the yet unread part.\nThe slice will be empty when EOF is reached.

\n
Source§

fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>

Pull some bytes from this source into the specified buffer, returning\nhow many bytes were read. Read more
Source§

fn read_buf(&mut self, cursor: BorrowedCursor<'_, u8>) -> Result<(), Error>

🔬This is a nightly-only experimental API. (read_buf)
Pull some bytes from this source into the specified buffer. Read more
Source§

fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>

Like read, except that it reads into a slice of buffers. Read more
Source§

fn is_read_vectored(&self) -> bool

🔬This is a nightly-only experimental API. (can_vector)
Determines if this Reader has an efficient read_vectored\nimplementation. Read more
Source§

fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>

Reads the exact number of bytes required to fill buf. Read more
Source§

fn read_buf_exact(\n &mut self,\n cursor: BorrowedCursor<'_, u8>,\n) -> Result<(), Error>

🔬This is a nightly-only experimental API. (read_buf)
Reads the exact number of bytes required to fill cursor. Read more
Source§

fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>

Reads all bytes until EOF in this source, placing them into buf. Read more
Source§

fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>

Reads all bytes until EOF in this source, appending them to buf. Read more
1.0.0 · Source§

fn by_ref(&mut self) -> &mut Self
where\n Self: Sized,

Creates a “by reference” adapter for this instance of Read. Read more
1.0.0 · Source§

fn bytes(self) -> Bytes<Self>
where\n Self: Sized,

Transforms this Read instance to an Iterator over its bytes. Read more
1.0.0 · Source§

fn chain<R>(self, next: R) -> Chain<Self, R>
where\n R: Read,\n Self: Sized,

Creates an adapter which will chain this stream with another. Read more
1.0.0 · Source§

fn take(self, limit: u64) -> Take<Self>
where\n Self: Sized,

Creates an adapter which will read at most limit bytes from it. Read more
Source§

fn read_array<const N: usize>(&mut self) -> Result<[u8; N], Error>
where\n Self: Sized,

🔬This is a nightly-only experimental API. (read_array)
Read and return a fixed array of bytes from this source. Read more
Source§

fn read_le<T>(&mut self) -> Result<T, Error>
where\n T: FromEndianBytes,\n Self: Sized,

🔬This is a nightly-only experimental API. (read_le)
Read and return a type (e.g. an integer) in little-endian order. Read more
Source§

fn read_be<T>(&mut self) -> Result<T, Error>
where\n T: FromEndianBytes,\n Self: Sized,

🔬This is a nightly-only experimental API. (read_le)
Read and return a type (e.g. an integer) in big-endian order. Read more
","Read","index::BytesRef"],["
§

impl<'a> ReadRef<'a> for &'a [u8]

§

fn len(self) -> Result<u64, ()>

The total size of the block of data.
§

fn read_bytes_at(self, offset: u64, size: u64) -> Result<&'a [u8], ()>

Get a reference to a u8 slice at the given offset. Read more
§

fn read_bytes_at_until(\n self,\n range: Range<u64>,\n delimiter: u8,\n) -> Result<&'a [u8], ()>

Get a reference to a delimited u8 slice which starts at range.start. Read more
§

fn read_bytes(self, offset: &mut u64, size: u64) -> Result<&'a [u8], ()>

Get a reference to a u8 slice at the given offset, and update the offset. Read more
§

fn read<T>(self, offset: &mut u64) -> Result<&'a T, ()>
where\n T: Pod,

Get a reference to a Pod type at the given offset, and update the offset. Read more
§

fn read_at<T>(self, offset: u64) -> Result<&'a T, ()>
where\n T: Pod,

Get a reference to a Pod type at the given offset. Read more
§

fn read_slice<T>(self, offset: &mut u64, count: usize) -> Result<&'a [T], ()>
where\n T: Pod,

Get a reference to a slice of a Pod type at the given offset, and update the offset. Read more
§

fn read_slice_at<T>(self, offset: u64, count: usize) -> Result<&'a [T], ()>
where\n T: Pod,

Get a reference to a slice of a Pod type at the given offset. Read more
","ReadRef<'a>","index::BytesRef"],["
§

impl<'a> Replacer for &'a [u8]

§

fn replace_append(&mut self, caps: &Captures<'_>, dst: &mut Vec<u8>)

Appends possibly empty data to dst to replace the current match. Read more
§

fn no_expansion(&mut self) -> Option<Cow<'_, [u8]>>

Return a fixed unchanging replacement byte string. Read more
§

fn by_ref<'r>(&'r mut self) -> ReplacerRef<'r, Self>

Returns a type that implements Replacer, but that borrows and wraps\nthis Replacer. Read more
","Replacer","index::BytesRef"],["
§

impl<'a> ScalarRef<'a> for &'a [u8]

§

type ScalarType = Vec<u8>

The corresponding [Scalar] type.
§

fn to_owned_scalar(&self) -> Vec<u8> ⓘ

Convert the reference into an owned value.
","ScalarRef<'a>","index::BytesRef"],["
§

impl<'a, T> Slice<Range<usize>> for &'a [T]

§

fn slice(&self, range: Range<usize>) -> &'a [T]

Slices self according to the range argument
","Slice>","index::BytesRef"],["
§

impl<'a, T> Slice<RangeFrom<usize>> for &'a [T]

§

fn slice(&self, range: RangeFrom<usize>) -> &'a [T]

Slices self according to the range argument
","Slice>","index::BytesRef"],["
§

impl<'a, T> Slice<RangeFull> for &'a [T]

§

fn slice(&self, range: RangeFull) -> &'a [T]

Slices self according to the range argument
","Slice","index::BytesRef"],["
§

impl<'a, T> Slice<RangeTo<usize>> for &'a [T]

§

fn slice(&self, range: RangeTo<usize>) -> &'a [T]

Slices self according to the range argument
","Slice>","index::BytesRef"],["
§

impl<T> SliceLen for &[T]

§

fn slice_len(&self) -> usize

Calculates the input length, as indicated by its name,\nand the name of the trait itself
","SliceLen","index::BytesRef"],["
§

impl SplitByteSlice for &[u8]

§

unsafe fn split_at_unchecked(self, mid: usize) -> (&[u8], &[u8])

Splits the slice at the midpoint, possibly omitting bounds checks. Read more
§

fn split_at(self, mid: usize) -> Result<(Self, Self), Self>

Attempts to split self at the midpoint. Read more
","SplitByteSlice","index::BytesRef"],["
§

impl<'i, T> Stream for &'i [T]
where\n T: Clone + Debug,

§

type Token = T

The smallest unit being parsed Read more
§

type Slice = &'i [T]

Sequence of Tokens Read more
§

type IterOffsets = Enumerate<Cloned<Iter<'i, T>>>

Iterate with the offset from the current location
§

type Checkpoint = Checkpoint<&'i [T], &'i [T]>

A parse location within the stream
§

fn iter_offsets(&self) -> <&'i [T] as Stream>::IterOffsets ⓘ

Iterate with the offset from the current location
§

fn eof_offset(&self) -> usize

Returns the offset to the end of the input
§

fn next_token(&mut self) -> Option<<&'i [T] as Stream>::Token>

Split off the next token from the input
§

fn peek_token(&self) -> Option<<&'i [T] as Stream>::Token>

Split off the next token from the input
§

fn offset_for<P>(&self, predicate: P) -> Option<usize>
where\n P: Fn(<&'i [T] as Stream>::Token) -> bool,

Finds the offset of the next matching token
§

fn offset_at(&self, tokens: usize) -> Result<usize, Needed>

Get the offset for the number of tokens into the stream Read more
§

fn next_slice(&mut self, offset: usize) -> <&'i [T] as Stream>::Slice ⓘ

Split off a slice of tokens from the input Read more
§

unsafe fn next_slice_unchecked(\n &mut self,\n offset: usize,\n) -> <&'i [T] as Stream>::Slice ⓘ

Split off a slice of tokens from the input Read more
§

fn peek_slice(&self, offset: usize) -> <&'i [T] as Stream>::Slice ⓘ

Split off a slice of tokens from the input
§

unsafe fn peek_slice_unchecked(\n &self,\n offset: usize,\n) -> <&'i [T] as Stream>::Slice ⓘ

Split off a slice of tokens from the input Read more
§

fn checkpoint(&self) -> <&'i [T] as Stream>::Checkpoint ⓘ

Save the current parse location within the stream
§

fn reset(&mut self, checkpoint: &<&'i [T] as Stream>::Checkpoint)

Revert the stream to a prior [Self::Checkpoint] Read more
§

fn raw(&self) -> &dyn Debug

👎Deprecated since 0.7.10:

Replaced with Stream::trace

\n
Deprecated for callers as of 0.7.10, instead call [Stream::trace]
§

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

Write out a single-line summary of the current parse location
§

fn finish(&mut self) -> Self::Slice

Advance to the end of the stream
§

fn peek_finish(&self) -> Self::Slice
where\n Self: Clone,

Advance to the end of the stream
","Stream","index::BytesRef"],["
§

impl<T> StreamIsPartial for &[T]

§

type PartialState = ()

Whether the stream is currently partial or complete
§

fn complete(&mut self) -> <&[T] as StreamIsPartial>::PartialState ⓘ

Mark the stream is complete
§

fn restore_partial(&mut self, _state: <&[T] as StreamIsPartial>::PartialState)

Restore the stream back to its previous state
§

fn is_partial_supported() -> bool

Report whether the [Stream] is can ever be incomplete
§

fn is_partial(&self) -> bool

Report whether the [Stream] is currently incomplete
","StreamIsPartial","index::BytesRef"],["
§

impl<T> ToSql for &[T]
where\n T: ToSql,

§

fn to_sql(\n &self,\n ty: &Type,\n w: &mut BytesMut,\n) -> Result<IsNull, Box<dyn Error + Send + Sync>>

Converts the value of self into the binary format of the specified\nPostgres Type, appending it to out. Read more
§

fn accepts(ty: &Type) -> bool

Determines if a value of this type can be converted to the specified\nPostgres Type.
§

fn to_sql_checked(\n &self,\n ty: &Type,\n out: &mut BytesMut,\n) -> Result<IsNull, Box<dyn Error + Send + Sync>>

An adaptor method used internally by Rust-Postgres. Read more
§

fn encode_format(&self, _ty: &Type) -> Format

Specify the encode format
","ToSql","index::BytesRef"],["
§

impl ToSql for &[u8]

§

fn to_sql(\n &self,\n _: &Type,\n w: &mut BytesMut,\n) -> Result<IsNull, Box<dyn Error + Send + Sync>>

Converts the value of self into the binary format of the specified\nPostgres Type, appending it to out. Read more
§

fn accepts(ty: &Type) -> bool

Determines if a value of this type can be converted to the specified\nPostgres Type.
§

fn to_sql_checked(\n &self,\n ty: &Type,\n out: &mut BytesMut,\n) -> Result<IsNull, Box<dyn Error + Send + Sync>>

An adaptor method used internally by Rust-Postgres. Read more
§

fn encode_format(&self, _ty: &Type) -> Format

Specify the encode format
","ToSql","index::BytesRef"],["
§

impl<'a> TryFrom<&'a DecryptionContext> for &'a [u8]

§

type Error = Unspecified

The type returned in the event of a conversion error.
§

fn try_from(value: &'a DecryptionContext) -> Result<&'a [u8], Unspecified>

Performs the conversion.
","TryFrom<&'a DecryptionContext>","index::BytesRef"],["
§

impl<'a> TryFrom<&'a EncryptionContext> for &'a [u8]

§

type Error = Unspecified

The type returned in the event of a conversion error.
§

fn try_from(value: &'a EncryptionContext) -> Result<&'a [u8], Unspecified>

Performs the conversion.
","TryFrom<&'a EncryptionContext>","index::BytesRef"],["
§

impl<T> UpdateSlice for &[T]
where\n T: Clone + Debug,

§

fn update_slice(self, inner: <&[T] as Stream>::Slice) -> &[T]

Convert an Output type to be used as Stream
","UpdateSlice","index::BytesRef"],["
§

impl<'a> Value<'a> for &'a [u8]

§

type ArrayIter = Empty<&'a [u8]>

The child value type returned by this doc value.\nThe iterator for walking through the elements within the array.
§

type ObjectIter = Empty<(&'a str, &'a [u8])>

The visitor walking through the key-value pairs within\nthe object.
§

fn as_value(&self) -> ReferenceValue<'a, &'a [u8]>

Returns the field value represented by an enum which borrows it’s data.
§

fn as_leaf(&self) -> Option<ReferenceValueLeaf<'a>>

If the Value is a leaf, returns the associated leaf. Returns None otherwise.
§

fn as_str(&self) -> Option<&'a str>

If the Value is a String, returns the associated str. Returns None otherwise.
§

fn as_u64(&self) -> Option<u64>

If the Value is a u64, returns the associated u64. Returns None otherwise.
§

fn as_i64(&self) -> Option<i64>

If the Value is a i64, returns the associated i64. Returns None otherwise.
§

fn as_f64(&self) -> Option<f64>

If the Value is a f64, returns the associated f64. Returns None otherwise.
§

fn as_datetime(&self) -> Option<DateTime>

If the Value is a datetime, returns the associated datetime. Returns None otherwise.
§

fn as_ip_addr(&self) -> Option<Ipv6Addr>

If the Value is a IP address, returns the associated IP. Returns None otherwise.
§

fn as_bool(&self) -> Option<bool>

If the Value is a bool, returns the associated bool. Returns None otherwise.
§

fn as_pre_tokenized_text(&self) -> Option<Box<PreTokenizedString>>

If the Value is a pre-tokenized string, returns the associated string. Returns None\notherwise.
§

fn as_bytes(&self) -> Option<&'a [u8]>

If the Value is a bytes value, returns the associated set of bytes. Returns None otherwise.
§

fn as_facet(&self) -> Option<&'a str>

If the Value is a facet, returns the associated facet. Returns None otherwise.
§

fn as_array(&self) -> Option<Self::ArrayIter>

Returns the iterator over the array if the Value is an array.
§

fn as_object(&self) -> Option<Self::ObjectIter>

Returns the iterator over the object if the Value is an object.
","Value<'a>","index::BytesRef"],["
§

impl<'zf, T> ZeroFrom<'zf, [T]> for &'zf [T]

§

fn zero_from(other: &'zf [T]) -> &'zf [T]

Clone the other C into a struct that may retain references into C.
","ZeroFrom<'zf, [T]>","index::BytesRef"],["
§

impl ByteSlice for &[u8]

","ByteSlice","index::BytesRef"],["
§

impl CloneableByteSlice for &[u8]

","CloneableByteSlice","index::BytesRef"],["
§

impl CopyableByteSlice for &[u8]

","CopyableByteSlice","index::BytesRef"]]],["promql",[["
Source§

impl<T> [T]

1.0.0 · Source

pub fn sort(&mut self)
where\n T: Ord,

Sorts the slice in ascending order, preserving initial order of equal elements.

\n

This sort is stable (i.e., does not reorder equal elements) and O(n * log(n))\nworst-case.

\n

If the implementation of Ord for T does not implement a total order, the function\nmay panic; even if the function exits normally, the resulting order of elements in the slice\nis unspecified. See also the note on panicking below.

\n

When applicable, unstable sorting is preferred because it is generally faster than stable\nsorting and it doesn’t allocate auxiliary memory. See\nsort_unstable. The exception are partially sorted slices, which\nmay be better served with slice::sort.

\n

Sorting types that only implement PartialOrd such as f32 and f64 require\nadditional precautions. For example, f32::NAN != f32::NAN, which doesn’t fulfill the\nreflexivity requirement of Ord. By using an alternative comparison function with\nslice::sort_by such as f32::total_cmp or f64::total_cmp that defines a total\norder users can sort slices containing floating-point values. Alternatively, if all values\nin the slice are guaranteed to be in a subset for which PartialOrd::partial_cmp forms a\ntotal order, it’s possible to sort the slice with sort_by(|a, b| a.partial_cmp(b).unwrap()).

\n
§Current implementation
\n

The current implementation is based on driftsort by Orson Peters and Lukas Bergdoll, which\ncombines the fast average case of quicksort with the fast worst case and partial run\ndetection of mergesort, achieving linear time on fully sorted and reversed inputs. On inputs\nwith k distinct elements, the expected time to sort the data is O(n * log(k)).

\n

The auxiliary memory allocation behavior depends on the input length. Short slices are\nhandled without allocation, medium sized slices allocate self.len() and beyond that it\nclamps at self.len() / 2.

\n
§Panics
\n

May panic if the implementation of Ord for T does not implement a total order, or if\nthe Ord implementation itself panics.

\n

All safe functions on slices preserve the invariant that even if the function panics, all\noriginal elements will remain in the slice and any possible modifications via interior\nmutability are observed in the input. This ensures that recovery code (for instance inside\nof a Drop or following a catch_unwind) will still have access to all the original\nelements. For instance, if the slice belongs to a Vec, the Vec::drop method will be able\nto dispose of all contained elements.

\n
§Examples
\n
let mut v = [4, -5, 1, -3, 2];\n\nv.sort();\nassert_eq!(v, [-5, -3, 1, 2, 4]);
1.0.0 · Source

pub fn sort_by<F>(&mut self, compare: F)
where\n F: FnMut(&T, &T) -> Ordering,

Sorts the slice in ascending order with a comparison function, preserving initial order of\nequal elements.

\n

This sort is stable (i.e., does not reorder equal elements) and O(n * log(n))\nworst-case.

\n

If the comparison function compare does not implement a total order, the function may\npanic; even if the function exits normally, the resulting order of elements in the slice is\nunspecified. See also the note on panicking below.

\n

For example |a, b| (a - b).cmp(a) is a comparison function that is neither transitive nor\nreflexive nor total, a < b < c < a with a = 1, b = 2, c = 3. For more information and\nexamples see the Ord documentation.

\n
§Current implementation
\n

The current implementation is based on driftsort by Orson Peters and Lukas Bergdoll, which\ncombines the fast average case of quicksort with the fast worst case and partial run\ndetection of mergesort, achieving linear time on fully sorted and reversed inputs. On inputs\nwith k distinct elements, the expected time to sort the data is O(n * log(k)).

\n

The auxiliary memory allocation behavior depends on the input length. Short slices are\nhandled without allocation, medium sized slices allocate self.len() and beyond that it\nclamps at self.len() / 2.

\n
§Panics
\n

May panic if compare does not implement a total order, or if compare itself panics.

\n

All safe functions on slices preserve the invariant that even if the function panics, all\noriginal elements will remain in the slice and any possible modifications via interior\nmutability are observed in the input. This ensures that recovery code (for instance inside\nof a Drop or following a catch_unwind) will still have access to all the original\nelements. For instance, if the slice belongs to a Vec, the Vec::drop method will be able\nto dispose of all contained elements.

\n
§Examples
\n
let mut v = [4, -5, 1, -3, 2];\nv.sort_by(|a, b| a.cmp(b));\nassert_eq!(v, [-5, -3, 1, 2, 4]);\n\n// reverse sorting\nv.sort_by(|a, b| b.cmp(a));\nassert_eq!(v, [4, 2, 1, -3, -5]);
1.7.0 · Source

pub fn sort_by_key<K, F>(&mut self, f: F)
where\n F: FnMut(&T) -> K,\n K: Ord,

Sorts the slice in ascending order with a key extraction function, preserving initial order\nof equal elements.

\n

This sort is stable (i.e., does not reorder equal elements) and O(m * n * log(n))\nworst-case, where the key function is O(m).

\n

If the implementation of Ord for K does not implement a total order, the function\nmay panic; even if the function exits normally, the resulting order of elements in the slice\nis unspecified. See also the note on panicking below.

\n
§Current implementation
\n

The current implementation is based on driftsort by Orson Peters and Lukas Bergdoll, which\ncombines the fast average case of quicksort with the fast worst case and partial run\ndetection of mergesort, achieving linear time on fully sorted and reversed inputs. On inputs\nwith k distinct elements, the expected time to sort the data is O(n * log(k)).

\n

The auxiliary memory allocation behavior depends on the input length. Short slices are\nhandled without allocation, medium sized slices allocate self.len() and beyond that it\nclamps at self.len() / 2.

\n
§Panics
\n

May panic if the implementation of Ord for K does not implement a total order, or if\nthe Ord implementation or the key-function f panics.

\n

All safe functions on slices preserve the invariant that even if the function panics, all\noriginal elements will remain in the slice and any possible modifications via interior\nmutability are observed in the input. This ensures that recovery code (for instance inside\nof a Drop or following a catch_unwind) will still have access to all the original\nelements. For instance, if the slice belongs to a Vec, the Vec::drop method will be able\nto dispose of all contained elements.

\n
§Examples
\n
let mut v = [4i32, -5, 1, -3, 2];\n\nv.sort_by_key(|k| k.abs());\nassert_eq!(v, [1, 2, -3, 4, -5]);
1.34.0 · Source

pub fn sort_by_cached_key<K, F>(&mut self, f: F)
where\n F: FnMut(&T) -> K,\n K: Ord,

Sorts the slice in ascending order with a key extraction function, preserving initial order\nof equal elements.

\n

This sort is stable (i.e., does not reorder equal elements) and O(m * n + n *\nlog(n)) worst-case, where the key function is O(m).

\n

During sorting, the key function is called at most once per element, by using temporary\nstorage to remember the results of key evaluation. The order of calls to the key function is\nunspecified and may change in future versions of the standard library.

\n

If the implementation of Ord for K does not implement a total order, the function\nmay panic; even if the function exits normally, the resulting order of elements in the slice\nis unspecified. See also the note on panicking below.

\n

For simple key functions (e.g., functions that are property accesses or basic operations),\nsort_by_key is likely to be faster.

\n
§Current implementation
\n

The current implementation is based on instruction-parallel-network sort by Lukas\nBergdoll, which combines the fast average case of randomized quicksort with the fast worst\ncase of heapsort, while achieving linear time on fully sorted and reversed inputs. And\nO(k * log(n)) where k is the number of distinct elements in the input. It leverages\nsuperscalar out-of-order execution capabilities commonly found in CPUs, to efficiently\nperform the operation.

\n

In the worst case, the algorithm allocates temporary storage in a Vec<(K, usize)> the\nlength of the slice.

\n
§Panics
\n

May panic if the implementation of Ord for K does not implement a total order, or if\nthe Ord implementation panics.

\n

All safe functions on slices preserve the invariant that even if the function panics, all\noriginal elements will remain in the slice and any possible modifications via interior\nmutability are observed in the input. This ensures that recovery code (for instance inside\nof a Drop or following a catch_unwind) will still have access to all the original\nelements. For instance, if the slice belongs to a Vec, the Vec::drop method will be able\nto dispose of all contained elements.

\n
§Examples
\n
let mut v = [4i32, -5, 1, -3, 2, 10];\n\n// Strings are sorted by lexicographical order.\nv.sort_by_cached_key(|k| k.to_string());\nassert_eq!(v, [-3, -5, 1, 10, 2, 4]);
1.0.0 · Source

pub fn to_vec(&self) -> Vec<T>
where\n T: Clone,

Copies self into a new Vec.

\n
§Examples
\n
let s = [10, 40, 30];\nlet x = s.to_vec();\n// Here, `s` and `x` can be modified independently.
Source

pub fn to_vec_in<A>(&self, alloc: A) -> Vec<T, A>
where\n A: Allocator,\n T: Clone,

🔬This is a nightly-only experimental API. (allocator_api)

Copies self into a new Vec with an allocator.

\n
§Examples
\n
#![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet s = [10, 40, 30];\nlet x = s.to_vec_in(System);\n// Here, `s` and `x` can be modified independently.
1.0.0 · Source

pub fn into_vec<A>(self: Box<[T], A>) -> Vec<T, A>
where\n A: Allocator,

Converts self into a vector without clones or allocation.

\n

The resulting vector can be converted back into a box via\nVec<T>’s into_boxed_slice method.

\n
§Examples
\n
let s: Box<[i32]> = Box::new([10, 40, 30]);\nlet x = s.into_vec();\n// `s` cannot be used anymore because it has been converted into `x`.\n\nassert_eq!(x, vec![10, 40, 30]);
1.40.0 · Source

pub fn repeat(&self, n: usize) -> Vec<T>
where\n T: Copy,

Creates a vector by copying a slice n times.

\n
§Panics
\n

This function will panic if the capacity would overflow.

\n
§Examples
\n
assert_eq!([1, 2].repeat(3), vec![1, 2, 1, 2, 1, 2]);
\n

A panic upon overflow:

\n\n
ⓘ
// this will panic at runtime\nb\"0123456789abcdef\".repeat(usize::MAX);
1.0.0 · Source

pub fn concat<Item>(&self) -> <[T] as Concat<Item>>::Output ⓘ
where\n [T]: Concat<Item>,\n Item: ?Sized,

Flattens a slice of T into a single value Self::Output.

\n
§Examples
\n
assert_eq!([\"hello\", \"world\"].concat(), \"helloworld\");\nassert_eq!([[1, 2], [3, 4]].concat(), [1, 2, 3, 4]);
1.3.0 · Source

pub fn join<Separator>(\n &self,\n sep: Separator,\n) -> <[T] as Join<Separator>>::Output ⓘ
where\n [T]: Join<Separator>,

Flattens a slice of T into a single value Self::Output, placing a\ngiven separator between each.

\n
§Examples
\n
assert_eq!([\"hello\", \"world\"].join(\" \"), \"hello world\");\nassert_eq!([[1, 2], [3, 4]].join(&0), [1, 2, 0, 3, 4]);\nassert_eq!([[1, 2], [3, 4]].join(&[0, 0][..]), [1, 2, 0, 0, 3, 4]);
1.0.0 · Source

pub fn connect<Separator>(\n &self,\n sep: Separator,\n) -> <[T] as Join<Separator>>::Output ⓘ
where\n [T]: Join<Separator>,

👎Deprecated since 1.3.0:

renamed to join

\n

Flattens a slice of T into a single value Self::Output, placing a\ngiven separator between each.

\n
§Examples
\n
assert_eq!([\"hello\", \"world\"].connect(\" \"), \"hello world\");\nassert_eq!([[1, 2], [3, 4]].connect(&0), [1, 2, 0, 3, 4]);
",0,"promql::range_eval::histogram::Histograms"],["
Source§

impl<T> [T]

1.0.0 (const: 1.39.0) · Source

pub const fn len(&self) -> usize

Returns the number of elements in the slice.

\n
§Examples
\n
let a = [1, 2, 3];\nassert_eq!(a.len(), 3);
1.0.0 (const: 1.39.0) · Source

pub const fn is_empty(&self) -> bool

Returns true if the slice has a length of 0.

\n
§Examples
\n
let a = [1, 2, 3];\nassert!(!a.is_empty());\n\nlet b: &[i32] = &[];\nassert!(b.is_empty());
1.0.0 (const: 1.56.0) · Source

pub const fn first(&self) -> Option<&T>

Returns the first element of the slice, or None if it is empty.

\n
§Examples
\n
let v = [10, 40, 30];\nassert_eq!(Some(&10), v.first());\n\nlet w: &[i32] = &[];\nassert_eq!(None, w.first());
1.0.0 (const: 1.83.0) · Source

pub const fn first_mut(&mut self) -> Option<&mut T>

Returns a mutable reference to the first element of the slice, or None if it is empty.

\n
§Examples
\n
let x = &mut [0, 1, 2];\n\nif let Some(first) = x.first_mut() {\n    *first = 5;\n}\nassert_eq!(x, &[5, 1, 2]);\n\nlet y: &mut [i32] = &mut [];\nassert_eq!(None, y.first_mut());
1.5.0 (const: 1.56.0) · Source

pub const fn split_first(&self) -> Option<(&T, &[T])>

Returns the first and all the rest of the elements of the slice, or None if it is empty.

\n
§Examples
\n
let x = &[0, 1, 2];\n\nif let Some((first, elements)) = x.split_first() {\n    assert_eq!(first, &0);\n    assert_eq!(elements, &[1, 2]);\n}
1.5.0 (const: 1.83.0) · Source

pub const fn split_first_mut(&mut self) -> Option<(&mut T, &mut [T])>

Returns the first and all the rest of the elements of the slice, or None if it is empty.

\n
§Examples
\n
let x = &mut [0, 1, 2];\n\nif let Some((first, elements)) = x.split_first_mut() {\n    *first = 3;\n    elements[0] = 4;\n    elements[1] = 5;\n}\nassert_eq!(x, &[3, 4, 5]);
1.5.0 (const: 1.56.0) · Source

pub const fn split_last(&self) -> Option<(&T, &[T])>

Returns the last and all the rest of the elements of the slice, or None if it is empty.

\n
§Examples
\n
let x = &[0, 1, 2];\n\nif let Some((last, elements)) = x.split_last() {\n    assert_eq!(last, &2);\n    assert_eq!(elements, &[0, 1]);\n}
1.5.0 (const: 1.83.0) · Source

pub const fn split_last_mut(&mut self) -> Option<(&mut T, &mut [T])>

Returns the last and all the rest of the elements of the slice, or None if it is empty.

\n
§Examples
\n
let x = &mut [0, 1, 2];\n\nif let Some((last, elements)) = x.split_last_mut() {\n    *last = 3;\n    elements[0] = 4;\n    elements[1] = 5;\n}\nassert_eq!(x, &[4, 5, 3]);
1.0.0 (const: 1.56.0) · Source

pub const fn last(&self) -> Option<&T>

Returns the last element of the slice, or None if it is empty.

\n
§Examples
\n
let v = [10, 40, 30];\nassert_eq!(Some(&30), v.last());\n\nlet w: &[i32] = &[];\nassert_eq!(None, w.last());
1.0.0 (const: 1.83.0) · Source

pub const fn last_mut(&mut self) -> Option<&mut T>

Returns a mutable reference to the last item in the slice, or None if it is empty.

\n
§Examples
\n
let x = &mut [0, 1, 2];\n\nif let Some(last) = x.last_mut() {\n    *last = 10;\n}\nassert_eq!(x, &[0, 1, 10]);\n\nlet y: &mut [i32] = &mut [];\nassert_eq!(None, y.last_mut());
1.77.0 (const: 1.77.0) · Source

pub const fn first_chunk<const N: usize>(&self) -> Option<&[T; N]>

Returns an array reference to the first N items in the slice.

\n

If the slice is not at least N in length, this will return None.

\n
§Examples
\n
let u = [10, 40, 30];\nassert_eq!(Some(&[10, 40]), u.first_chunk::<2>());\n\nlet v: &[i32] = &[10];\nassert_eq!(None, v.first_chunk::<2>());\n\nlet w: &[i32] = &[];\nassert_eq!(Some(&[]), w.first_chunk::<0>());
1.77.0 (const: 1.83.0) · Source

pub const fn first_chunk_mut<const N: usize>(&mut self) -> Option<&mut [T; N]>

Returns a mutable array reference to the first N items in the slice.

\n

If the slice is not at least N in length, this will return None.

\n
§Examples
\n
let x = &mut [0, 1, 2];\n\nif let Some(first) = x.first_chunk_mut::<2>() {\n    first[0] = 5;\n    first[1] = 4;\n}\nassert_eq!(x, &[5, 4, 2]);\n\nassert_eq!(None, x.first_chunk_mut::<4>());
1.77.0 (const: 1.77.0) · Source

pub const fn split_first_chunk<const N: usize>(&self) -> Option<(&[T; N], &[T])>

Returns an array reference to the first N items in the slice and the remaining slice.

\n

If the slice is not at least N in length, this will return None.

\n
§Examples
\n
let x = &[0, 1, 2];\n\nif let Some((first, elements)) = x.split_first_chunk::<2>() {\n    assert_eq!(first, &[0, 1]);\n    assert_eq!(elements, &[2]);\n}\n\nassert_eq!(None, x.split_first_chunk::<4>());
1.77.0 (const: 1.83.0) · Source

pub const fn split_first_chunk_mut<const N: usize>(\n &mut self,\n) -> Option<(&mut [T; N], &mut [T])>

Returns a mutable array reference to the first N items in the slice and the remaining\nslice.

\n

If the slice is not at least N in length, this will return None.

\n
§Examples
\n
let x = &mut [0, 1, 2];\n\nif let Some((first, elements)) = x.split_first_chunk_mut::<2>() {\n    first[0] = 3;\n    first[1] = 4;\n    elements[0] = 5;\n}\nassert_eq!(x, &[3, 4, 5]);\n\nassert_eq!(None, x.split_first_chunk_mut::<4>());
1.77.0 (const: 1.77.0) · Source

pub const fn split_last_chunk<const N: usize>(&self) -> Option<(&[T], &[T; N])>

Returns an array reference to the last N items in the slice and the remaining slice.

\n

If the slice is not at least N in length, this will return None.

\n
§Examples
\n
let x = &[0, 1, 2];\n\nif let Some((elements, last)) = x.split_last_chunk::<2>() {\n    assert_eq!(elements, &[0]);\n    assert_eq!(last, &[1, 2]);\n}\n\nassert_eq!(None, x.split_last_chunk::<4>());
1.77.0 (const: 1.83.0) · Source

pub const fn split_last_chunk_mut<const N: usize>(\n &mut self,\n) -> Option<(&mut [T], &mut [T; N])>

Returns a mutable array reference to the last N items in the slice and the remaining\nslice.

\n

If the slice is not at least N in length, this will return None.

\n
§Examples
\n
let x = &mut [0, 1, 2];\n\nif let Some((elements, last)) = x.split_last_chunk_mut::<2>() {\n    last[0] = 3;\n    last[1] = 4;\n    elements[0] = 5;\n}\nassert_eq!(x, &[5, 3, 4]);\n\nassert_eq!(None, x.split_last_chunk_mut::<4>());
1.77.0 (const: 1.80.0) · Source

pub const fn last_chunk<const N: usize>(&self) -> Option<&[T; N]>

Returns an array reference to the last N items in the slice.

\n

If the slice is not at least N in length, this will return None.

\n
§Examples
\n
let u = [10, 40, 30];\nassert_eq!(Some(&[40, 30]), u.last_chunk::<2>());\n\nlet v: &[i32] = &[10];\nassert_eq!(None, v.last_chunk::<2>());\n\nlet w: &[i32] = &[];\nassert_eq!(Some(&[]), w.last_chunk::<0>());
1.77.0 (const: 1.83.0) · Source

pub const fn last_chunk_mut<const N: usize>(&mut self) -> Option<&mut [T; N]>

Returns a mutable array reference to the last N items in the slice.

\n

If the slice is not at least N in length, this will return None.

\n
§Examples
\n
let x = &mut [0, 1, 2];\n\nif let Some(last) = x.last_chunk_mut::<2>() {\n    last[0] = 10;\n    last[1] = 20;\n}\nassert_eq!(x, &[0, 10, 20]);\n\nassert_eq!(None, x.last_chunk_mut::<4>());
1.0.0 (const: unstable) · Source

pub fn get<I>(&self, index: I) -> Option<&<I as SliceIndex<[T]>>::Output>
where\n I: SliceIndex<[T]>,

Returns a reference to an element or subslice depending on the type of\nindex.

\n
    \n
  • If given a position, returns a reference to the element at that\nposition or None if out of bounds.
  • \n
  • If given a range, returns the subslice corresponding to that range,\nor None if out of bounds.
  • \n
\n
§Examples
\n
let v = [10, 40, 30];\nassert_eq!(Some(&40), v.get(1));\nassert_eq!(Some(&[10, 40][..]), v.get(0..2));\nassert_eq!(None, v.get(3));\nassert_eq!(None, v.get(0..4));
1.0.0 (const: unstable) · Source

pub fn get_mut<I>(\n &mut self,\n index: I,\n) -> Option<&mut <I as SliceIndex<[T]>>::Output>
where\n I: SliceIndex<[T]>,

Returns a mutable reference to an element or subslice depending on the\ntype of index (see get) or None if the index is out of bounds.

\n
§Examples
\n
let x = &mut [0, 1, 2];\n\nif let Some(elem) = x.get_mut(1) {\n    *elem = 42;\n}\nassert_eq!(x, &[0, 42, 2]);
1.0.0 (const: unstable) · Source

pub unsafe fn get_unchecked<I>(\n &self,\n index: I,\n) -> &<I as SliceIndex<[T]>>::Output
where\n I: SliceIndex<[T]>,

Returns a reference to an element or subslice, without doing bounds\nchecking.

\n

For a safe alternative see get.

\n
§Safety
\n

Calling this method with an out-of-bounds index is undefined behavior\neven if the resulting reference is not used.

\n

You can think of this like .get(index).unwrap_unchecked(). It’s UB\nto call .get_unchecked(len), even if you immediately convert to a\npointer. And it’s UB to call .get_unchecked(..len + 1),\n.get_unchecked(..=len), or similar.

\n
§Examples
\n
let x = &[1, 2, 4];\n\nunsafe {\n    assert_eq!(x.get_unchecked(1), &2);\n}
1.0.0 (const: unstable) · Source

pub unsafe fn get_unchecked_mut<I>(\n &mut self,\n index: I,\n) -> &mut <I as SliceIndex<[T]>>::Output
where\n I: SliceIndex<[T]>,

Returns a mutable reference to an element or subslice, without doing\nbounds checking.

\n

For a safe alternative see get_mut.

\n
§Safety
\n

Calling this method with an out-of-bounds index is undefined behavior\neven if the resulting reference is not used.

\n

You can think of this like .get_mut(index).unwrap_unchecked(). It’s\nUB to call .get_unchecked_mut(len), even if you immediately convert\nto a pointer. And it’s UB to call .get_unchecked_mut(..len + 1),\n.get_unchecked_mut(..=len), or similar.

\n
§Examples
\n
let x = &mut [1, 2, 4];\n\nunsafe {\n    let elem = x.get_unchecked_mut(1);\n    *elem = 13;\n}\nassert_eq!(x, &[1, 13, 4]);
1.0.0 (const: 1.32.0) · Source

pub const fn as_ptr(&self) -> *const T

Returns a raw pointer to the slice’s buffer.

\n

The caller must ensure that the slice outlives the pointer this\nfunction returns, or else it will end up dangling.

\n

The caller must also ensure that the memory the pointer (non-transitively) points to\nis never written to (except inside an UnsafeCell) using this pointer or any pointer\nderived from it. If you need to mutate the contents of the slice, use as_mut_ptr.

\n

Modifying the container referenced by this slice may cause its buffer\nto be reallocated, which would also make any pointers to it invalid.

\n
§Examples
\n
let x = &[1, 2, 4];\nlet x_ptr = x.as_ptr();\n\nunsafe {\n    for i in 0..x.len() {\n        assert_eq!(x.get_unchecked(i), &*x_ptr.add(i));\n    }\n}
1.0.0 (const: 1.61.0) · Source

pub const fn as_mut_ptr(&mut self) -> *mut T

Returns an unsafe mutable pointer to the slice’s buffer.

\n

The caller must ensure that the slice outlives the pointer this\nfunction returns, or else it will end up dangling.

\n

Modifying the container referenced by this slice may cause its buffer\nto be reallocated, which would also make any pointers to it invalid.

\n
§Examples
\n
let x = &mut [1, 2, 4];\nlet x_ptr = x.as_mut_ptr();\n\nunsafe {\n    for i in 0..x.len() {\n        *x_ptr.add(i) += 2;\n    }\n}\nassert_eq!(x, &[3, 4, 6]);
1.48.0 (const: 1.61.0) · Source

pub const fn as_ptr_range(&self) -> Range<*const T>

Returns the two raw pointers spanning the slice.

\n

The returned range is half-open, which means that the end pointer\npoints one past the last element of the slice. This way, an empty\nslice is represented by two equal pointers, and the difference between\nthe two pointers represents the size of the slice.

\n

See as_ptr for warnings on using these pointers. The end pointer\nrequires extra caution, as it does not point to a valid element in the\nslice.

\n

This function is useful for interacting with foreign interfaces which\nuse two pointers to refer to a range of elements in memory, as is\ncommon in C++.

\n

It can also be useful to check if a pointer to an element refers to an\nelement of this slice:

\n\n
let a = [1, 2, 3];\nlet x = &a[1] as *const _;\nlet y = &5 as *const _;\n\nassert!(a.as_ptr_range().contains(&x));\nassert!(!a.as_ptr_range().contains(&y));
1.48.0 (const: 1.61.0) · Source

pub const fn as_mut_ptr_range(&mut self) -> Range<*mut T>

Returns the two unsafe mutable pointers spanning the slice.

\n

The returned range is half-open, which means that the end pointer\npoints one past the last element of the slice. This way, an empty\nslice is represented by two equal pointers, and the difference between\nthe two pointers represents the size of the slice.

\n

See as_mut_ptr for warnings on using these pointers. The end\npointer requires extra caution, as it does not point to a valid element\nin the slice.

\n

This function is useful for interacting with foreign interfaces which\nuse two pointers to refer to a range of elements in memory, as is\ncommon in C++.

\n
1.93.0 (const: 1.93.0) · Source

pub const fn as_array<const N: usize>(&self) -> Option<&[T; N]>

Gets a reference to the underlying array.

\n

If N is not exactly equal to the length of self, then this method returns None.

\n
1.93.0 (const: 1.93.0) · Source

pub const fn as_mut_array<const N: usize>(&mut self) -> Option<&mut [T; N]>

Gets a mutable reference to the slice’s underlying array.

\n

If N is not exactly equal to the length of self, then this method returns None.

\n
1.0.0 (const: 1.85.0) · Source

pub const fn swap(&mut self, a: usize, b: usize)

Swaps two elements in the slice.

\n

If a equals to b, it’s guaranteed that elements won’t change value.

\n
§Arguments
\n
    \n
  • a - The index of the first element
  • \n
  • b - The index of the second element
  • \n
\n
§Panics
\n

Panics if a or b are out of bounds.

\n
§Examples
\n
let mut v = [\"a\", \"b\", \"c\", \"d\", \"e\"];\nv.swap(2, 4);\nassert!(v == [\"a\", \"b\", \"e\", \"d\", \"c\"]);
Source

pub const unsafe fn swap_unchecked(&mut self, a: usize, b: usize)

🔬This is a nightly-only experimental API. (slice_swap_unchecked)

Swaps two elements in the slice, without doing bounds checking.

\n

For a safe alternative see swap.

\n
§Arguments
\n
    \n
  • a - The index of the first element
  • \n
  • b - The index of the second element
  • \n
\n
§Safety
\n

Calling this method with an out-of-bounds index is undefined behavior.\nThe caller has to ensure that a < self.len() and b < self.len().

\n
§Examples
\n
#![feature(slice_swap_unchecked)]\n\nlet mut v = [\"a\", \"b\", \"c\", \"d\"];\n// SAFETY: we know that 1 and 3 are both indices of the slice\nunsafe { v.swap_unchecked(1, 3) };\nassert!(v == [\"a\", \"d\", \"c\", \"b\"]);
1.0.0 (const: 1.90.0) · Source

pub const fn reverse(&mut self)

Reverses the order of elements in the slice, in place.

\n
§Examples
\n
let mut v = [1, 2, 3];\nv.reverse();\nassert!(v == [3, 2, 1]);
1.0.0 (const: unstable) · Source

pub fn iter(&self) -> Iter<'_, T>

Returns an iterator over the slice.

\n

The iterator yields all items from start to end.

\n
§Examples
\n
let x = &[1, 2, 4];\nlet mut iterator = x.iter();\n\nassert_eq!(iterator.next(), Some(&1));\nassert_eq!(iterator.next(), Some(&2));\nassert_eq!(iterator.next(), Some(&4));\nassert_eq!(iterator.next(), None);
1.0.0 (const: unstable) · Source

pub fn iter_mut(&mut self) -> IterMut<'_, T>

Returns an iterator that allows modifying each value.

\n

The iterator yields all items from start to end.

\n
§Examples
\n
let x = &mut [1, 2, 4];\nfor elem in x.iter_mut() {\n    *elem += 2;\n}\nassert_eq!(x, &[3, 4, 6]);
1.0.0 (const: unstable) · Source

pub fn windows(&self, size: usize) -> Windows<'_, T>

Returns an iterator over all contiguous windows of length\nsize. The windows overlap. If the slice is shorter than\nsize, the iterator returns no values.

\n
§Panics
\n

Panics if size is zero.

\n
§Examples
\n
let slice = ['l', 'o', 'r', 'e', 'm'];\nlet mut iter = slice.windows(3);\nassert_eq!(iter.next().unwrap(), &['l', 'o', 'r']);\nassert_eq!(iter.next().unwrap(), &['o', 'r', 'e']);\nassert_eq!(iter.next().unwrap(), &['r', 'e', 'm']);\nassert!(iter.next().is_none());
\n

If the slice is shorter than size:

\n\n
let slice = ['f', 'o', 'o'];\nlet mut iter = slice.windows(4);\nassert!(iter.next().is_none());
\n

Because the Iterator trait cannot represent the required lifetimes,\nthere is no windows_mut analog to windows;\n[0,1,2].windows_mut(2).collect() would violate the rules of references\n(though a LendingIterator analog is possible). You can sometimes use\nCell::as_slice_of_cells in\nconjunction with windows instead:

\n\n
use std::cell::Cell;\n\nlet mut array = ['R', 'u', 's', 't', ' ', '2', '0', '1', '5'];\nlet slice = &mut array[..];\nlet slice_of_cells: &[Cell<char>] = Cell::from_mut(slice).as_slice_of_cells();\nfor w in slice_of_cells.windows(3) {\n    Cell::swap(&w[0], &w[2]);\n}\nassert_eq!(array, ['s', 't', ' ', '2', '0', '1', '5', 'u', 'R']);
1.0.0 (const: unstable) · Source

pub fn chunks(&self, chunk_size: usize) -> Chunks<'_, T>

Returns an iterator over chunk_size elements of the slice at a time, starting at the\nbeginning of the slice.

\n

The chunks are slices and do not overlap. If chunk_size does not divide the length of the\nslice, then the last chunk will not have length chunk_size.

\n

See chunks_exact for a variant of this iterator that returns chunks of always exactly\nchunk_size elements, and rchunks for the same iterator but starting at the end of the\nslice.

\n

If your chunk_size is a constant, consider using as_chunks instead, which will\ngive references to arrays of exactly that length, rather than slices.

\n
§Panics
\n

Panics if chunk_size is zero.

\n
§Examples
\n
let slice = ['l', 'o', 'r', 'e', 'm'];\nlet mut iter = slice.chunks(2);\nassert_eq!(iter.next().unwrap(), &['l', 'o']);\nassert_eq!(iter.next().unwrap(), &['r', 'e']);\nassert_eq!(iter.next().unwrap(), &['m']);\nassert!(iter.next().is_none());
1.0.0 (const: unstable) · Source

pub fn chunks_mut(&mut self, chunk_size: usize) -> ChunksMut<'_, T>

Returns an iterator over chunk_size elements of the slice at a time, starting at the\nbeginning of the slice.

\n

The chunks are mutable slices, and do not overlap. If chunk_size does not divide the\nlength of the slice, then the last chunk will not have length chunk_size.

\n

See chunks_exact_mut for a variant of this iterator that returns chunks of always\nexactly chunk_size elements, and rchunks_mut for the same iterator but starting at\nthe end of the slice.

\n

If your chunk_size is a constant, consider using as_chunks_mut instead, which will\ngive references to arrays of exactly that length, rather than slices.

\n
§Panics
\n

Panics if chunk_size is zero.

\n
§Examples
\n
let v = &mut [0, 0, 0, 0, 0];\nlet mut count = 1;\n\nfor chunk in v.chunks_mut(2) {\n    for elem in chunk.iter_mut() {\n        *elem += count;\n    }\n    count += 1;\n}\nassert_eq!(v, &[1, 1, 2, 2, 3]);
1.31.0 (const: unstable) · Source

pub fn chunks_exact(&self, chunk_size: usize) -> ChunksExact<'_, T>

Returns an iterator over chunk_size elements of the slice at a time, starting at the\nbeginning of the slice.

\n

The chunks are slices and do not overlap. If chunk_size does not divide the length of the\nslice, then the last up to chunk_size-1 elements will be omitted and can be retrieved\nfrom the remainder function of the iterator.

\n

Due to each chunk having exactly chunk_size elements, the compiler can often optimize the\nresulting code better than in the case of chunks.

\n

See chunks for a variant of this iterator that also returns the remainder as a smaller\nchunk, and rchunks_exact for the same iterator but starting at the end of the slice.

\n

If your chunk_size is a constant, consider using as_chunks instead, which will\ngive references to arrays of exactly that length, rather than slices.

\n
§Panics
\n

Panics if chunk_size is zero.

\n
§Examples
\n
let slice = ['l', 'o', 'r', 'e', 'm'];\nlet mut iter = slice.chunks_exact(2);\nassert_eq!(iter.next().unwrap(), &['l', 'o']);\nassert_eq!(iter.next().unwrap(), &['r', 'e']);\nassert!(iter.next().is_none());\nassert_eq!(iter.remainder(), &['m']);
1.31.0 (const: unstable) · Source

pub fn chunks_exact_mut(&mut self, chunk_size: usize) -> ChunksExactMut<'_, T>

Returns an iterator over chunk_size elements of the slice at a time, starting at the\nbeginning of the slice.

\n

The chunks are mutable slices, and do not overlap. If chunk_size does not divide the\nlength of the slice, then the last up to chunk_size-1 elements will be omitted and can be\nretrieved from the into_remainder function of the iterator.

\n

Due to each chunk having exactly chunk_size elements, the compiler can often optimize the\nresulting code better than in the case of chunks_mut.

\n

See chunks_mut for a variant of this iterator that also returns the remainder as a\nsmaller chunk, and rchunks_exact_mut for the same iterator but starting at the end of\nthe slice.

\n

If your chunk_size is a constant, consider using as_chunks_mut instead, which will\ngive references to arrays of exactly that length, rather than slices.

\n
§Panics
\n

Panics if chunk_size is zero.

\n
§Examples
\n
let v = &mut [0, 0, 0, 0, 0];\nlet mut count = 1;\n\nfor chunk in v.chunks_exact_mut(2) {\n    for elem in chunk.iter_mut() {\n        *elem += count;\n    }\n    count += 1;\n}\nassert_eq!(v, &[1, 1, 2, 2, 0]);
1.88.0 (const: 1.88.0) · Source

pub const unsafe fn as_chunks_unchecked<const N: usize>(&self) -> &[[T; N]]

Splits the slice into a slice of N-element arrays,\nassuming that there’s no remainder.

\n

This is the inverse operation to as_flattened.

\n

As this is unsafe, consider whether you could use as_chunks or\nas_rchunks instead, perhaps via something like\nif let (chunks, []) = slice.as_chunks() or\nlet (chunks, []) = slice.as_chunks() else { unreachable!() };.

\n
§Safety
\n

This may only be called when

\n
    \n
  • The slice splits exactly into N-element chunks (aka self.len() % N == 0).
  • \n
  • N != 0.
  • \n
\n
§Examples
\n
let slice: &[char] = &['l', 'o', 'r', 'e', 'm', '!'];\nlet chunks: &[[char; 1]] =\n    // SAFETY: 1-element chunks never have remainder\n    unsafe { slice.as_chunks_unchecked() };\nassert_eq!(chunks, &[['l'], ['o'], ['r'], ['e'], ['m'], ['!']]);\nlet chunks: &[[char; 3]] =\n    // SAFETY: The slice length (6) is a multiple of 3\n    unsafe { slice.as_chunks_unchecked() };\nassert_eq!(chunks, &[['l', 'o', 'r'], ['e', 'm', '!']]);\n\n// These would be unsound:\n// let chunks: &[[_; 5]] = slice.as_chunks_unchecked() // The slice length is not a multiple of 5\n// let chunks: &[[_; 0]] = slice.as_chunks_unchecked() // Zero-length chunks are never allowed
1.88.0 (const: 1.88.0) · Source

pub const fn as_chunks<const N: usize>(&self) -> (&[[T; N]], &[T])

Splits the slice into a slice of N-element arrays,\nstarting at the beginning of the slice,\nand a remainder slice with length strictly less than N.

\n

The remainder is meaningful in the division sense. Given\nlet (chunks, remainder) = slice.as_chunks(), then:

\n
    \n
  • chunks.len() equals slice.len() / N,
  • \n
  • remainder.len() equals slice.len() % N, and
  • \n
  • slice.len() equals chunks.len() * N + remainder.len().
  • \n
\n

You can flatten the chunks back into a slice-of-T with as_flattened.

\n
§Panics
\n

Panics if N is zero.

\n

Note that this check is against a const generic parameter, not a runtime\nvalue, and thus a particular monomorphization will either always panic\nor it will never panic.

\n
§Examples
\n
let slice = ['l', 'o', 'r', 'e', 'm'];\nlet (chunks, remainder) = slice.as_chunks();\nassert_eq!(chunks, &[['l', 'o'], ['r', 'e']]);\nassert_eq!(remainder, &['m']);
\n

If you expect the slice to be an exact multiple, you can combine\nlet-else with an empty slice pattern:

\n\n
let slice = ['R', 'u', 's', 't'];\nlet (chunks, []) = slice.as_chunks::<2>() else {\n    panic!(\"slice didn't have even length\")\n};\nassert_eq!(chunks, &[['R', 'u'], ['s', 't']]);
1.88.0 (const: 1.88.0) · Source

pub const fn as_rchunks<const N: usize>(&self) -> (&[T], &[[T; N]])

Splits the slice into a slice of N-element arrays,\nstarting at the end of the slice,\nand a remainder slice with length strictly less than N.

\n

The remainder is meaningful in the division sense. Given\nlet (remainder, chunks) = slice.as_rchunks(), then:

\n
    \n
  • remainder.len() equals slice.len() % N,
  • \n
  • chunks.len() equals slice.len() / N, and
  • \n
  • slice.len() equals chunks.len() * N + remainder.len().
  • \n
\n

You can flatten the chunks back into a slice-of-T with as_flattened.

\n
§Panics
\n

Panics if N is zero.

\n

Note that this check is against a const generic parameter, not a runtime\nvalue, and thus a particular monomorphization will either always panic\nor it will never panic.

\n
§Examples
\n
let slice = ['l', 'o', 'r', 'e', 'm'];\nlet (remainder, chunks) = slice.as_rchunks();\nassert_eq!(remainder, &['l']);\nassert_eq!(chunks, &[['o', 'r'], ['e', 'm']]);
1.88.0 (const: 1.88.0) · Source

pub const unsafe fn as_chunks_unchecked_mut<const N: usize>(\n &mut self,\n) -> &mut [[T; N]]

Splits the slice into a slice of N-element arrays,\nassuming that there’s no remainder.

\n

This is the inverse operation to as_flattened_mut.

\n

As this is unsafe, consider whether you could use as_chunks_mut or\nas_rchunks_mut instead, perhaps via something like\nif let (chunks, []) = slice.as_chunks_mut() or\nlet (chunks, []) = slice.as_chunks_mut() else { unreachable!() };.

\n
§Safety
\n

This may only be called when

\n
    \n
  • The slice splits exactly into N-element chunks (aka self.len() % N == 0).
  • \n
  • N != 0.
  • \n
\n
§Examples
\n
let slice: &mut [char] = &mut ['l', 'o', 'r', 'e', 'm', '!'];\nlet chunks: &mut [[char; 1]] =\n    // SAFETY: 1-element chunks never have remainder\n    unsafe { slice.as_chunks_unchecked_mut() };\nchunks[0] = ['L'];\nassert_eq!(chunks, &[['L'], ['o'], ['r'], ['e'], ['m'], ['!']]);\nlet chunks: &mut [[char; 3]] =\n    // SAFETY: The slice length (6) is a multiple of 3\n    unsafe { slice.as_chunks_unchecked_mut() };\nchunks[1] = ['a', 'x', '?'];\nassert_eq!(slice, &['L', 'o', 'r', 'a', 'x', '?']);\n\n// These would be unsound:\n// let chunks: &[[_; 5]] = slice.as_chunks_unchecked_mut() // The slice length is not a multiple of 5\n// let chunks: &[[_; 0]] = slice.as_chunks_unchecked_mut() // Zero-length chunks are never allowed
1.88.0 (const: 1.88.0) · Source

pub const fn as_chunks_mut<const N: usize>(\n &mut self,\n) -> (&mut [[T; N]], &mut [T])

Splits the slice into a slice of N-element arrays,\nstarting at the beginning of the slice,\nand a remainder slice with length strictly less than N.

\n

The remainder is meaningful in the division sense. Given\nlet (chunks, remainder) = slice.as_chunks_mut(), then:

\n
    \n
  • chunks.len() equals slice.len() / N,
  • \n
  • remainder.len() equals slice.len() % N, and
  • \n
  • slice.len() equals chunks.len() * N + remainder.len().
  • \n
\n

You can flatten the chunks back into a slice-of-T with as_flattened_mut.

\n
§Panics
\n

Panics if N is zero.

\n

Note that this check is against a const generic parameter, not a runtime\nvalue, and thus a particular monomorphization will either always panic\nor it will never panic.

\n
§Examples
\n
let v = &mut [0, 0, 0, 0, 0];\nlet mut count = 1;\n\nlet (chunks, remainder) = v.as_chunks_mut();\nremainder[0] = 9;\nfor chunk in chunks {\n    *chunk = [count; 2];\n    count += 1;\n}\nassert_eq!(v, &[1, 1, 2, 2, 9]);
1.88.0 (const: 1.88.0) · Source

pub const fn as_rchunks_mut<const N: usize>(\n &mut self,\n) -> (&mut [T], &mut [[T; N]])

Splits the slice into a slice of N-element arrays,\nstarting at the end of the slice,\nand a remainder slice with length strictly less than N.

\n

The remainder is meaningful in the division sense. Given\nlet (remainder, chunks) = slice.as_rchunks_mut(), then:

\n
    \n
  • remainder.len() equals slice.len() % N,
  • \n
  • chunks.len() equals slice.len() / N, and
  • \n
  • slice.len() equals chunks.len() * N + remainder.len().
  • \n
\n

You can flatten the chunks back into a slice-of-T with as_flattened_mut.

\n
§Panics
\n

Panics if N is zero.

\n

Note that this check is against a const generic parameter, not a runtime\nvalue, and thus a particular monomorphization will either always panic\nor it will never panic.

\n
§Examples
\n
let v = &mut [0, 0, 0, 0, 0];\nlet mut count = 1;\n\nlet (remainder, chunks) = v.as_rchunks_mut();\nremainder[0] = 9;\nfor chunk in chunks {\n    *chunk = [count; 2];\n    count += 1;\n}\nassert_eq!(v, &[9, 1, 1, 2, 2]);
1.94.0 (const: unstable) · Source

pub fn array_windows<const N: usize>(&self) -> ArrayWindows<'_, T, N>

Returns an iterator over overlapping windows of N elements of a slice,\nstarting at the beginning of the slice.

\n

This is the const generic equivalent of windows.

\n

If N is greater than the size of the slice, it will return no windows.

\n
§Panics
\n

Panics if N is zero.

\n

Note that this check is against a const generic parameter, not a runtime\nvalue, and thus a particular monomorphization will either always panic\nor it will never panic.

\n
§Examples
\n
let slice = [0, 1, 2, 3];\nlet mut iter = slice.array_windows();\nassert_eq!(iter.next().unwrap(), &[0, 1]);\nassert_eq!(iter.next().unwrap(), &[1, 2]);\nassert_eq!(iter.next().unwrap(), &[2, 3]);\nassert!(iter.next().is_none());
1.31.0 (const: unstable) · Source

pub fn rchunks(&self, chunk_size: usize) -> RChunks<'_, T>

Returns an iterator over chunk_size elements of the slice at a time, starting at the end\nof the slice.

\n

The chunks are slices and do not overlap. If chunk_size does not divide the length of the\nslice, then the last chunk will not have length chunk_size.

\n

See rchunks_exact for a variant of this iterator that returns chunks of always exactly\nchunk_size elements, and chunks for the same iterator but starting at the beginning\nof the slice.

\n

If your chunk_size is a constant, consider using as_rchunks instead, which will\ngive references to arrays of exactly that length, rather than slices.

\n
§Panics
\n

Panics if chunk_size is zero.

\n
§Examples
\n
let slice = ['l', 'o', 'r', 'e', 'm'];\nlet mut iter = slice.rchunks(2);\nassert_eq!(iter.next().unwrap(), &['e', 'm']);\nassert_eq!(iter.next().unwrap(), &['o', 'r']);\nassert_eq!(iter.next().unwrap(), &['l']);\nassert!(iter.next().is_none());
1.31.0 (const: unstable) · Source

pub fn rchunks_mut(&mut self, chunk_size: usize) -> RChunksMut<'_, T>

Returns an iterator over chunk_size elements of the slice at a time, starting at the end\nof the slice.

\n

The chunks are mutable slices, and do not overlap. If chunk_size does not divide the\nlength of the slice, then the last chunk will not have length chunk_size.

\n

See rchunks_exact_mut for a variant of this iterator that returns chunks of always\nexactly chunk_size elements, and chunks_mut for the same iterator but starting at the\nbeginning of the slice.

\n

If your chunk_size is a constant, consider using as_rchunks_mut instead, which will\ngive references to arrays of exactly that length, rather than slices.

\n
§Panics
\n

Panics if chunk_size is zero.

\n
§Examples
\n
let v = &mut [0, 0, 0, 0, 0];\nlet mut count = 1;\n\nfor chunk in v.rchunks_mut(2) {\n    for elem in chunk.iter_mut() {\n        *elem += count;\n    }\n    count += 1;\n}\nassert_eq!(v, &[3, 2, 2, 1, 1]);
1.31.0 (const: unstable) · Source

pub fn rchunks_exact(&self, chunk_size: usize) -> RChunksExact<'_, T>

Returns an iterator over chunk_size elements of the slice at a time, starting at the\nend of the slice.

\n

The chunks are slices and do not overlap. If chunk_size does not divide the length of the\nslice, then the last up to chunk_size-1 elements will be omitted and can be retrieved\nfrom the remainder function of the iterator.

\n

Due to each chunk having exactly chunk_size elements, the compiler can often optimize the\nresulting code better than in the case of rchunks.

\n

See rchunks for a variant of this iterator that also returns the remainder as a smaller\nchunk, and chunks_exact for the same iterator but starting at the beginning of the\nslice.

\n

If your chunk_size is a constant, consider using as_rchunks instead, which will\ngive references to arrays of exactly that length, rather than slices.

\n
§Panics
\n

Panics if chunk_size is zero.

\n
§Examples
\n
let slice = ['l', 'o', 'r', 'e', 'm'];\nlet mut iter = slice.rchunks_exact(2);\nassert_eq!(iter.next().unwrap(), &['e', 'm']);\nassert_eq!(iter.next().unwrap(), &['o', 'r']);\nassert!(iter.next().is_none());\nassert_eq!(iter.remainder(), &['l']);
1.31.0 (const: unstable) · Source

pub fn rchunks_exact_mut(&mut self, chunk_size: usize) -> RChunksExactMut<'_, T>

Returns an iterator over chunk_size elements of the slice at a time, starting at the end\nof the slice.

\n

The chunks are mutable slices, and do not overlap. If chunk_size does not divide the\nlength of the slice, then the last up to chunk_size-1 elements will be omitted and can be\nretrieved from the into_remainder function of the iterator.

\n

Due to each chunk having exactly chunk_size elements, the compiler can often optimize the\nresulting code better than in the case of chunks_mut.

\n

See rchunks_mut for a variant of this iterator that also returns the remainder as a\nsmaller chunk, and chunks_exact_mut for the same iterator but starting at the beginning\nof the slice.

\n

If your chunk_size is a constant, consider using as_rchunks_mut instead, which will\ngive references to arrays of exactly that length, rather than slices.

\n
§Panics
\n

Panics if chunk_size is zero.

\n
§Examples
\n
let v = &mut [0, 0, 0, 0, 0];\nlet mut count = 1;\n\nfor chunk in v.rchunks_exact_mut(2) {\n    for elem in chunk.iter_mut() {\n        *elem += count;\n    }\n    count += 1;\n}\nassert_eq!(v, &[0, 2, 2, 1, 1]);
1.77.0 (const: unstable) · Source

pub fn chunk_by<F>(&self, pred: F) -> ChunkBy<'_, T, F>
where\n F: FnMut(&T, &T) -> bool,

Returns an iterator over the slice producing non-overlapping runs\nof elements using the predicate to separate them.

\n

The predicate is called for every pair of consecutive elements,\nmeaning that it is called on slice[0] and slice[1],\nfollowed by slice[1] and slice[2], and so on.

\n
§Examples
\n
let slice = &[1, 1, 1, 3, 3, 2, 2, 2];\n\nlet mut iter = slice.chunk_by(|a, b| a == b);\n\nassert_eq!(iter.next(), Some(&[1, 1, 1][..]));\nassert_eq!(iter.next(), Some(&[3, 3][..]));\nassert_eq!(iter.next(), Some(&[2, 2, 2][..]));\nassert_eq!(iter.next(), None);
\n

This method can be used to extract the sorted subslices:

\n\n
let slice = &[1, 1, 2, 3, 2, 3, 2, 3, 4];\n\nlet mut iter = slice.chunk_by(|a, b| a <= b);\n\nassert_eq!(iter.next(), Some(&[1, 1, 2, 3][..]));\nassert_eq!(iter.next(), Some(&[2, 3][..]));\nassert_eq!(iter.next(), Some(&[2, 3, 4][..]));\nassert_eq!(iter.next(), None);
1.77.0 (const: unstable) · Source

pub fn chunk_by_mut<F>(&mut self, pred: F) -> ChunkByMut<'_, T, F>
where\n F: FnMut(&T, &T) -> bool,

Returns an iterator over the slice producing non-overlapping mutable\nruns of elements using the predicate to separate them.

\n

The predicate is called for every pair of consecutive elements,\nmeaning that it is called on slice[0] and slice[1],\nfollowed by slice[1] and slice[2], and so on.

\n
§Examples
\n
let slice = &mut [1, 1, 1, 3, 3, 2, 2, 2];\n\nlet mut iter = slice.chunk_by_mut(|a, b| a == b);\n\nassert_eq!(iter.next(), Some(&mut [1, 1, 1][..]));\nassert_eq!(iter.next(), Some(&mut [3, 3][..]));\nassert_eq!(iter.next(), Some(&mut [2, 2, 2][..]));\nassert_eq!(iter.next(), None);
\n

This method can be used to extract the sorted subslices:

\n\n
let slice = &mut [1, 1, 2, 3, 2, 3, 2, 3, 4];\n\nlet mut iter = slice.chunk_by_mut(|a, b| a <= b);\n\nassert_eq!(iter.next(), Some(&mut [1, 1, 2, 3][..]));\nassert_eq!(iter.next(), Some(&mut [2, 3][..]));\nassert_eq!(iter.next(), Some(&mut [2, 3, 4][..]));\nassert_eq!(iter.next(), None);
1.0.0 (const: 1.71.0) · Source

pub const fn split_at(&self, mid: usize) -> (&[T], &[T])

Divides one slice into two at an index.

\n

The first will contain all indices from [0, mid) (excluding\nthe index mid itself) and the second will contain all\nindices from [mid, len) (excluding the index len itself).

\n
§Panics
\n

Panics if mid > len. For a non-panicking alternative see\nsplit_at_checked.

\n
§Examples
\n
let v = ['a', 'b', 'c'];\n\n{\n   let (left, right) = v.split_at(0);\n   assert_eq!(left, []);\n   assert_eq!(right, ['a', 'b', 'c']);\n}\n\n{\n    let (left, right) = v.split_at(2);\n    assert_eq!(left, ['a', 'b']);\n    assert_eq!(right, ['c']);\n}\n\n{\n    let (left, right) = v.split_at(3);\n    assert_eq!(left, ['a', 'b', 'c']);\n    assert_eq!(right, []);\n}
1.0.0 (const: 1.83.0) · Source

pub const fn split_at_mut(&mut self, mid: usize) -> (&mut [T], &mut [T])

Divides one mutable slice into two at an index.

\n

The first will contain all indices from [0, mid) (excluding\nthe index mid itself) and the second will contain all\nindices from [mid, len) (excluding the index len itself).

\n
§Panics
\n

Panics if mid > len. For a non-panicking alternative see\nsplit_at_mut_checked.

\n
§Examples
\n
let mut v = [1, 0, 3, 0, 5, 6];\nlet (left, right) = v.split_at_mut(2);\nassert_eq!(left, [1, 0]);\nassert_eq!(right, [3, 0, 5, 6]);\nleft[1] = 2;\nright[1] = 4;\nassert_eq!(v, [1, 2, 3, 4, 5, 6]);
1.79.0 (const: 1.77.0) · Source

pub const unsafe fn split_at_unchecked(&self, mid: usize) -> (&[T], &[T])

Divides one slice into two at an index, without doing bounds checking.

\n

The first will contain all indices from [0, mid) (excluding\nthe index mid itself) and the second will contain all\nindices from [mid, len) (excluding the index len itself).

\n

For a safe alternative see split_at.

\n
§Safety
\n

Calling this method with an out-of-bounds index is undefined behavior\neven if the resulting reference is not used. The caller has to ensure that\n0 <= mid <= self.len().

\n
§Examples
\n
let v = ['a', 'b', 'c'];\n\nunsafe {\n   let (left, right) = v.split_at_unchecked(0);\n   assert_eq!(left, []);\n   assert_eq!(right, ['a', 'b', 'c']);\n}\n\nunsafe {\n    let (left, right) = v.split_at_unchecked(2);\n    assert_eq!(left, ['a', 'b']);\n    assert_eq!(right, ['c']);\n}\n\nunsafe {\n    let (left, right) = v.split_at_unchecked(3);\n    assert_eq!(left, ['a', 'b', 'c']);\n    assert_eq!(right, []);\n}
1.79.0 (const: 1.83.0) · Source

pub const unsafe fn split_at_mut_unchecked(\n &mut self,\n mid: usize,\n) -> (&mut [T], &mut [T])

Divides one mutable slice into two at an index, without doing bounds checking.

\n

The first will contain all indices from [0, mid) (excluding\nthe index mid itself) and the second will contain all\nindices from [mid, len) (excluding the index len itself).

\n

For a safe alternative see split_at_mut.

\n
§Safety
\n

Calling this method with an out-of-bounds index is undefined behavior\neven if the resulting reference is not used. The caller has to ensure that\n0 <= mid <= self.len().

\n
§Examples
\n
let mut v = [1, 0, 3, 0, 5, 6];\n// scoped to restrict the lifetime of the borrows\nunsafe {\n    let (left, right) = v.split_at_mut_unchecked(2);\n    assert_eq!(left, [1, 0]);\n    assert_eq!(right, [3, 0, 5, 6]);\n    left[1] = 2;\n    right[1] = 4;\n}\nassert_eq!(v, [1, 2, 3, 4, 5, 6]);
1.80.0 (const: 1.80.0) · Source

pub const fn split_at_checked(&self, mid: usize) -> Option<(&[T], &[T])>

Divides one slice into two at an index, returning None if the slice is\ntoo short.

\n

If mid ≤ len returns a pair of slices where the first will contain all\nindices from [0, mid) (excluding the index mid itself) and the\nsecond will contain all indices from [mid, len) (excluding the index\nlen itself).

\n

Otherwise, if mid > len, returns None.

\n
§Examples
\n
let v = [1, -2, 3, -4, 5, -6];\n\n{\n   let (left, right) = v.split_at_checked(0).unwrap();\n   assert_eq!(left, []);\n   assert_eq!(right, [1, -2, 3, -4, 5, -6]);\n}\n\n{\n    let (left, right) = v.split_at_checked(2).unwrap();\n    assert_eq!(left, [1, -2]);\n    assert_eq!(right, [3, -4, 5, -6]);\n}\n\n{\n    let (left, right) = v.split_at_checked(6).unwrap();\n    assert_eq!(left, [1, -2, 3, -4, 5, -6]);\n    assert_eq!(right, []);\n}\n\nassert_eq!(None, v.split_at_checked(7));
1.80.0 (const: 1.83.0) · Source

pub const fn split_at_mut_checked(\n &mut self,\n mid: usize,\n) -> Option<(&mut [T], &mut [T])>

Divides one mutable slice into two at an index, returning None if the\nslice is too short.

\n

If mid ≤ len returns a pair of slices where the first will contain all\nindices from [0, mid) (excluding the index mid itself) and the\nsecond will contain all indices from [mid, len) (excluding the index\nlen itself).

\n

Otherwise, if mid > len, returns None.

\n
§Examples
\n
let mut v = [1, 0, 3, 0, 5, 6];\n\nif let Some((left, right)) = v.split_at_mut_checked(2) {\n    assert_eq!(left, [1, 0]);\n    assert_eq!(right, [3, 0, 5, 6]);\n    left[1] = 2;\n    right[1] = 4;\n}\nassert_eq!(v, [1, 2, 3, 4, 5, 6]);\n\nassert_eq!(None, v.split_at_mut_checked(7));
1.0.0 · Source

pub fn split<F>(&self, pred: F) -> Split<'_, T, F>
where\n F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match\npred. The matched element is not contained in the subslices.

\n
§Examples
\n
let slice = [10, 40, 33, 20];\nlet mut iter = slice.split(|num| num % 3 == 0);\n\nassert_eq!(iter.next().unwrap(), &[10, 40]);\nassert_eq!(iter.next().unwrap(), &[20]);\nassert!(iter.next().is_none());
\n

If the first element is matched, an empty slice will be the first item\nreturned by the iterator. Similarly, if the last element in the slice\nis matched, an empty slice will be the last item returned by the\niterator:

\n\n
let slice = [10, 40, 33];\nlet mut iter = slice.split(|num| num % 3 == 0);\n\nassert_eq!(iter.next().unwrap(), &[10, 40]);\nassert_eq!(iter.next().unwrap(), &[]);\nassert!(iter.next().is_none());
\n

If two matched elements are directly adjacent, an empty slice will be\npresent between them:

\n\n
let slice = [10, 6, 33, 20];\nlet mut iter = slice.split(|num| num % 3 == 0);\n\nassert_eq!(iter.next().unwrap(), &[10]);\nassert_eq!(iter.next().unwrap(), &[]);\nassert_eq!(iter.next().unwrap(), &[20]);\nassert!(iter.next().is_none());
1.0.0 · Source

pub fn split_mut<F>(&mut self, pred: F) -> SplitMut<'_, T, F>
where\n F: FnMut(&T) -> bool,

Returns an iterator over mutable subslices separated by elements that\nmatch pred. The matched element is not contained in the subslices.

\n
§Examples
\n
let mut v = [10, 40, 30, 20, 60, 50];\n\nfor group in v.split_mut(|num| *num % 3 == 0) {\n    group[0] = 1;\n}\nassert_eq!(v, [1, 40, 30, 1, 60, 1]);
1.51.0 · Source

pub fn split_inclusive<F>(&self, pred: F) -> SplitInclusive<'_, T, F>
where\n F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match\npred. The matched element is contained in the end of the previous\nsubslice as a terminator.

\n
§Examples
\n
let slice = [10, 40, 33, 20];\nlet mut iter = slice.split_inclusive(|num| num % 3 == 0);\n\nassert_eq!(iter.next().unwrap(), &[10, 40, 33]);\nassert_eq!(iter.next().unwrap(), &[20]);\nassert!(iter.next().is_none());
\n

If the last element of the slice is matched,\nthat element will be considered the terminator of the preceding slice.\nThat slice will be the last item returned by the iterator.

\n\n
let slice = [3, 10, 40, 33];\nlet mut iter = slice.split_inclusive(|num| num % 3 == 0);\n\nassert_eq!(iter.next().unwrap(), &[3]);\nassert_eq!(iter.next().unwrap(), &[10, 40, 33]);\nassert!(iter.next().is_none());
1.51.0 · Source

pub fn split_inclusive_mut<F>(&mut self, pred: F) -> SplitInclusiveMut<'_, T, F>
where\n F: FnMut(&T) -> bool,

Returns an iterator over mutable subslices separated by elements that\nmatch pred. The matched element is contained in the previous\nsubslice as a terminator.

\n
§Examples
\n
let mut v = [10, 40, 30, 20, 60, 50];\n\nfor group in v.split_inclusive_mut(|num| *num % 3 == 0) {\n    let terminator_idx = group.len()-1;\n    group[terminator_idx] = 1;\n}\nassert_eq!(v, [10, 40, 1, 20, 1, 1]);
1.27.0 · Source

pub fn rsplit<F>(&self, pred: F) -> RSplit<'_, T, F>
where\n F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match\npred, starting at the end of the slice and working backwards.\nThe matched element is not contained in the subslices.

\n
§Examples
\n
let slice = [11, 22, 33, 0, 44, 55];\nlet mut iter = slice.rsplit(|num| *num == 0);\n\nassert_eq!(iter.next().unwrap(), &[44, 55]);\nassert_eq!(iter.next().unwrap(), &[11, 22, 33]);\nassert_eq!(iter.next(), None);
\n

As with split(), if the first or last element is matched, an empty\nslice will be the first (or last) item returned by the iterator.

\n\n
let v = &[0, 1, 1, 2, 3, 5, 8];\nlet mut it = v.rsplit(|n| *n % 2 == 0);\nassert_eq!(it.next().unwrap(), &[]);\nassert_eq!(it.next().unwrap(), &[3, 5]);\nassert_eq!(it.next().unwrap(), &[1, 1]);\nassert_eq!(it.next().unwrap(), &[]);\nassert_eq!(it.next(), None);
1.27.0 · Source

pub fn rsplit_mut<F>(&mut self, pred: F) -> RSplitMut<'_, T, F>
where\n F: FnMut(&T) -> bool,

Returns an iterator over mutable subslices separated by elements that\nmatch pred, starting at the end of the slice and working\nbackwards. The matched element is not contained in the subslices.

\n
§Examples
\n
let mut v = [100, 400, 300, 200, 600, 500];\n\nlet mut count = 0;\nfor group in v.rsplit_mut(|num| *num % 3 == 0) {\n    count += 1;\n    group[0] = count;\n}\nassert_eq!(v, [3, 400, 300, 2, 600, 1]);
1.0.0 · Source

pub fn splitn<F>(&self, n: usize, pred: F) -> SplitN<'_, T, F>
where\n F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match\npred, limited to returning at most n items. The matched element is\nnot contained in the subslices.

\n

The last element returned, if any, will contain the remainder of the\nslice.

\n
§Examples
\n

Print the slice split once by numbers divisible by 3 (i.e., [10, 40],\n[20, 60, 50]):

\n\n
let v = [10, 40, 30, 20, 60, 50];\n\nfor group in v.splitn(2, |num| *num % 3 == 0) {\n    println!(\"{group:?}\");\n}
1.0.0 · Source

pub fn splitn_mut<F>(&mut self, n: usize, pred: F) -> SplitNMut<'_, T, F>
where\n F: FnMut(&T) -> bool,

Returns an iterator over mutable subslices separated by elements that match\npred, limited to returning at most n items. The matched element is\nnot contained in the subslices.

\n

The last element returned, if any, will contain the remainder of the\nslice.

\n
§Examples
\n
let mut v = [10, 40, 30, 20, 60, 50];\n\nfor group in v.splitn_mut(2, |num| *num % 3 == 0) {\n    group[0] = 1;\n}\nassert_eq!(v, [1, 40, 30, 1, 60, 50]);
1.0.0 · Source

pub fn rsplitn<F>(&self, n: usize, pred: F) -> RSplitN<'_, T, F>
where\n F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match\npred limited to returning at most n items. This starts at the end of\nthe slice and works backwards. The matched element is not contained in\nthe subslices.

\n

The last element returned, if any, will contain the remainder of the\nslice.

\n
§Examples
\n

Print the slice split once, starting from the end, by numbers divisible\nby 3 (i.e., [50], [10, 40, 30, 20]):

\n\n
let v = [10, 40, 30, 20, 60, 50];\n\nfor group in v.rsplitn(2, |num| *num % 3 == 0) {\n    println!(\"{group:?}\");\n}
1.0.0 · Source

pub fn rsplitn_mut<F>(&mut self, n: usize, pred: F) -> RSplitNMut<'_, T, F>
where\n F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match\npred limited to returning at most n items. This starts at the end of\nthe slice and works backwards. The matched element is not contained in\nthe subslices.

\n

The last element returned, if any, will contain the remainder of the\nslice.

\n
§Examples
\n
let mut s = [10, 40, 30, 20, 60, 50];\n\nfor group in s.rsplitn_mut(2, |num| *num % 3 == 0) {\n    group[0] = 1;\n}\nassert_eq!(s, [1, 40, 30, 20, 60, 1]);
Source

pub fn split_once<F>(&self, pred: F) -> Option<(&[T], &[T])>
where\n F: FnMut(&T) -> bool,

🔬This is a nightly-only experimental API. (slice_split_once)

Splits the slice on the first element that matches the specified\npredicate.

\n

If any matching elements are present in the slice, returns the prefix\nbefore the match and suffix after. The matching element itself is not\nincluded. If no elements match, returns None.

\n
§Examples
\n
#![feature(slice_split_once)]\nlet s = [1, 2, 3, 2, 4];\nassert_eq!(s.split_once(|&x| x == 2), Some((\n    &[1][..],\n    &[3, 2, 4][..]\n)));\nassert_eq!(s.split_once(|&x| x == 0), None);
Source

pub fn rsplit_once<F>(&self, pred: F) -> Option<(&[T], &[T])>
where\n F: FnMut(&T) -> bool,

🔬This is a nightly-only experimental API. (slice_split_once)

Splits the slice on the last element that matches the specified\npredicate.

\n

If any matching elements are present in the slice, returns the prefix\nbefore the match and suffix after. The matching element itself is not\nincluded. If no elements match, returns None.

\n
§Examples
\n
#![feature(slice_split_once)]\nlet s = [1, 2, 3, 2, 4];\nassert_eq!(s.rsplit_once(|&x| x == 2), Some((\n    &[1, 2, 3][..],\n    &[4][..]\n)));\nassert_eq!(s.rsplit_once(|&x| x == 0), None);
1.0.0 · Source

pub fn contains(&self, x: &T) -> bool
where\n T: PartialEq,

Returns true if the slice contains an element with the given value.

\n

This operation is O(n).

\n

Note that if you have a sorted slice, binary_search may be faster.

\n
§Examples
\n
let v = [10, 40, 30];\nassert!(v.contains(&30));\nassert!(!v.contains(&50));
\n

If you do not have a &T, but some other value that you can compare\nwith one (for example, String implements PartialEq<str>), you can\nuse iter().any:

\n\n
let v = [String::from(\"hello\"), String::from(\"world\")]; // slice of `String`\nassert!(v.iter().any(|e| e == \"hello\")); // search with `&str`\nassert!(!v.iter().any(|e| e == \"hi\"));
1.0.0 · Source

pub fn starts_with(&self, needle: &[T]) -> bool
where\n T: PartialEq,

Returns true if needle is a prefix of the slice or equal to the slice.

\n
§Examples
\n
let v = [10, 40, 30];\nassert!(v.starts_with(&[10]));\nassert!(v.starts_with(&[10, 40]));\nassert!(v.starts_with(&v));\nassert!(!v.starts_with(&[50]));\nassert!(!v.starts_with(&[10, 50]));
\n

Always returns true if needle is an empty slice:

\n\n
let v = &[10, 40, 30];\nassert!(v.starts_with(&[]));\nlet v: &[u8] = &[];\nassert!(v.starts_with(&[]));
1.0.0 · Source

pub fn ends_with(&self, needle: &[T]) -> bool
where\n T: PartialEq,

Returns true if needle is a suffix of the slice or equal to the slice.

\n
§Examples
\n
let v = [10, 40, 30];\nassert!(v.ends_with(&[30]));\nassert!(v.ends_with(&[40, 30]));\nassert!(v.ends_with(&v));\nassert!(!v.ends_with(&[50]));\nassert!(!v.ends_with(&[50, 30]));
\n

Always returns true if needle is an empty slice:

\n\n
let v = &[10, 40, 30];\nassert!(v.ends_with(&[]));\nlet v: &[u8] = &[];\nassert!(v.ends_with(&[]));
1.51.0 · Source

pub fn strip_prefix<P>(&self, prefix: &P) -> Option<&[T]>
where\n P: SlicePattern<Item = T> + ?Sized,\n T: PartialEq,

Returns a subslice with the prefix removed.

\n

If the slice starts with prefix, returns the subslice after the prefix, wrapped in Some.\nIf prefix is empty, simply returns the original slice. If prefix is equal to the\noriginal slice, returns an empty slice.

\n

If the slice does not start with prefix, returns None.

\n
§Examples
\n
let v = &[10, 40, 30];\nassert_eq!(v.strip_prefix(&[10]), Some(&[40, 30][..]));\nassert_eq!(v.strip_prefix(&[10, 40]), Some(&[30][..]));\nassert_eq!(v.strip_prefix(&[10, 40, 30]), Some(&[][..]));\nassert_eq!(v.strip_prefix(&[50]), None);\nassert_eq!(v.strip_prefix(&[10, 50]), None);\n\nlet prefix : &str = \"he\";\nassert_eq!(b\"hello\".strip_prefix(prefix.as_bytes()),\n           Some(b\"llo\".as_ref()));
1.51.0 · Source

pub fn strip_suffix<P>(&self, suffix: &P) -> Option<&[T]>
where\n P: SlicePattern<Item = T> + ?Sized,\n T: PartialEq,

Returns a subslice with the suffix removed.

\n

If the slice ends with suffix, returns the subslice before the suffix, wrapped in Some.\nIf suffix is empty, simply returns the original slice. If suffix is equal to the\noriginal slice, returns an empty slice.

\n

If the slice does not end with suffix, returns None.

\n
§Examples
\n
let v = &[10, 40, 30];\nassert_eq!(v.strip_suffix(&[30]), Some(&[10, 40][..]));\nassert_eq!(v.strip_suffix(&[40, 30]), Some(&[10][..]));\nassert_eq!(v.strip_suffix(&[10, 40, 30]), Some(&[][..]));\nassert_eq!(v.strip_suffix(&[50]), None);\nassert_eq!(v.strip_suffix(&[50, 30]), None);
1.98.0 · Source

pub fn strip_circumfix<S, P>(&self, prefix: &P, suffix: &S) -> Option<&[T]>
where\n T: PartialEq,\n S: SlicePattern<Item = T> + ?Sized,\n P: SlicePattern<Item = T> + ?Sized,

Returns a subslice with the prefix and suffix removed.

\n

If the slice starts with prefix, ends with suffix, and\nthe prefix and suffix don’t overlap, returns the subslice after\nthe prefix and before the suffix, wrapped in Some.

\n

If the slice does not start with prefix, does not end with suffix,\nor the prefix and suffix overlap in the slice, returns None.

\n
§Examples
\n
let v = &[10, 50, 40, 30];\nassert_eq!(v.strip_circumfix(&[10], &[30]), Some(&[50, 40][..]));\nassert_eq!(v.strip_circumfix(&[10], &[40, 30]), Some(&[50][..]));\nassert_eq!(v.strip_circumfix(&[10, 50], &[40, 30]), Some(&[][..]));\nassert_eq!(v.strip_circumfix(&[50], &[30]), None);\nassert_eq!(v.strip_circumfix(&[10], &[40]), None);\nassert_eq!(v.strip_circumfix(&[], &[40, 30]), Some(&[10, 50][..]));\nassert_eq!(v.strip_circumfix(&[10, 50], &[]), Some(&[40, 30][..]));\nassert_eq!(v.strip_circumfix(&[10, 50, 40], &[50, 40, 30]), None);
Source

pub fn trim_prefix<P>(&self, prefix: &P) -> &[T]
where\n P: SlicePattern<Item = T> + ?Sized,\n T: PartialEq,

🔬This is a nightly-only experimental API. (trim_prefix_suffix)

Returns a subslice with the optional prefix removed.

\n

If the slice starts with prefix, returns the subslice after the prefix. If prefix\nis empty or the slice does not start with prefix, simply returns the original slice.\nIf prefix is equal to the original slice, returns an empty slice.

\n
§Examples
\n
#![feature(trim_prefix_suffix)]\n\nlet v = &[10, 40, 30];\n\n// Prefix present - removes it\nassert_eq!(v.trim_prefix(&[10]), &[40, 30][..]);\nassert_eq!(v.trim_prefix(&[10, 40]), &[30][..]);\nassert_eq!(v.trim_prefix(&[10, 40, 30]), &[][..]);\n\n// Prefix absent - returns original slice\nassert_eq!(v.trim_prefix(&[50]), &[10, 40, 30][..]);\nassert_eq!(v.trim_prefix(&[10, 50]), &[10, 40, 30][..]);\n\nlet prefix : &str = \"he\";\nassert_eq!(b\"hello\".trim_prefix(prefix.as_bytes()), b\"llo\".as_ref());
Source

pub fn trim_suffix<P>(&self, suffix: &P) -> &[T]
where\n P: SlicePattern<Item = T> + ?Sized,\n T: PartialEq,

🔬This is a nightly-only experimental API. (trim_prefix_suffix)

Returns a subslice with the optional suffix removed.

\n

If the slice ends with suffix, returns the subslice before the suffix. If suffix\nis empty or the slice does not end with suffix, simply returns the original slice.\nIf suffix is equal to the original slice, returns an empty slice.

\n
§Examples
\n
#![feature(trim_prefix_suffix)]\n\nlet v = &[10, 40, 30];\n\n// Suffix present - removes it\nassert_eq!(v.trim_suffix(&[30]), &[10, 40][..]);\nassert_eq!(v.trim_suffix(&[40, 30]), &[10][..]);\nassert_eq!(v.trim_suffix(&[10, 40, 30]), &[][..]);\n\n// Suffix absent - returns original slice\nassert_eq!(v.trim_suffix(&[50]), &[10, 40, 30][..]);\nassert_eq!(v.trim_suffix(&[50, 30]), &[10, 40, 30][..]);
1.0.0 · Source

pub fn binary_search(&self, x: &T) -> Result<usize, usize>
where\n T: Ord,

Binary searches this slice for a given element.\nIf the slice is not sorted, the returned result is unspecified and\nmeaningless.

\n

If the value is found then Result::Ok is returned, containing the\nindex of the matching element. If there are multiple matches, then any\none of the matches could be returned. The index is chosen\ndeterministically, but is subject to change in future versions of Rust.\nIf the value is not found then Result::Err is returned, containing\nthe index where a matching element could be inserted while maintaining\nsorted order.

\n

See also binary_search_by, binary_search_by_key, and partition_point.

\n
§Examples
\n

Looks up a series of four elements. The first is found, with a\nuniquely determined position; the second and third are not\nfound; the fourth could match any position in [1, 4].

\n\n
let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];\n\nassert_eq!(s.binary_search(&13),  Ok(9));\nassert_eq!(s.binary_search(&4),   Err(7));\nassert_eq!(s.binary_search(&100), Err(13));\nlet r = s.binary_search(&1);\nassert!(match r { Ok(1..=4) => true, _ => false, });
\n

If you want to find that whole range of matching items, rather than\nan arbitrary matching one, that can be done using partition_point:

\n\n
let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];\n\nlet low = s.partition_point(|x| x < &1);\nassert_eq!(low, 1);\nlet high = s.partition_point(|x| x <= &1);\nassert_eq!(high, 5);\nlet r = s.binary_search(&1);\nassert!((low..high).contains(&r.unwrap()));\n\nassert!(s[..low].iter().all(|&x| x < 1));\nassert!(s[low..high].iter().all(|&x| x == 1));\nassert!(s[high..].iter().all(|&x| x > 1));\n\n// For something not found, the \"range\" of equal items is empty\nassert_eq!(s.partition_point(|x| x < &11), 9);\nassert_eq!(s.partition_point(|x| x <= &11), 9);\nassert_eq!(s.binary_search(&11), Err(9));
\n

If you want to insert an item to a sorted vector, while maintaining\nsort order, consider using partition_point:

\n\n
let mut s = vec![0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];\nlet num = 42;\nlet idx = s.partition_point(|&x| x <= num);\n// If `num` is unique, `s.partition_point(|&x| x < num)` (with `<`) is equivalent to\n// `s.binary_search(&num).unwrap_or_else(|x| x)`, but using `<=` will allow `insert`\n// to shift less elements.\ns.insert(idx, num);\nassert_eq!(s, [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 42, 55]);
1.0.0 · Source

pub fn binary_search_by<'a, F>(&'a self, f: F) -> Result<usize, usize>
where\n F: FnMut(&'a T) -> Ordering,

Binary searches this slice with a comparator function.

\n

The comparator function should return an order code that indicates\nwhether its argument is Less, Equal or Greater the desired\ntarget.\nIf the slice is not sorted or if the comparator function does not\nimplement an order consistent with the sort order of the underlying\nslice, the returned result is unspecified and meaningless.

\n

If the value is found then Result::Ok is returned, containing the\nindex of the matching element. If there are multiple matches, then any\none of the matches could be returned. The index is chosen\ndeterministically, but is subject to change in future versions of Rust.\nIf the value is not found then Result::Err is returned, containing\nthe index where a matching element could be inserted while maintaining\nsorted order.

\n

See also binary_search, binary_search_by_key, and partition_point.

\n
§Examples
\n

Looks up a series of four elements. The first is found, with a\nuniquely determined position; the second and third are not\nfound; the fourth could match any position in [1, 4].

\n\n
let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];\n\nlet seek = 13;\nassert_eq!(s.binary_search_by(|probe| probe.cmp(&seek)), Ok(9));\nlet seek = 4;\nassert_eq!(s.binary_search_by(|probe| probe.cmp(&seek)), Err(7));\nlet seek = 100;\nassert_eq!(s.binary_search_by(|probe| probe.cmp(&seek)), Err(13));\nlet seek = 1;\nlet r = s.binary_search_by(|probe| probe.cmp(&seek));\nassert!(match r { Ok(1..=4) => true, _ => false, });
1.10.0 · Source

pub fn binary_search_by_key<'a, B, F>(\n &'a self,\n b: &B,\n f: F,\n) -> Result<usize, usize>
where\n F: FnMut(&'a T) -> B,\n B: Ord,

Binary searches this slice with a key extraction function.

\n

Assumes that the slice is sorted by the key, for instance with\nsort_by_key using the same key extraction function.\nIf the slice is not sorted by the key, the returned result is\nunspecified and meaningless.

\n

If the value is found then Result::Ok is returned, containing the\nindex of the matching element. If there are multiple matches, then any\none of the matches could be returned. The index is chosen\ndeterministically, but is subject to change in future versions of Rust.\nIf the value is not found then Result::Err is returned, containing\nthe index where a matching element could be inserted while maintaining\nsorted order.

\n

See also binary_search, binary_search_by, and partition_point.

\n
§Examples
\n

Looks up a series of four elements in a slice of pairs sorted by\ntheir second elements. The first is found, with a uniquely\ndetermined position; the second and third are not found; the\nfourth could match any position in [1, 4].

\n\n
let s = [(0, 0), (2, 1), (4, 1), (5, 1), (3, 1),\n         (1, 2), (2, 3), (4, 5), (5, 8), (3, 13),\n         (1, 21), (2, 34), (4, 55)];\n\nassert_eq!(s.binary_search_by_key(&13, |&(a, b)| b),  Ok(9));\nassert_eq!(s.binary_search_by_key(&4, |&(a, b)| b),   Err(7));\nassert_eq!(s.binary_search_by_key(&100, |&(a, b)| b), Err(13));\nlet r = s.binary_search_by_key(&1, |&(a, b)| b);\nassert!(match r { Ok(1..=4) => true, _ => false, });
1.20.0 · Source

pub fn sort_unstable(&mut self)
where\n T: Ord,

Sorts the slice in ascending order without preserving the initial order of equal elements.

\n

This sort is unstable (i.e., may reorder equal elements), in-place (i.e., does not\nallocate), and O(n * log(n)) worst-case.

\n

If the implementation of Ord for T does not implement a total order, the function\nmay panic; even if the function exits normally, the resulting order of elements in the slice\nis unspecified. See also the note on panicking below.

\n

For example |a, b| (a - b).cmp(a) is a comparison function that is neither transitive nor\nreflexive nor total, a < b < c < a with a = 1, b = 2, c = 3. For more information and\nexamples see the Ord documentation.

\n

All original elements will remain in the slice and any possible modifications via interior\nmutability are observed in the input. Same is true if the implementation of Ord for T panics.

\n

Sorting types that only implement PartialOrd such as f32 and f64 require\nadditional precautions. For example, f32::NAN != f32::NAN, which doesn’t fulfill the\nreflexivity requirement of Ord. By using an alternative comparison function with\nslice::sort_unstable_by such as f32::total_cmp or f64::total_cmp that defines a\ntotal order users can sort slices containing floating-point values. Alternatively, if all\nvalues in the slice are guaranteed to be in a subset for which PartialOrd::partial_cmp\nforms a total order, it’s possible to sort the slice with sort_unstable_by(|a, b| a.partial_cmp(b).unwrap()).

\n
§Current implementation
\n

The current implementation is based on ipnsort by Lukas Bergdoll and Orson Peters, which\ncombines the fast average case of quicksort with the fast worst case of heapsort, achieving\nlinear time on fully sorted and reversed inputs. On inputs with k distinct elements, the\nexpected time to sort the data is O(n * log(k)).

\n

It is typically faster than stable sorting, except in a few special cases, e.g., when the\nslice is partially sorted.

\n
§Panics
\n

May panic if the implementation of Ord for T does not implement a total order, or if\nthe Ord implementation panics.

\n
§Examples
\n
let mut v = [4, -5, 1, -3, 2];\n\nv.sort_unstable();\nassert_eq!(v, [-5, -3, 1, 2, 4]);
1.20.0 · Source

pub fn sort_unstable_by<F>(&mut self, compare: F)
where\n F: FnMut(&T, &T) -> Ordering,

Sorts the slice in ascending order with a comparison function, without preserving the\ninitial order of equal elements.

\n

This sort is unstable (i.e., may reorder equal elements), in-place (i.e., does not\nallocate), and O(n * log(n)) worst-case.

\n

If the comparison function compare does not implement a total order, the function\nmay panic; even if the function exits normally, the resulting order of elements in the slice\nis unspecified. See also the note on panicking below.

\n

For example |a, b| (a - b).cmp(a) is a comparison function that is neither transitive nor\nreflexive nor total, a < b < c < a with a = 1, b = 2, c = 3. For more information and\nexamples see the Ord documentation.

\n

All original elements will remain in the slice and any possible modifications via interior\nmutability are observed in the input. Same is true if compare panics.

\n
§Current implementation
\n

The current implementation is based on ipnsort by Lukas Bergdoll and Orson Peters, which\ncombines the fast average case of quicksort with the fast worst case of heapsort, achieving\nlinear time on fully sorted and reversed inputs. On inputs with k distinct elements, the\nexpected time to sort the data is O(n * log(k)).

\n

It is typically faster than stable sorting, except in a few special cases, e.g., when the\nslice is partially sorted.

\n
§Panics
\n

May panic if the compare does not implement a total order, or if\nthe compare itself panics.

\n
§Examples
\n
let mut v = [4, -5, 1, -3, 2];\nv.sort_unstable_by(|a, b| a.cmp(b));\nassert_eq!(v, [-5, -3, 1, 2, 4]);\n\n// reverse sorting\nv.sort_unstable_by(|a, b| b.cmp(a));\nassert_eq!(v, [4, 2, 1, -3, -5]);
1.20.0 · Source

pub fn sort_unstable_by_key<K, F>(&mut self, f: F)
where\n F: FnMut(&T) -> K,\n K: Ord,

Sorts the slice in ascending order with a key extraction function, without preserving\nthe initial order of equal elements.

\n

This sort is unstable (i.e., may reorder equal elements), in-place (i.e., does not\nallocate), and O(n * log(n)) worst-case.

\n

If the implementation of Ord for K does not implement a total order, the function\nmay panic; even if the function exits normally, the resulting order of elements in the slice\nis unspecified. See also the note on panicking below.

\n

For example |a, b| (a - b).cmp(a) is a comparison function that is neither transitive nor\nreflexive nor total, a < b < c < a with a = 1, b = 2, c = 3. For more information and\nexamples see the Ord documentation.

\n

All original elements will remain in the slice and any possible modifications via interior\nmutability are observed in the input. Same is true if the implementation of Ord for K panics.

\n
§Current implementation
\n

The current implementation is based on ipnsort by Lukas Bergdoll and Orson Peters, which\ncombines the fast average case of quicksort with the fast worst case of heapsort, achieving\nlinear time on fully sorted and reversed inputs. On inputs with k distinct elements, the\nexpected time to sort the data is O(n * log(k)).

\n

It is typically faster than stable sorting, except in a few special cases, e.g., when the\nslice is partially sorted.

\n
§Panics
\n

May panic if the implementation of Ord for K does not implement a total order, or if\nthe Ord implementation panics.

\n
§Examples
\n
let mut v = [4i32, -5, 1, -3, 2];\n\nv.sort_unstable_by_key(|k| k.abs());\nassert_eq!(v, [1, 2, -3, 4, -5]);
Source

pub fn partial_sort_unstable<R>(&mut self, range: R)
where\n T: Ord,\n R: RangeBounds<usize>,

🔬This is a nightly-only experimental API. (slice_partial_sort_unstable)

Partially sorts the slice in ascending order without preserving the initial order of equal elements.

\n

Upon completion, for the specified range start..end, it’s guaranteed that:

\n
    \n
  1. Every element in self[..start] is smaller than or equal to
  2. \n
  3. Every element in self[start..end], which is sorted, and smaller than or equal to
  4. \n
  5. Every element in self[end..].
  6. \n
\n

This partial sort is unstable, meaning it may reorder equal elements in the specified range.\nIt may reorder elements outside the specified range as well, but the guarantees above still hold.

\n

This partial sort is in-place (i.e., does not allocate), and O(n + k * log(k)) worst-case,\nwhere n is the length of the slice and k is the length of the specified range.

\n

See the documentation of sort_unstable for implementation notes.

\n
§Panics
\n

May panic if the implementation of Ord for T does not implement a total order, or if\nthe Ord implementation panics, or if the specified range is out of bounds.

\n
§Examples
\n
#![feature(slice_partial_sort_unstable)]\n\nlet mut v = [4, -5, 1, -3, 2];\n\n// empty range at the beginning, nothing changed\nv.partial_sort_unstable(0..0);\nassert_eq!(v, [4, -5, 1, -3, 2]);\n\n// empty range in the middle, partitioning the slice\nv.partial_sort_unstable(2..2);\nfor i in 0..2 {\n   assert!(v[i] <= v[2]);\n}\nfor i in 3..v.len() {\n  assert!(v[2] <= v[i]);\n}\n\n// single element range, same as select_nth_unstable\nv.partial_sort_unstable(2..3);\nfor i in 0..2 {\n   assert!(v[i] <= v[2]);\n}\nfor i in 3..v.len() {\n  assert!(v[2] <= v[i]);\n}\n\n// partial sort a subrange\nv.partial_sort_unstable(1..4);\nassert_eq!(&v[1..4], [-3, 1, 2]);\n\n// partial sort the whole range, same as sort_unstable\nv.partial_sort_unstable(..);\nassert_eq!(v, [-5, -3, 1, 2, 4]);
Source

pub fn partial_sort_unstable_by<F, R>(&mut self, range: R, compare: F)
where\n F: FnMut(&T, &T) -> Ordering,\n R: RangeBounds<usize>,

🔬This is a nightly-only experimental API. (slice_partial_sort_unstable)

Partially sorts the slice in ascending order with a comparison function, without\npreserving the initial order of equal elements.

\n

Upon completion, for the specified range start..end, it’s guaranteed that:

\n
    \n
  1. Every element in self[..start] is smaller than or equal to
  2. \n
  3. Every element in self[start..end], which is sorted, and smaller than or equal to
  4. \n
  5. Every element in self[end..].
  6. \n
\n

This partial sort is unstable, meaning it may reorder equal elements in the specified range.\nIt may reorder elements outside the specified range as well, but the guarantees above still hold.

\n

This partial sort is in-place (i.e., does not allocate), and O(n + k * log(k)) worst-case,\nwhere n is the length of the slice and k is the length of the specified range.

\n

See the documentation of sort_unstable_by for implementation notes.

\n
§Panics
\n

May panic if the compare does not implement a total order, or if\nthe compare itself panics, or if the specified range is out of bounds.

\n
§Examples
\n
#![feature(slice_partial_sort_unstable)]\n\nlet mut v = [4, -5, 1, -3, 2];\n\n// empty range at the beginning, nothing changed\nv.partial_sort_unstable_by(0..0, |a, b| b.cmp(a));\nassert_eq!(v, [4, -5, 1, -3, 2]);\n\n// empty range in the middle, partitioning the slice\nv.partial_sort_unstable_by(2..2, |a, b| b.cmp(a));\nfor i in 0..2 {\n   assert!(v[i] >= v[2]);\n}\nfor i in 3..v.len() {\n  assert!(v[2] >= v[i]);\n}\n\n// single element range, same as select_nth_unstable\nv.partial_sort_unstable_by(2..3, |a, b| b.cmp(a));\nfor i in 0..2 {\n   assert!(v[i] >= v[2]);\n}\nfor i in 3..v.len() {\n  assert!(v[2] >= v[i]);\n}\n\n// partial sort a subrange\nv.partial_sort_unstable_by(1..4, |a, b| b.cmp(a));\nassert_eq!(&v[1..4], [2, 1, -3]);\n\n// partial sort the whole range, same as sort_unstable\nv.partial_sort_unstable_by(.., |a, b| b.cmp(a));\nassert_eq!(v, [4, 2, 1, -3, -5]);
Source

pub fn partial_sort_unstable_by_key<K, F, R>(&mut self, range: R, f: F)
where\n F: FnMut(&T) -> K,\n K: Ord,\n R: RangeBounds<usize>,

🔬This is a nightly-only experimental API. (slice_partial_sort_unstable)

Partially sorts the slice in ascending order with a key extraction function, without\npreserving the initial order of equal elements.

\n

Upon completion, for the specified range start..end, it’s guaranteed that:

\n
    \n
  1. Every element in self[..start] is smaller than or equal to
  2. \n
  3. Every element in self[start..end], which is sorted, and smaller than or equal to
  4. \n
  5. Every element in self[end..].
  6. \n
\n

This partial sort is unstable, meaning it may reorder equal elements in the specified range.\nIt may reorder elements outside the specified range as well, but the guarantees above still hold.

\n

This partial sort is in-place (i.e., does not allocate), and O(n + k * log(k)) worst-case,\nwhere n is the length of the slice and k is the length of the specified range.

\n

See the documentation of sort_unstable_by_key for implementation notes.

\n
§Panics
\n

May panic if the implementation of Ord for K does not implement a total order, or if\nthe Ord implementation panics, or if the specified range is out of bounds.

\n
§Examples
\n
#![feature(slice_partial_sort_unstable)]\n\nlet mut v = [4i32, -5, 1, -3, 2];\n\n// empty range at the beginning, nothing changed\nv.partial_sort_unstable_by_key(0..0, |k| k.abs());\nassert_eq!(v, [4, -5, 1, -3, 2]);\n\n// empty range in the middle, partitioning the slice\nv.partial_sort_unstable_by_key(2..2, |k| k.abs());\nfor i in 0..2 {\n   assert!(v[i].abs() <= v[2].abs());\n}\nfor i in 3..v.len() {\n  assert!(v[2].abs() <= v[i].abs());\n}\n\n// single element range, same as select_nth_unstable\nv.partial_sort_unstable_by_key(2..3, |k| k.abs());\nfor i in 0..2 {\n   assert!(v[i].abs() <= v[2].abs());\n}\nfor i in 3..v.len() {\n  assert!(v[2].abs() <= v[i].abs());\n}\n\n// partial sort a subrange\nv.partial_sort_unstable_by_key(1..4, |k| k.abs());\nassert_eq!(&v[1..4], [2, -3, 4]);\n\n// partial sort the whole range, same as sort_unstable\nv.partial_sort_unstable_by_key(.., |k| k.abs());\nassert_eq!(v, [1, 2, -3, 4, -5]);
1.49.0 · Source

pub fn select_nth_unstable(\n &mut self,\n index: usize,\n) -> (&mut [T], &mut T, &mut [T])
where\n T: Ord,

Reorders the slice such that the element at index is at a sort-order position. All\nelements before index will be <= to this value, and all elements after will be >= to\nit.

\n

This reordering is unstable (i.e. any element that compares equal to the nth element may end\nup at that position), in-place (i.e. does not allocate), and runs in O(n) time. This\nfunction is also known as “kth element” in other libraries.

\n

Returns a triple that partitions the reordered slice:

\n
    \n
  • \n

    The unsorted subslice before index, whose elements all satisfy x <= self[index].

    \n
  • \n
  • \n

    The element at index.

    \n
  • \n
  • \n

    The unsorted subslice after index, whose elements all satisfy x >= self[index].

    \n
  • \n
\n
§Current implementation
\n

The current algorithm is an introselect implementation based on ipnsort by Lukas Bergdoll\nand Orson Peters, which is also the basis for sort_unstable. The fallback algorithm is\nMedian of Medians using Tukey’s Ninther for pivot selection, which guarantees linear runtime\nfor all inputs.

\n
§Panics
\n

Panics when index >= len(), and so always panics on empty slices.

\n

May panic if the implementation of Ord for T does not implement a total order.

\n
§Examples
\n
let mut v = [-5i32, 4, 2, -3, 1];\n\n// Find the items `<=` to the median, the median itself, and the items `>=` to it.\nlet (lesser, median, greater) = v.select_nth_unstable(2);\n\nassert!(lesser == [-3, -5] || lesser == [-5, -3]);\nassert_eq!(median, &mut 1);\nassert!(greater == [4, 2] || greater == [2, 4]);\n\n// We are only guaranteed the slice will be one of the following, based on the way we sort\n// about the specified index.\nassert!(v == [-3, -5, 1, 2, 4] ||\n        v == [-5, -3, 1, 2, 4] ||\n        v == [-3, -5, 1, 4, 2] ||\n        v == [-5, -3, 1, 4, 2]);
1.49.0 · Source

pub fn select_nth_unstable_by<F>(\n &mut self,\n index: usize,\n compare: F,\n) -> (&mut [T], &mut T, &mut [T])
where\n F: FnMut(&T, &T) -> Ordering,

Reorders the slice with a comparator function such that the element at index is at a\nsort-order position. All elements before index will be <= to this value, and all\nelements after will be >= to it, according to the comparator function.

\n

This reordering is unstable (i.e. any element that compares equal to the nth element may end\nup at that position), in-place (i.e. does not allocate), and runs in O(n) time. This\nfunction is also known as “kth element” in other libraries.

\n

Returns a triple partitioning the reordered slice:

\n
    \n
  • \n

    The unsorted subslice before index, whose elements all satisfy\ncompare(x, self[index]).is_le().

    \n
  • \n
  • \n

    The element at index.

    \n
  • \n
  • \n

    The unsorted subslice after index, whose elements all satisfy\ncompare(x, self[index]).is_ge().

    \n
  • \n
\n
§Current implementation
\n

The current algorithm is an introselect implementation based on ipnsort by Lukas Bergdoll\nand Orson Peters, which is also the basis for sort_unstable. The fallback algorithm is\nMedian of Medians using Tukey’s Ninther for pivot selection, which guarantees linear runtime\nfor all inputs.

\n
§Panics
\n

Panics when index >= len(), and so always panics on empty slices.

\n

May panic if compare does not implement a total order.

\n
§Examples
\n
let mut v = [-5i32, 4, 2, -3, 1];\n\n// Find the items `>=` to the median, the median itself, and the items `<=` to it, by using\n// a reversed comparator.\nlet (before, median, after) = v.select_nth_unstable_by(2, |a, b| b.cmp(a));\n\nassert!(before == [4, 2] || before == [2, 4]);\nassert_eq!(median, &mut 1);\nassert!(after == [-3, -5] || after == [-5, -3]);\n\n// We are only guaranteed the slice will be one of the following, based on the way we sort\n// about the specified index.\nassert!(v == [2, 4, 1, -5, -3] ||\n        v == [2, 4, 1, -3, -5] ||\n        v == [4, 2, 1, -5, -3] ||\n        v == [4, 2, 1, -3, -5]);
1.49.0 · Source

pub fn select_nth_unstable_by_key<K, F>(\n &mut self,\n index: usize,\n f: F,\n) -> (&mut [T], &mut T, &mut [T])
where\n F: FnMut(&T) -> K,\n K: Ord,

Reorders the slice with a key extraction function such that the element at index is at a\nsort-order position. All elements before index will have keys <= to the key at index,\nand all elements after will have keys >= to it.

\n

This reordering is unstable (i.e. any element that compares equal to the nth element may end\nup at that position), in-place (i.e. does not allocate), and runs in O(n) time. This\nfunction is also known as “kth element” in other libraries.

\n

Returns a triple partitioning the reordered slice:

\n
    \n
  • \n

    The unsorted subslice before index, whose elements all satisfy f(x) <= f(self[index]).

    \n
  • \n
  • \n

    The element at index.

    \n
  • \n
  • \n

    The unsorted subslice after index, whose elements all satisfy f(x) >= f(self[index]).

    \n
  • \n
\n
§Current implementation
\n

The current algorithm is an introselect implementation based on ipnsort by Lukas Bergdoll\nand Orson Peters, which is also the basis for sort_unstable. The fallback algorithm is\nMedian of Medians using Tukey’s Ninther for pivot selection, which guarantees linear runtime\nfor all inputs.

\n
§Panics
\n

Panics when index >= len(), meaning it always panics on empty slices.

\n

May panic if K: Ord does not implement a total order.

\n
§Examples
\n
let mut v = [-5i32, 4, 1, -3, 2];\n\n// Find the items `<=` to the absolute median, the absolute median itself, and the items\n// `>=` to it.\nlet (lesser, median, greater) = v.select_nth_unstable_by_key(2, |a| a.abs());\n\nassert!(lesser == [1, 2] || lesser == [2, 1]);\nassert_eq!(median, &mut -3);\nassert!(greater == [4, -5] || greater == [-5, 4]);\n\n// We are only guaranteed the slice will be one of the following, based on the way we sort\n// about the specified index.\nassert!(v == [1, 2, -3, 4, -5] ||\n        v == [1, 2, -3, -5, 4] ||\n        v == [2, 1, -3, 4, -5] ||\n        v == [2, 1, -3, -5, 4]);
Source

pub fn partition_dedup(&mut self) -> (&mut [T], &mut [T])
where\n T: PartialEq,

🔬This is a nightly-only experimental API. (slice_partition_dedup)

Moves all consecutive repeated elements to the end of the slice according to the\nPartialEq trait implementation.

\n

Returns two slices. The first contains no consecutive repeated elements.\nThe second contains all the duplicates in no specified order.

\n

If the slice is sorted, the first returned slice contains no duplicates.

\n
§Examples
\n
#![feature(slice_partition_dedup)]\n\nlet mut slice = [1, 2, 2, 3, 3, 2, 1, 1];\n\nlet (dedup, duplicates) = slice.partition_dedup();\n\nassert_eq!(dedup, [1, 2, 3, 2, 1]);\nassert_eq!(duplicates, [2, 3, 1]);
Source

pub fn partition_dedup_by<F>(&mut self, same_bucket: F) -> (&mut [T], &mut [T])
where\n F: FnMut(&mut T, &mut T) -> bool,

🔬This is a nightly-only experimental API. (slice_partition_dedup)

Moves all but the first of consecutive elements to the end of the slice satisfying\na given equality relation.

\n

Returns two slices. The first contains no consecutive repeated elements.\nThe second contains all the duplicates in no specified order.

\n

The same_bucket function is passed references to two elements from the slice and\nmust determine if the elements compare equal. The elements are passed in opposite order\nfrom their order in the slice, so if same_bucket(a, b) returns true, a is moved\nat the end of the slice.

\n

If the slice is sorted, the first returned slice contains no duplicates.

\n
§Examples
\n
#![feature(slice_partition_dedup)]\n\nlet mut slice = [\"foo\", \"Foo\", \"BAZ\", \"Bar\", \"bar\", \"baz\", \"BAZ\"];\n\nlet (dedup, duplicates) = slice.partition_dedup_by(|a, b| a.eq_ignore_ascii_case(b));\n\nassert_eq!(dedup, [\"foo\", \"BAZ\", \"Bar\", \"baz\"]);\nassert_eq!(duplicates, [\"bar\", \"Foo\", \"BAZ\"]);
Source

pub fn partition_dedup_by_key<K, F>(&mut self, key: F) -> (&mut [T], &mut [T])
where\n F: FnMut(&mut T) -> K,\n K: PartialEq,

🔬This is a nightly-only experimental API. (slice_partition_dedup)

Moves all but the first of consecutive elements to the end of the slice that resolve\nto the same key.

\n

Returns two slices. The first contains no consecutive repeated elements.\nThe second contains all the duplicates in no specified order.

\n

If the slice is sorted, the first returned slice contains no duplicates.

\n
§Examples
\n
#![feature(slice_partition_dedup)]\n\nlet mut slice = [10, 20, 21, 30, 30, 20, 11, 13];\n\nlet (dedup, duplicates) = slice.partition_dedup_by_key(|i| *i / 10);\n\nassert_eq!(dedup, [10, 20, 30, 20, 11]);\nassert_eq!(duplicates, [21, 30, 13]);
1.26.0 (const: 1.92.0) · Source

pub const fn rotate_left(&mut self, mid: usize)

Rotates the slice in-place such that the first mid elements of the\nslice move to the end while the last self.len() - mid elements move to\nthe front.

\n

After calling rotate_left, the element previously at index mid will\nbecome the first element in the slice.

\n
§Panics
\n

This function will panic if mid is greater than the length of the\nslice. Note that mid == self.len() does not panic and is a no-op\nrotation.

\n
§Complexity
\n

Takes linear (in self.len()) time.

\n
§Examples
\n
let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];\na.rotate_left(2);\nassert_eq!(a, ['c', 'd', 'e', 'f', 'a', 'b']);
\n

Rotating a subslice:

\n\n
let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];\na[1..5].rotate_left(1);\nassert_eq!(a, ['a', 'c', 'd', 'e', 'b', 'f']);
1.26.0 (const: 1.92.0) · Source

pub const fn rotate_right(&mut self, k: usize)

Rotates the slice in-place such that the first self.len() - k\nelements of the slice move to the end while the last k elements move\nto the front.

\n

After calling rotate_right, the element previously at index\nself.len() - k will become the first element in the slice.

\n
§Panics
\n

This function will panic if k is greater than the length of the\nslice. Note that k == self.len() does not panic and is a no-op\nrotation.

\n
§Complexity
\n

Takes linear (in self.len()) time.

\n
§Examples
\n
let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];\na.rotate_right(2);\nassert_eq!(a, ['e', 'f', 'a', 'b', 'c', 'd']);
\n

Rotating a subslice:

\n\n
let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];\na[1..5].rotate_right(1);\nassert_eq!(a, ['a', 'e', 'b', 'c', 'd', 'f']);
Source

pub const fn shift_left<const N: usize>(&mut self, inserted: [T; N]) -> [T; N]

🔬This is a nightly-only experimental API. (slice_shift)

Moves the elements of this slice N places to the left, returning the ones\nthat “fall off” the front, and putting inserted at the end.

\n

Equivalently, you can think of concatenating self and inserted into one\nlong sequence, then returning the left-most N items and the rest into self:

\n
          self (before)    inserted\n          vvvvvvvvvvvvvvv  vvv\n          [1, 2, 3, 4, 5]  [9]\n       ↙   ↙  ↙  ↙  ↙   ↙\n     [1]  [2, 3, 4, 5, 9]\n     ^^^  ^^^^^^^^^^^^^^^\nreturned  self (after)
\n

See also Self::shift_right and compare Self::rotate_left.

\n
§Examples
\n
#![feature(slice_shift)]\n\n// Same as the diagram above\nlet mut a = [1, 2, 3, 4, 5];\nlet inserted = [9];\nlet returned = a.shift_left(inserted);\nassert_eq!(returned, [1]);\nassert_eq!(a, [2, 3, 4, 5, 9]);\n\n// You can shift multiple items at a time\nlet mut a = *b\"Hello world\";\nassert_eq!(a.shift_left(*b\" peace\"), *b\"Hello \");\nassert_eq!(a, *b\"world peace\");\n\n// The name comes from this operation's similarity to bitshifts\nlet mut a: u8 = 0b10010110;\na <<= 3;\nassert_eq!(a, 0b10110000_u8);\nlet mut a: [_; 8] = [1, 0, 0, 1, 0, 1, 1, 0];\na.shift_left([0; 3]);\nassert_eq!(a, [1, 0, 1, 1, 0, 0, 0, 0]);\n\n// Remember you can sub-slice to affect less that the whole slice.\n// For example, this is similar to `.remove(1)` + `.insert(4, 'Z')`\nlet mut a = ['a', 'b', 'c', 'd', 'e', 'f'];\nassert_eq!(a[1..=4].shift_left(['Z']), ['b']);\nassert_eq!(a, ['a', 'c', 'd', 'e', 'Z', 'f']);\n\n// If the size matches it's equivalent to `mem::replace`\nlet mut a = [1, 2, 3];\nassert_eq!(a.shift_left([7, 8, 9]), [1, 2, 3]);\nassert_eq!(a, [7, 8, 9]);\n\n// Some of the \"inserted\" elements end up returned if the slice is too short\nlet mut a = [];\nassert_eq!(a.shift_left([1, 2, 3]), [1, 2, 3]);\nlet mut a = [9];\nassert_eq!(a.shift_left([1, 2, 3]), [9, 1, 2]);\nassert_eq!(a, [3]);
Source

pub const fn shift_right<const N: usize>(&mut self, inserted: [T; N]) -> [T; N]

🔬This is a nightly-only experimental API. (slice_shift)

Moves the elements of this slice N places to the right, returning the ones\nthat “fall off” the back, and putting inserted at the beginning.

\n

Equivalently, you can think of concatenating inserted and self into one\nlong sequence, then returning the right-most N items and the rest into self:

\n
inserted  self (before)\n     vvv  vvvvvvvvvvvvvvv\n     [0]  [5, 6, 7, 8, 9]\n       ↘   ↘  ↘  ↘  ↘   ↘\n          [0, 5, 6, 7, 8]  [9]\n          ^^^^^^^^^^^^^^^  ^^^\n          self (after)     returned
\n

See also Self::shift_left and compare Self::rotate_right.

\n
§Examples
\n
#![feature(slice_shift)]\n\n// Same as the diagram above\nlet mut a = [5, 6, 7, 8, 9];\nlet inserted = [0];\nlet returned = a.shift_right(inserted);\nassert_eq!(returned, [9]);\nassert_eq!(a, [0, 5, 6, 7, 8]);\n\n// The name comes from this operation's similarity to bitshifts\nlet mut a: u8 = 0b10010110;\na >>= 3;\nassert_eq!(a, 0b00010010_u8);\nlet mut a: [_; 8] = [1, 0, 0, 1, 0, 1, 1, 0];\na.shift_right([0; 3]);\nassert_eq!(a, [0, 0, 0, 1, 0, 0, 1, 0]);\n\n// Remember you can sub-slice to affect less that the whole slice.\n// For example, this is similar to `.remove(4)` + `.insert(1, 'Z')`\nlet mut a = ['a', 'b', 'c', 'd', 'e', 'f'];\nassert_eq!(a[1..=4].shift_right(['Z']), ['e']);\nassert_eq!(a, ['a', 'Z', 'b', 'c', 'd', 'f']);\n\n// If the size matches it's equivalent to `mem::replace`\nlet mut a = [1, 2, 3];\nassert_eq!(a.shift_right([7, 8, 9]), [1, 2, 3]);\nassert_eq!(a, [7, 8, 9]);\n\n// Some of the \"inserted\" elements end up returned if the slice is too short\nlet mut a = [];\nassert_eq!(a.shift_right([1, 2, 3]), [1, 2, 3]);\nlet mut a = [9];\nassert_eq!(a.shift_right([1, 2, 3]), [2, 3, 9]);\nassert_eq!(a, [1]);
1.50.0 · Source

pub fn fill(&mut self, value: T)
where\n T: Clone,

Fills self with elements by cloning value.

\n
§Examples
\n
let mut buf = vec![0; 10];\nbuf.fill(1);\nassert_eq!(buf, vec![1; 10]);
1.51.0 · Source

pub fn fill_with<F>(&mut self, f: F)
where\n F: FnMut() -> T,

Fills self with elements returned by calling a closure repeatedly.

\n

This method uses a closure to create new values. If you’d rather\nClone a given value, use fill. If you want to use the Default\ntrait to generate values, you can pass Default::default as the\nargument.

\n
§Examples
\n
let mut buf = vec![1; 10];\nbuf.fill_with(Default::default);\nassert_eq!(buf, vec![0; 10]);
1.7.0 (const: unstable) · Source

pub fn clone_from_slice(&mut self, src: &[T])
where\n T: Clone,

Copies the elements from src into self.

\n

The length of src must be the same as self.

\n
§Panics
\n

This function will panic if the two slices have different lengths.

\n
§Examples
\n

Cloning two elements from a slice into another:

\n\n
let src = [1, 2, 3, 4];\nlet mut dst = [0, 0];\n\n// Because the slices have to be the same length,\n// we slice the source slice from four elements\n// to two. It will panic if we don't do this.\ndst.clone_from_slice(&src[2..]);\n\nassert_eq!(src, [1, 2, 3, 4]);\nassert_eq!(dst, [3, 4]);
\n

Rust enforces that there can only be one mutable reference with no\nimmutable references to a particular piece of data in a particular\nscope. Because of this, attempting to use clone_from_slice on a\nsingle slice will result in a compile failure:

\n\n
ⓘ
let mut slice = [1, 2, 3, 4, 5];\n\nslice[..2].clone_from_slice(&slice[3..]); // compile fail!
\n

To work around this, we can use split_at_mut to create two distinct\nsub-slices from a slice:

\n\n
let mut slice = [1, 2, 3, 4, 5];\n\n{\n    let (left, right) = slice.split_at_mut(2);\n    left.clone_from_slice(&right[1..]);\n}\n\nassert_eq!(slice, [4, 5, 3, 4, 5]);
1.9.0 (const: 1.87.0) · Source

pub const fn copy_from_slice(&mut self, src: &[T])
where\n T: Copy,

Copies all elements from src into self, using a memcpy.

\n

The length of src must be the same as self.

\n

If T does not implement Copy, use clone_from_slice.

\n
§Panics
\n

This function will panic if the two slices have different lengths.

\n
§Examples
\n

Copying two elements from a slice into another:

\n\n
let src = [1, 2, 3, 4];\nlet mut dst = [0, 0];\n\n// Because the slices have to be the same length,\n// we slice the source slice from four elements\n// to two. It will panic if we don't do this.\ndst.copy_from_slice(&src[2..]);\n\nassert_eq!(src, [1, 2, 3, 4]);\nassert_eq!(dst, [3, 4]);
\n

Rust enforces that there can only be one mutable reference with no\nimmutable references to a particular piece of data in a particular\nscope. Because of this, attempting to use copy_from_slice on a\nsingle slice will result in a compile failure:

\n\n
ⓘ
let mut slice = [1, 2, 3, 4, 5];\n\nslice[..2].copy_from_slice(&slice[3..]); // compile fail!
\n

To work around this, we can use split_at_mut to create two distinct\nsub-slices from a slice:

\n\n
let mut slice = [1, 2, 3, 4, 5];\n\n{\n    let (left, right) = slice.split_at_mut(2);\n    left.copy_from_slice(&right[1..]);\n}\n\nassert_eq!(slice, [4, 5, 3, 4, 5]);
1.37.0 · Source

pub fn copy_within<R>(&mut self, src: R, dest: usize)
where\n R: RangeBounds<usize>,\n T: Copy,

Copies elements from one part of the slice to another part of itself,\nusing a memmove.

\n

src is the range within self to copy from. dest is the starting\nindex of the range within self to copy to, which will have the same\nlength as src. The two ranges may overlap. The ends of the two ranges\nmust be less than or equal to self.len().

\n
§Panics
\n

This function will panic if either range exceeds the end of the slice,\nor if the end of src is before the start.

\n
§Examples
\n

Copying four bytes within a slice:

\n\n
let mut bytes = *b\"Hello, World!\";\n\nbytes.copy_within(1..5, 8);\n\nassert_eq!(&bytes, b\"Hello, Wello!\");
1.27.0 (const: unstable) · Source

pub fn swap_with_slice(&mut self, other: &mut [T])

Swaps all elements in self with those in other.

\n

The length of other must be the same as self.

\n
§Panics
\n

This function will panic if the two slices have different lengths.

\n
§Example
\n

Swapping two elements across slices:

\n\n
let mut slice1 = [0, 0];\nlet mut slice2 = [1, 2, 3, 4];\n\nslice1.swap_with_slice(&mut slice2[2..]);\n\nassert_eq!(slice1, [3, 4]);\nassert_eq!(slice2, [1, 2, 0, 0]);
\n

Rust enforces that there can only be one mutable reference to a\nparticular piece of data in a particular scope. Because of this,\nattempting to use swap_with_slice on a single slice will result in\na compile failure:

\n\n
ⓘ
let mut slice = [1, 2, 3, 4, 5];\nslice[..2].swap_with_slice(&mut slice[3..]); // compile fail!
\n

To work around this, we can use split_at_mut to create two distinct\nmutable sub-slices from a slice:

\n\n
let mut slice = [1, 2, 3, 4, 5];\n\n{\n    let (left, right) = slice.split_at_mut(2);\n    left.swap_with_slice(&mut right[1..]);\n}\n\nassert_eq!(slice, [4, 5, 3, 1, 2]);
1.30.0 · Source

pub unsafe fn align_to<U>(&self) -> (&[T], &[U], &[T])

Transmutes the slice to a slice of another type, ensuring alignment of the types is\nmaintained.

\n

This method splits the slice into three distinct slices: prefix, correctly aligned middle\nslice of a new type, and the suffix slice. The middle part will be as big as possible under\nthe given alignment constraint and element size.

\n

This method has no purpose when either input element T or output element U are\nzero-sized and will return the original slice without splitting anything.

\n
§Safety
\n

This method is essentially a transmute with respect to the elements in the returned\nmiddle slice, so all the usual caveats pertaining to transmute::<T, U> also apply here.

\n
§Examples
\n

Basic usage:

\n\n
unsafe {\n    let bytes: [u8; 7] = [1, 2, 3, 4, 5, 6, 7];\n    let (prefix, shorts, suffix) = bytes.align_to::<u16>();\n    // less_efficient_algorithm_for_bytes(prefix);\n    // more_efficient_algorithm_for_aligned_shorts(shorts);\n    // less_efficient_algorithm_for_bytes(suffix);\n}
1.30.0 · Source

pub unsafe fn align_to_mut<U>(&mut self) -> (&mut [T], &mut [U], &mut [T])

Transmutes the mutable slice to a mutable slice of another type, ensuring alignment of the\ntypes is maintained.

\n

This method splits the slice into three distinct slices: prefix, correctly aligned middle\nslice of a new type, and the suffix slice. The middle part will be as big as possible under\nthe given alignment constraint and element size.

\n

This method has no purpose when either input element T or output element U are\nzero-sized and will return the original slice without splitting anything.

\n
§Safety
\n

This method is essentially a transmute with respect to the elements in the returned\nmiddle slice, so all the usual caveats pertaining to transmute::<T, U> also apply here.

\n
§Examples
\n

Basic usage:

\n\n
unsafe {\n    let mut bytes: [u8; 7] = [1, 2, 3, 4, 5, 6, 7];\n    let (prefix, shorts, suffix) = bytes.align_to_mut::<u16>();\n    // less_efficient_algorithm_for_bytes(prefix);\n    // more_efficient_algorithm_for_aligned_shorts(shorts);\n    // less_efficient_algorithm_for_bytes(suffix);\n}
Source

pub fn as_simd<const LANES: usize>(&self) -> (&[T], &[Simd<T, LANES>], &[T])
where\n Simd<T, LANES>: AsRef<[T; LANES]>,\n T: SimdElement,

🔬This is a nightly-only experimental API. (portable_simd)

Splits a slice into a prefix, a middle of aligned SIMD types, and a suffix.

\n

This is a safe wrapper around slice::align_to, so inherits the same\nguarantees as that method.

\n
§Panics
\n

This will panic if the size of the SIMD type is different from\nLANES times that of the scalar.

\n

At the time of writing, the trait restrictions on Simd<T, LANES> keeps\nthat from ever happening, as only power-of-two numbers of lanes are\nsupported. It’s possible that, in the future, those restrictions might\nbe lifted in a way that would make it possible to see panics from this\nmethod for something like LANES == 3.

\n
§Examples
\n
#![feature(portable_simd)]\nuse core::simd::prelude::*;\n\nlet short = &[1, 2, 3];\nlet (prefix, middle, suffix) = short.as_simd::<4>();\nassert_eq!(middle, []); // Not enough elements for anything in the middle\n\n// They might be split in any possible way between prefix and suffix\nlet it = prefix.iter().chain(suffix).copied();\nassert_eq!(it.collect::<Vec<_>>(), vec![1, 2, 3]);\n\nfn basic_simd_sum(x: &[f32]) -> f32 {\n    use std::ops::Add;\n    let (prefix, middle, suffix) = x.as_simd();\n    let sums = f32x4::from_array([\n        prefix.iter().copied().sum(),\n        0.0,\n        0.0,\n        suffix.iter().copied().sum(),\n    ]);\n    let sums = middle.iter().copied().fold(sums, f32x4::add);\n    sums.reduce_sum()\n}\n\nlet numbers: Vec<f32> = (1..101).map(|x| x as _).collect();\nassert_eq!(basic_simd_sum(&numbers[1..99]), 4949.0);
Source

pub fn as_simd_mut<const LANES: usize>(\n &mut self,\n) -> (&mut [T], &mut [Simd<T, LANES>], &mut [T])
where\n Simd<T, LANES>: AsMut<[T; LANES]>,\n T: SimdElement,

🔬This is a nightly-only experimental API. (portable_simd)

Splits a mutable slice into a mutable prefix, a middle of aligned SIMD types,\nand a mutable suffix.

\n

This is a safe wrapper around slice::align_to_mut, so inherits the same\nguarantees as that method.

\n

This is the mutable version of slice::as_simd; see that for examples.

\n
§Panics
\n

This will panic if the size of the SIMD type is different from\nLANES times that of the scalar.

\n

At the time of writing, the trait restrictions on Simd<T, LANES> keeps\nthat from ever happening, as only power-of-two numbers of lanes are\nsupported. It’s possible that, in the future, those restrictions might\nbe lifted in a way that would make it possible to see panics from this\nmethod for something like LANES == 3.

\n
1.82.0 · Source

pub fn is_sorted(&self) -> bool
where\n T: PartialOrd,

Checks if the elements of this slice are sorted.

\n

That is, for each element a and its following element b, a <= b must hold. If the\nslice yields exactly zero or one element, true is returned.

\n

Note that if Self::Item is only PartialOrd, but not Ord, the above definition\nimplies that this function returns false if any two consecutive items are not\ncomparable.

\n
§Examples
\n
let empty: [i32; 0] = [];\n\nassert!([1, 2, 2, 9].is_sorted());\nassert!(![1, 3, 2, 4].is_sorted());\nassert!([0].is_sorted());\nassert!(empty.is_sorted());\nassert!(![0.0, 1.0, f32::NAN].is_sorted());
1.82.0 · Source

pub fn is_sorted_by<'a, F>(&'a self, compare: F) -> bool
where\n F: FnMut(&'a T, &'a T) -> bool,

Checks if the elements of this slice are sorted using the given comparator function.

\n

Instead of using PartialOrd::partial_cmp, this function uses the given compare\nfunction to determine whether two elements are to be considered in sorted order.

\n
§Examples
\n
assert!([1, 2, 2, 9].is_sorted_by(|a, b| a <= b));\nassert!(![1, 2, 2, 9].is_sorted_by(|a, b| a < b));\n\nassert!([0].is_sorted_by(|a, b| true));\nassert!([0].is_sorted_by(|a, b| false));\n\nlet empty: [i32; 0] = [];\nassert!(empty.is_sorted_by(|a, b| false));\nassert!(empty.is_sorted_by(|a, b| true));
1.82.0 · Source

pub fn is_sorted_by_key<'a, F, K>(&'a self, f: F) -> bool
where\n F: FnMut(&'a T) -> K,\n K: PartialOrd,

Checks if the elements of this slice are sorted using the given key extraction function.

\n

Instead of comparing the slice’s elements directly, this function compares the keys of the\nelements, as determined by f. Apart from that, it’s equivalent to is_sorted; see its\ndocumentation for more information.

\n
§Examples
\n
assert!([\"c\", \"bb\", \"aaa\"].is_sorted_by_key(|s| s.len()));\nassert!(![-2i32, -1, 0, 3].is_sorted_by_key(|n| n.abs()));
1.52.0 · Source

pub fn partition_point<P>(&self, pred: P) -> usize
where\n P: FnMut(&T) -> bool,

Returns the index of the partition point according to the given predicate\n(the index of the first element of the second partition).

\n

The slice is assumed to be partitioned according to the given predicate.\nThis means that all elements for which the predicate returns true are at the start of the slice\nand all elements for which the predicate returns false are at the end.\nFor example, [7, 15, 3, 5, 4, 12, 6] is partitioned under the predicate x % 2 != 0\n(all odd numbers are at the start, all even at the end).

\n

If this slice is not partitioned, the returned result is unspecified and meaningless,\nas this method performs a kind of binary search.

\n

See also binary_search, binary_search_by, and binary_search_by_key.

\n
§Examples
\n
let v = [1, 2, 3, 3, 5, 6, 7];\nlet i = v.partition_point(|&x| x < 5);\n\nassert_eq!(i, 4);\nassert!(v[..i].iter().all(|&x| x < 5));\nassert!(v[i..].iter().all(|&x| !(x < 5)));
\n

If all elements of the slice match the predicate, including if the slice\nis empty, then the length of the slice will be returned:

\n\n
let a = [2, 4, 8];\nassert_eq!(a.partition_point(|x| x < &100), a.len());\nlet a: [i32; 0] = [];\nassert_eq!(a.partition_point(|x| x < &100), 0);
\n

If you want to insert an item to a sorted vector, while maintaining\nsort order:

\n\n
let mut s = vec![0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];\nlet num = 42;\nlet idx = s.partition_point(|&x| x <= num);\ns.insert(idx, num);\nassert_eq!(s, [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 42, 55]);
1.87.0 · Source

pub fn split_off<'a, R>(self: &mut &'a [T], range: R) -> Option<&'a [T]>
where\n R: OneSidedRange<usize>,

Removes the subslice corresponding to the given range\nand returns a reference to it.

\n

Returns None and does not modify the slice if the given\nrange is out of bounds.

\n

Note that this method only accepts one-sided ranges such as\n2.. or ..6, but not 2..6.

\n
§Examples
\n

Splitting off the first three elements of a slice:

\n\n
let mut slice: &[_] = &['a', 'b', 'c', 'd'];\nlet mut first_three = slice.split_off(..3).unwrap();\n\nassert_eq!(slice, &['d']);\nassert_eq!(first_three, &['a', 'b', 'c']);
\n

Splitting off a slice starting with the third element:

\n\n
let mut slice: &[_] = &['a', 'b', 'c', 'd'];\nlet mut tail = slice.split_off(2..).unwrap();\n\nassert_eq!(slice, &['a', 'b']);\nassert_eq!(tail, &['c', 'd']);
\n

Getting None when range is out of bounds:

\n\n
let mut slice: &[_] = &['a', 'b', 'c', 'd'];\n\nassert_eq!(None, slice.split_off(5..));\nassert_eq!(None, slice.split_off(..5));\nassert_eq!(None, slice.split_off(..=4));\nlet expected: &[char] = &['a', 'b', 'c', 'd'];\nassert_eq!(Some(expected), slice.split_off(..4));
1.87.0 · Source

pub fn split_off_mut<'a, R>(\n self: &mut &'a mut [T],\n range: R,\n) -> Option<&'a mut [T]>
where\n R: OneSidedRange<usize>,

Removes the subslice corresponding to the given range\nand returns a mutable reference to it.

\n

Returns None and does not modify the slice if the given\nrange is out of bounds.

\n

Note that this method only accepts one-sided ranges such as\n2.. or ..6, but not 2..6.

\n
§Examples
\n

Splitting off the first three elements of a slice:

\n\n
let mut slice: &mut [_] = &mut ['a', 'b', 'c', 'd'];\nlet mut first_three = slice.split_off_mut(..3).unwrap();\n\nassert_eq!(slice, &mut ['d']);\nassert_eq!(first_three, &mut ['a', 'b', 'c']);
\n

Splitting off a slice starting with the third element:

\n\n
let mut slice: &mut [_] = &mut ['a', 'b', 'c', 'd'];\nlet mut tail = slice.split_off_mut(2..).unwrap();\n\nassert_eq!(slice, &mut ['a', 'b']);\nassert_eq!(tail, &mut ['c', 'd']);
\n

Getting None when range is out of bounds:

\n\n
let mut slice: &mut [_] = &mut ['a', 'b', 'c', 'd'];\n\nassert_eq!(None, slice.split_off_mut(5..));\nassert_eq!(None, slice.split_off_mut(..5));\nassert_eq!(None, slice.split_off_mut(..=4));\nlet expected: &mut [_] = &mut ['a', 'b', 'c', 'd'];\nassert_eq!(Some(expected), slice.split_off_mut(..4));
1.87.0 (const: unstable) · Source

pub fn split_off_first<'a>(self: &mut &'a [T]) -> Option<&'a T>

Removes the first element of the slice and returns a reference\nto it.

\n

Returns None if the slice is empty.

\n
§Examples
\n
let mut slice: &[_] = &['a', 'b', 'c'];\nlet first = slice.split_off_first().unwrap();\n\nassert_eq!(slice, &['b', 'c']);\nassert_eq!(first, &'a');
1.87.0 (const: unstable) · Source

pub fn split_off_first_mut<'a>(self: &mut &'a mut [T]) -> Option<&'a mut T>

Removes the first element of the slice and returns a mutable\nreference to it.

\n

Returns None if the slice is empty.

\n
§Examples
\n
let mut slice: &mut [_] = &mut ['a', 'b', 'c'];\nlet first = slice.split_off_first_mut().unwrap();\n*first = 'd';\n\nassert_eq!(slice, &['b', 'c']);\nassert_eq!(first, &'d');
1.87.0 (const: unstable) · Source

pub fn split_off_last<'a>(self: &mut &'a [T]) -> Option<&'a T>

Removes the last element of the slice and returns a reference\nto it.

\n

Returns None if the slice is empty.

\n
§Examples
\n
let mut slice: &[_] = &['a', 'b', 'c'];\nlet last = slice.split_off_last().unwrap();\n\nassert_eq!(slice, &['a', 'b']);\nassert_eq!(last, &'c');
1.87.0 (const: unstable) · Source

pub fn split_off_last_mut<'a>(self: &mut &'a mut [T]) -> Option<&'a mut T>

Removes the last element of the slice and returns a mutable\nreference to it.

\n

Returns None if the slice is empty.

\n
§Examples
\n
let mut slice: &mut [_] = &mut ['a', 'b', 'c'];\nlet last = slice.split_off_last_mut().unwrap();\n*last = 'd';\n\nassert_eq!(slice, &['a', 'b']);\nassert_eq!(last, &'d');
1.86.0 · Source

pub unsafe fn get_disjoint_unchecked_mut<I, const N: usize>(\n &mut self,\n indices: [I; N],\n) -> [&mut <I as SliceIndex<[T]>>::Output; N]

Returns mutable references to many indices at once, without doing any checks.

\n

An index can be either a usize, a Range or a RangeInclusive. Note\nthat this method takes an array, so all indices must be of the same type.\nIf passed an array of usizes this method gives back an array of mutable references\nto single elements, while if passed an array of ranges it gives back an array of\nmutable references to slices.

\n

For a safe alternative see get_disjoint_mut.

\n
§Safety
\n

Calling this method with overlapping or out-of-bounds indices is undefined behavior\neven if the resulting references are not used.

\n
§Examples
\n
let x = &mut [1, 2, 4];\n\nunsafe {\n    let [a, b] = x.get_disjoint_unchecked_mut([0, 2]);\n    *a *= 10;\n    *b *= 100;\n}\nassert_eq!(x, &[10, 2, 400]);\n\nunsafe {\n    let [a, b] = x.get_disjoint_unchecked_mut([0..1, 1..3]);\n    a[0] = 8;\n    b[0] = 88;\n    b[1] = 888;\n}\nassert_eq!(x, &[8, 88, 888]);\n\nunsafe {\n    let [a, b] = x.get_disjoint_unchecked_mut([1..=2, 0..=0]);\n    a[0] = 11;\n    a[1] = 111;\n    b[0] = 1;\n}\nassert_eq!(x, &[1, 11, 111]);
1.86.0 · Source

pub fn get_disjoint_mut<I, const N: usize>(\n &mut self,\n indices: [I; N],\n) -> Result<[&mut <I as SliceIndex<[T]>>::Output; N], GetDisjointMutError>

Returns mutable references to many indices at once.

\n

An index can be either a usize, a Range or a RangeInclusive. Note\nthat this method takes an array, so all indices must be of the same type.\nIf passed an array of usizes this method gives back an array of mutable references\nto single elements, while if passed an array of ranges it gives back an array of\nmutable references to slices.

\n

Returns an error if any index is out-of-bounds, or if there are overlapping indices.\nAn empty range is not considered to overlap if it is located at the beginning or at\nthe end of another range, but is considered to overlap if it is located in the middle.

\n

This method does a O(n^2) check to check that there are no overlapping indices, so be careful\nwhen passing many indices.

\n
§Examples
\n
let v = &mut [1, 2, 3];\nif let Ok([a, b]) = v.get_disjoint_mut([0, 2]) {\n    *a = 413;\n    *b = 612;\n}\nassert_eq!(v, &[413, 2, 612]);\n\nif let Ok([a, b]) = v.get_disjoint_mut([0..1, 1..3]) {\n    a[0] = 8;\n    b[0] = 88;\n    b[1] = 888;\n}\nassert_eq!(v, &[8, 88, 888]);\n\nif let Ok([a, b]) = v.get_disjoint_mut([1..=2, 0..=0]) {\n    a[0] = 11;\n    a[1] = 111;\n    b[0] = 1;\n}\nassert_eq!(v, &[1, 11, 111]);
1.94.0 · Source

pub fn element_offset(&self, element: &T) -> Option<usize>

Returns the index that an element reference points to.

\n

Returns None if element does not point to the start of an element within the slice.

\n

This method is useful for extending slice iterators like slice::split.

\n

Note that this uses pointer arithmetic and does not compare elements.\nTo find the index of an element via comparison, use\n.iter().position() instead.

\n
§Panics
\n

Panics if T is zero-sized.

\n
§Examples
\n

Basic usage:

\n\n
let nums: &[u32] = &[1, 7, 1, 1];\nlet num = &nums[2];\n\nassert_eq!(num, &1);\nassert_eq!(nums.element_offset(num), Some(2));
\n

Returning None with an unaligned element:

\n\n
let arr: &[[u32; 2]] = &[[0, 1], [2, 3]];\nlet flat_arr: &[u32] = arr.as_flattened();\n\nlet ok_elm: &[u32; 2] = flat_arr[0..2].try_into().unwrap();\nlet weird_elm: &[u32; 2] = flat_arr[1..3].try_into().unwrap();\n\nassert_eq!(ok_elm, &[0, 1]);\nassert_eq!(weird_elm, &[1, 2]);\n\nassert_eq!(arr.element_offset(ok_elm), Some(0)); // Points to element 0\nassert_eq!(arr.element_offset(weird_elm), None); // Points between element 0 and 1
1.98.0 · Source

pub fn subslice_range(&self, subslice: &[T]) -> Option<Range<usize>>

Returns the range of indices that a subslice points to.

\n

Returns None if subslice does not point within the slice or if it is not aligned with the\nelements in the slice.

\n

This method does not compare elements. Instead, this method finds the location in the slice that\nsubslice was obtained from. To find the index of a subslice via comparison, instead use\n.windows().position().

\n

This method is useful for extending slice iterators like slice::split.

\n

Note that this may return a false positive (either Some(0..0) or Some(self.len()..self.len()))\nif subslice has a length of zero and points to the beginning or end of another, separate, slice.

\n
§Panics
\n

Panics if T is zero-sized.

\n
§Examples
\n

Basic usage:

\n\n
use core::range::Range;\n\nlet nums = &[0, 5, 10, 0, 0, 5];\n\nlet mut iter = nums\n    .split(|t| *t == 0)\n    .map(|n| nums.subslice_range(n).unwrap());\n\nassert_eq!(iter.next(), Some(Range { start: 0, end: 0 }));\nassert_eq!(iter.next(), Some(Range { start: 1, end: 3 }));\nassert_eq!(iter.next(), Some(Range { start: 4, end: 4 }));\nassert_eq!(iter.next(), Some(Range { start: 5, end: 6 }));
Source

pub const fn as_slice(&self) -> &[T]

🔬This is a nightly-only experimental API. (str_as_str)

Returns the same slice &[T].

\n

This method is redundant when used directly on &[T], but\nit helps dereferencing other “container” types to slices,\nfor example Box<[T]> or Arc<[T]>.

\n
Source

pub const fn as_mut_slice(&mut self) -> &mut [T]

🔬This is a nightly-only experimental API. (str_as_str)

Returns the same slice &mut [T].

\n

This method is redundant when used directly on &mut [T], but\nit helps dereferencing other “container” types to slices,\nfor example Box<[T]> or MutexGuard<[T]>.

\n
",0,"promql::range_eval::histogram::Histograms"],["
1.0.0 (const: unstable) · Source§

impl<T> AsMut<[T]> for [T]

Source§

fn as_mut(&mut self) -> &mut [T]

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut<[T]>","promql::range_eval::histogram::Histograms"],["
1.0.0 (const: unstable) · Source§

impl<T> AsRef<[T]> for [T]

Source§

fn as_ref(&self) -> &[T]

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef<[T]>","promql::range_eval::histogram::Histograms"],["
§

impl<T> BitView for [T]
where\n T: BitStore,

Available on non-tarpaulin_include only.

Note that overly-large slices may cause the conversions to fail.

\n
§

type Store = T

The underlying element type.
§

fn view_bits<O>(&self) -> &BitSlice<T, O> ⓘ
where\n O: BitOrder,

Views a memory region as an immutable bit-slice.
§

fn try_view_bits<O>(&self) -> Result<&BitSlice<T, O>, BitSpanError<T>>
where\n O: BitOrder,

Attempts to view a memory region as an immutable bit-slice. Read more
§

fn view_bits_mut<O>(&mut self) -> &mut BitSlice<T, O> ⓘ
where\n O: BitOrder,

Views a memory region as a mutable bit-slice.
§

fn try_view_bits_mut<O>(\n &mut self,\n) -> Result<&mut BitSlice<T, O>, BitSpanError<T>>
where\n O: BitOrder,

Attempts to view a memory region as a mutable bit-slice. Read more
","BitView","promql::range_eval::histogram::Histograms"],["
Source§

impl<T> CloneToUninit for [T]
where\n T: Clone,

Source§

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

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
","CloneToUninit","promql::range_eval::histogram::Histograms"],["
Source§

impl<T, V> Concat<T> for [V]
where\n T: Clone,\n V: Borrow<[T]>,

Available on non-no_global_oom_handling only.
Source§

type Output = Vec<T>

🔬This is a nightly-only experimental API. (slice_concat_trait)
The resulting type after concatenation
Source§

fn concat(slice: &[V]) -> Vec<T>

🔬This is a nightly-only experimental API. (slice_concat_trait)
Implementation of [T]::concat
","Concat","promql::range_eval::histogram::Histograms"],["
Source§

impl<S> Concat<str> for [S]
where\n S: Borrow<str>,

Available on non-no_global_oom_handling only.

Note: str in Concat<str> is not meaningful here.\nThis type parameter of the trait only exists to enable another impl.

\n
Source§

type Output = String

🔬This is a nightly-only experimental API. (slice_concat_trait)
The resulting type after concatenation
Source§

fn concat(slice: &[S]) -> String

🔬This is a nightly-only experimental API. (slice_concat_trait)
Implementation of [T]::concat
","Concat","promql::range_eval::histogram::Histograms"],["
Source§

impl<T> ConstantTimeEq for [T]
where\n T: ConstantTimeEq,

Source§

fn ct_eq(&self, _rhs: &[T]) -> Choice

Check whether two slices of ConstantTimeEq types are equal.

\n
§Note
\n

This function short-circuits if the lengths of the input slices\nare different. Otherwise, it should execute in time independent\nof the slice contents.

\n

Since arrays coerce to slices, this function works with fixed-size arrays:

\n\n
let a: [u8; 8] = [0,1,2,3,4,5,6,7];\nlet b: [u8; 8] = [0,1,2,3,0,1,2,3];\n\nlet a_eq_a = a.ct_eq(&a);\nlet a_eq_b = a.ct_eq(&b);\n\nassert_eq!(a_eq_a.unwrap_u8(), 1);\nassert_eq!(a_eq_b.unwrap_u8(), 0);
Source§

fn ct_ne(&self, other: &Self) -> Choice

Determine if two items are NOT equal. Read more
","ConstantTimeEq","promql::range_eval::histogram::Histograms"],["
§

impl<T> CtAssign for [T]
where\n T: CtAssignSlice,

§

fn ct_assign(&mut self, src: &[T], choice: Choice)

Conditionally assign src to self if choice is [Choice::TRUE].
","CtAssign","promql::range_eval::histogram::Histograms"],["
§

impl<T> CtEq for [T]
where\n T: CtEqSlice,

§

fn ct_eq(&self, other: &[T]) -> Choice

Determine if self is equal to other in constant-time.
§

fn ct_ne(&self, other: &[T]) -> Choice

Determine if self is NOT equal to other in constant-time.
","CtEq","promql::range_eval::histogram::Histograms"],["
§

impl<T> CtFind<T> for [T]
where\n T: CtAssign + Default,

§

fn ct_find<P>(&self, predicate: P) -> CtOption<T>
where\n P: Fn(&T) -> Choice,

Iterate through every T item in &self, applying the given predicate which can select\na specific item by returning [Choice::TRUE]. Read more
","CtFind","promql::range_eval::histogram::Histograms"],["
§

impl<T, Idx> CtLookup<Idx> for [T]
where\n T: CtAssign + Default,\n Idx: AddAssign + CtEq + Default + From<u8>,

§

type Output = T

Output type returned by the lookup operation.
§

fn ct_lookup(&self, index: Idx) -> CtOption<T>

Attempt to retrieve the item at the given index, either returning it or the [CtOption]\nequivalent of None if the index was out-of-bounds.
","CtLookup","promql::range_eval::histogram::Histograms"],["
1.0.0 · Source§

impl<T> Debug for [T]
where\n T: Debug,

Source§

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

Formats the value using the given formatter. Read more
","Debug","promql::range_eval::histogram::Histograms"],["
§

impl<T> FromBytes for [T]
where\n T: FromBytes,

§

fn ref_from_bytes(\n source: &[u8],\n) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>
where\n Self: KnownLayout + Immutable,

Interprets the given source as a &Self. Read more
§

fn ref_from_prefix(\n source: &[u8],\n) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>
where\n Self: KnownLayout + Immutable,

Interprets the prefix of the given source as a &Self without\ncopying. Read more
§

fn ref_from_suffix(\n source: &[u8],\n) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>
where\n Self: Immutable + KnownLayout,

Interprets the suffix of the given bytes as a &Self. Read more
§

fn mut_from_bytes(\n source: &mut [u8],\n) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>
where\n Self: IntoBytes + KnownLayout,

Interprets the given source as a &mut Self. Read more
§

fn mut_from_prefix(\n source: &mut [u8],\n) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>
where\n Self: IntoBytes + KnownLayout,

Interprets the prefix of the given source as a &mut Self without\ncopying. Read more
§

fn mut_from_suffix(\n source: &mut [u8],\n) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>
where\n Self: IntoBytes + KnownLayout,

Interprets the suffix of the given source as a &mut Self without\ncopying. Read more
§

fn ref_from_bytes_with_elems(\n source: &[u8],\n count: usize,\n) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>
where\n Self: KnownLayout<PointerMetadata = usize> + Immutable,

Interprets the given source as a &Self with a DST length equal to\ncount. Read more
§

fn ref_from_prefix_with_elems(\n source: &[u8],\n count: usize,\n) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>
where\n Self: KnownLayout<PointerMetadata = usize> + Immutable,

Interprets the prefix of the given source as a DST &Self with length\nequal to count. Read more
§

fn ref_from_suffix_with_elems(\n source: &[u8],\n count: usize,\n) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>
where\n Self: KnownLayout<PointerMetadata = usize> + Immutable,

Interprets the suffix of the given source as a DST &Self with length\nequal to count. Read more
§

fn mut_from_bytes_with_elems(\n source: &mut [u8],\n count: usize,\n) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>
where\n Self: IntoBytes + KnownLayout<PointerMetadata = usize> + Immutable,

Interprets the given source as a &mut Self with a DST length equal\nto count. Read more
§

fn mut_from_prefix_with_elems(\n source: &mut [u8],\n count: usize,\n) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>
where\n Self: IntoBytes + KnownLayout<PointerMetadata = usize>,

Interprets the prefix of the given source as a &mut Self with DST\nlength equal to count. Read more
§

fn mut_from_suffix_with_elems(\n source: &mut [u8],\n count: usize,\n) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>
where\n Self: IntoBytes + KnownLayout<PointerMetadata = usize>,

Interprets the suffix of the given source as a &mut Self with DST\nlength equal to count. Read more
","FromBytes","promql::range_eval::histogram::Histograms"],["
§

impl<T> FromZeros for [T]
where\n T: FromZeros,

§

fn zero(&mut self)

Overwrites self with zeros. Read more
","FromZeros","promql::range_eval::histogram::Histograms"],["
1.0.0 · Source§

impl<T> Hash for [T]
where\n T: Hash,

Source§

fn hash<H>(&self, state: &mut H)
where\n H: Hasher,

Feeds this value into the given Hasher. Read more
","Hash","promql::range_eval::histogram::Histograms"],["
1.0.0 (const: unstable) · Source§

impl<T, I> Index<I> for [T]
where\n I: SliceIndex<[T]>,

Source§

type Output = <I as SliceIndex<[T]>>::Output

The returned type after indexing.
Source§

fn index(&self, index: I) -> &<I as SliceIndex<[T]>>::Output

Performs the indexing (container[index]) operation. Read more
","Index","promql::range_eval::histogram::Histograms"],["
§

impl<T> Index<PatternID> for [T]

§

type Output = T

The returned type after indexing.
§

fn index(&self, index: PatternID) -> &T

Performs the indexing (container[index]) operation. Read more
","Index","promql::range_eval::histogram::Histograms"],["
§

impl<T> Index<PatternID> for [T]

§

type Output = T

The returned type after indexing.
§

fn index(&self, index: PatternID) -> &T

Performs the indexing (container[index]) operation. Read more
","Index","promql::range_eval::histogram::Histograms"],["
§

impl<T> Index<ReverseIndex> for [T]

§

type Output = T

The returned type after indexing.
§

fn index(&self, index: ReverseIndex) -> &<[T] as Index<ReverseIndex>>::Output ⓘ

Performs the indexing (container[index]) operation. Read more
","Index","promql::range_eval::histogram::Histograms"],["
§

impl<T> Index<ReverseIndexRange> for [T]

§

type Output = [T]

The returned type after indexing.
§

fn index(\n &self,\n index: ReverseIndexRange,\n) -> &<[T] as Index<ReverseIndexRange>>::Output ⓘ

Performs the indexing (container[index]) operation. Read more
","Index","promql::range_eval::histogram::Histograms"],["
§

impl<T> Index<SmallIndex> for [T]

§

type Output = T

The returned type after indexing.
§

fn index(&self, index: SmallIndex) -> &T

Performs the indexing (container[index]) operation. Read more
","Index","promql::range_eval::histogram::Histograms"],["
§

impl<T> Index<SmallIndex> for [T]

§

type Output = T

The returned type after indexing.
§

fn index(&self, index: SmallIndex) -> &T

Performs the indexing (container[index]) operation. Read more
","Index","promql::range_eval::histogram::Histograms"],["
§

impl<T> Index<StateID> for [T]

§

type Output = T

The returned type after indexing.
§

fn index(&self, index: StateID) -> &T

Performs the indexing (container[index]) operation. Read more
","Index","promql::range_eval::histogram::Histograms"],["
§

impl<T> Index<StateID> for [T]

§

type Output = T

The returned type after indexing.
§

fn index(&self, index: StateID) -> &T

Performs the indexing (container[index]) operation. Read more
","Index","promql::range_eval::histogram::Histograms"],["
1.0.0 (const: unstable) · Source§

impl<T, I> IndexMut<I> for [T]
where\n I: SliceIndex<[T]>,

Source§

fn index_mut(&mut self, index: I) -> &mut <I as SliceIndex<[T]>>::Output

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","promql::range_eval::histogram::Histograms"],["
§

impl<T> IndexMut<PatternID> for [T]

§

fn index_mut(&mut self, index: PatternID) -> &mut T

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","promql::range_eval::histogram::Histograms"],["
§

impl<T> IndexMut<PatternID> for [T]

§

fn index_mut(&mut self, index: PatternID) -> &mut T

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","promql::range_eval::histogram::Histograms"],["
§

impl<T> IndexMut<ReverseIndex> for [T]

§

fn index_mut(\n &mut self,\n index: ReverseIndex,\n) -> &mut <[T] as Index<ReverseIndex>>::Output ⓘ

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","promql::range_eval::histogram::Histograms"],["
§

impl<T> IndexMut<ReverseIndexRange> for [T]

§

fn index_mut(\n &mut self,\n index: ReverseIndexRange,\n) -> &mut <[T] as Index<ReverseIndexRange>>::Output ⓘ

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","promql::range_eval::histogram::Histograms"],["
§

impl<T> IndexMut<SmallIndex> for [T]

§

fn index_mut(&mut self, index: SmallIndex) -> &mut T

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","promql::range_eval::histogram::Histograms"],["
§

impl<T> IndexMut<SmallIndex> for [T]

§

fn index_mut(&mut self, index: SmallIndex) -> &mut T

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","promql::range_eval::histogram::Histograms"],["
§

impl<T> IndexMut<StateID> for [T]

§

fn index_mut(&mut self, index: StateID) -> &mut T

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","promql::range_eval::histogram::Histograms"],["
§

impl<T> IndexMut<StateID> for [T]

§

fn index_mut(&mut self, index: StateID) -> &mut T

Performs the mutable indexing (container[index]) operation. Read more
","IndexMut","promql::range_eval::histogram::Histograms"],["
Source§

impl<T> IndexedRandom for [T]

Source§

fn len(&self) -> usize

The length
Source§

fn is_empty(&self) -> bool

True when the length is zero
Source§

fn choose<R>(&self, rng: &mut R) -> Option<&Self::Output>
where\n R: Rng + ?Sized,

Uniformly sample one element Read more
Source§

fn choose_multiple<R>(\n &self,\n rng: &mut R,\n amount: usize,\n) -> SliceChooseIter<'_, Self, Self::Output>
where\n Self::Output: Sized,\n R: Rng + ?Sized,

Uniformly sample amount distinct elements from self Read more
Source§

fn choose_multiple_array<R, const N: usize>(\n &self,\n rng: &mut R,\n) -> Option<[Self::Output; N]>
where\n Self::Output: Sized + Clone,\n R: Rng + ?Sized,

Uniformly sample a fixed-size array of distinct elements from self Read more
Source§

fn choose_weighted<R, F, B, X>(\n &self,\n rng: &mut R,\n weight: F,\n) -> Result<&Self::Output, Error>
where\n R: Rng + ?Sized,\n F: Fn(&Self::Output) -> B,\n B: SampleBorrow<X>,\n X: SampleUniform + Weight + PartialOrd,

Biased sampling for one element Read more
Source§

fn choose_multiple_weighted<R, F, X>(\n &self,\n rng: &mut R,\n amount: usize,\n weight: F,\n) -> Result<SliceChooseIter<'_, Self, Self::Output>, Error>
where\n Self::Output: Sized,\n R: Rng + ?Sized,\n F: Fn(&Self::Output) -> X,\n X: Into<f64>,

Biased sampling of amount distinct elements Read more
","IndexedRandom","promql::range_eval::histogram::Histograms"],["
§

impl<T> IndexedRandom for [T]

§

fn len(&self) -> usize

The length
§

fn is_empty(&self) -> bool

True when the length is zero
§

fn choose<R>(&self, rng: &mut R) -> Option<&Self::Output>
where\n R: Rng + ?Sized,

Uniformly sample one element Read more
§

fn choose_iter<R>(\n &self,\n rng: &mut R,\n) -> Option<impl Iterator<Item = &Self::Output>>
where\n R: Rng + ?Sized,

Return an iterator which samples from self with replacement Read more
§

fn sample<R>(\n &self,\n rng: &mut R,\n amount: usize,\n) -> IndexedSamples<'_, Self, Self::Output>
where\n Self::Output: Sized,\n R: Rng + ?Sized,

Uniformly sample amount distinct elements from self Read more
§

fn sample_array<R, const N: usize>(\n &self,\n rng: &mut R,\n) -> Option<[Self::Output; N]>
where\n Self::Output: Sized + Clone,\n R: Rng + ?Sized,

Uniformly sample a fixed-size array of distinct elements from self Read more
§

fn choose_weighted<R, F, B, X>(\n &self,\n rng: &mut R,\n weight: F,\n) -> Result<&Self::Output, Error>
where\n R: Rng + ?Sized,\n F: Fn(&Self::Output) -> B,\n B: SampleBorrow<X>,\n X: SampleUniform + Weight + PartialOrd,

Biased sampling for one element Read more
§

fn choose_weighted_iter<R, F, B, X>(\n &self,\n rng: &mut R,\n weight: F,\n) -> Result<impl Iterator<Item = &Self::Output>, Error>
where\n R: Rng + ?Sized,\n F: Fn(&Self::Output) -> B,\n B: SampleBorrow<X>,\n X: SampleUniform + Weight + PartialOrd,

Biased sampling with replacement Read more
§

fn sample_weighted<R, F, X>(\n &self,\n rng: &mut R,\n amount: usize,\n weight: F,\n) -> Result<IndexedSamples<'_, Self, Self::Output>, Error>
where\n Self::Output: Sized,\n R: Rng + ?Sized,\n F: Fn(&Self::Output) -> X,\n X: Into<f64>,

Biased sampling of amount distinct elements Read more
§

fn choose_multiple<R>(\n &self,\n rng: &mut R,\n amount: usize,\n) -> IndexedSamples<'_, Self, Self::Output>
where\n Self::Output: Sized,\n R: Rng + ?Sized,

👎Deprecated since 0.10.0:

Renamed to sample

\n
Deprecated: use [Self::sample] instead
§

fn choose_multiple_array<R, const N: usize>(\n &self,\n rng: &mut R,\n) -> Option<[Self::Output; N]>
where\n Self::Output: Sized + Clone,\n R: Rng + ?Sized,

👎Deprecated since 0.10.0:

Renamed to sample_array

\n
Deprecated: use [Self::sample_array] instead
§

fn choose_multiple_weighted<R, F, X>(\n &self,\n rng: &mut R,\n amount: usize,\n weight: F,\n) -> Result<IndexedSamples<'_, Self, Self::Output>, Error>
where\n Self::Output: Sized,\n R: Rng + ?Sized,\n F: Fn(&Self::Output) -> X,\n X: Into<f64>,

👎Deprecated since 0.10.0:

Renamed to sample_weighted

\n
Deprecated: use [Self::sample_weighted] instead
","IndexedRandom","promql::range_eval::histogram::Histograms"],["
§

impl<T> IntoBytes for [T]
where\n T: IntoBytes,

§

fn as_bytes(&self) -> &[u8] ⓘ
where\n Self: Immutable,

Gets the bytes of this value. Read more
§

fn as_mut_bytes(&mut self) -> &mut [u8] ⓘ
where\n Self: FromBytes,

Gets the bytes of this value mutably. Read more
§

fn write_to(&self, dst: &mut [u8]) -> Result<(), SizeError<&Self, &mut [u8]>>
where\n Self: Immutable,

Writes a copy of self to dst. Read more
§

fn write_to_prefix(\n &self,\n dst: &mut [u8],\n) -> Result<(), SizeError<&Self, &mut [u8]>>
where\n Self: Immutable,

Writes a copy of self to the prefix of dst. Read more
§

fn write_to_suffix(\n &self,\n dst: &mut [u8],\n) -> Result<(), SizeError<&Self, &mut [u8]>>
where\n Self: Immutable,

Writes a copy of self to the suffix of dst. Read more
","IntoBytes","promql::range_eval::histogram::Histograms"],["
Source§

impl<T, V> Join<&[T]> for [V]
where\n T: Clone,\n V: Borrow<[T]>,

Available on non-no_global_oom_handling only.
Source§

type Output = Vec<T>

🔬This is a nightly-only experimental API. (slice_concat_trait)
The resulting type after concatenation
Source§

fn join(slice: &[V], sep: &[T]) -> Vec<T>

🔬This is a nightly-only experimental API. (slice_concat_trait)
Implementation of [T]::join
","Join<&[T]>","promql::range_eval::histogram::Histograms"],["
Source§

impl<S> Join<&OsStr> for [S]
where\n S: Borrow<OsStr>,

Source§

type Output = OsString

🔬This is a nightly-only experimental API. (slice_concat_trait)
The resulting type after concatenation
Source§

fn join(slice: &[S], sep: &OsStr) -> OsString

🔬This is a nightly-only experimental API. (slice_concat_trait)
Implementation of [T]::join
","Join<&OsStr>","promql::range_eval::histogram::Histograms"],["
Source§

impl<T, V> Join<&T> for [V]
where\n T: Clone,\n V: Borrow<[T]>,

Available on non-no_global_oom_handling only.
Source§

type Output = Vec<T>

🔬This is a nightly-only experimental API. (slice_concat_trait)
The resulting type after concatenation
Source§

fn join(slice: &[V], sep: &T) -> Vec<T>

🔬This is a nightly-only experimental API. (slice_concat_trait)
Implementation of [T]::join
","Join<&T>","promql::range_eval::histogram::Histograms"],["
Source§

impl<S> Join<&str> for [S]
where\n S: Borrow<str>,

Available on non-no_global_oom_handling only.
Source§

type Output = String

🔬This is a nightly-only experimental API. (slice_concat_trait)
The resulting type after concatenation
Source§

fn join(slice: &[S], sep: &str) -> String

🔬This is a nightly-only experimental API. (slice_concat_trait)
Implementation of [T]::join
","Join<&str>","promql::range_eval::histogram::Histograms"],["
§

impl<T> KnownLayout for [T]

§

type PointerMetadata = usize

The type of metadata stored in a pointer to Self. Read more
","KnownLayout","promql::range_eval::histogram::Histograms"],["
1.0.0 (const: unstable) · Source§

impl<T> Ord for [T]
where\n T: Ord,

Implements comparison of slices lexicographically.

\n
Source§

fn cmp(&self, other: &[T]) -> Ordering

This method returns an Ordering between self and other. Read more
","Ord","promql::range_eval::histogram::Histograms"],["
1.0.0 (const: unstable) · Source§

impl<T, U> PartialEq<[U]> for [T]
where\n T: PartialEq<U>,

Source§

fn eq(&self, other: &[U]) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq<[U]>","promql::range_eval::histogram::Histograms"],["
1.0.0 (const: unstable) · Source§

impl<T, U, const N: usize> PartialEq<[U; N]> for [T]
where\n T: PartialEq<U>,

Source§

fn eq(&self, other: &[U; N]) -> bool

Tests for self and other values to be equal, and is used by ==.
Source§

fn ne(&self, other: &[U; N]) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq<[U; N]>","promql::range_eval::histogram::Histograms"],["
§

impl<T> PartialEq<ScalarBuffer<T>> for [T]
where\n T: ArrowNativeType,

§

fn eq(&self, other: &ScalarBuffer<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq>","promql::range_eval::histogram::Histograms"],["
§

impl<K, V, K2, V2> PartialEq<Slice<K2, V2>> for [(K, V)]
where\n K: PartialEq<K2>,\n V: PartialEq<V2>,

§

fn eq(&self, other: &Slice<K2, V2>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq>","promql::range_eval::histogram::Histograms"],["
§

impl<T, U> PartialEq<Slice<U>> for [T]
where\n T: PartialEq<U>,

§

fn eq(&self, other: &Slice<U>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq>","promql::range_eval::histogram::Histograms"],["
§

impl<T, U, A> PartialEq<Vec<U, A>> for [T]
where\n A: Allocator,\n T: PartialEq<U>,

§

fn eq(&self, other: &Vec<U, A>) -> bool

Tests for self and other values to be equal, and is used by ==.
§

fn ne(&self, other: &Vec<U, A>) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq>","promql::range_eval::histogram::Histograms"],["
1.48.0 (const: unstable) · Source§

impl<T, U, A> PartialEq<Vec<U, A>> for [T]
where\n A: Allocator,\n T: PartialEq<U>,

Source§

fn eq(&self, other: &Vec<U, A>) -> bool

Tests for self and other values to be equal, and is used by ==.
Source§

fn ne(&self, other: &Vec<U, A>) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq>","promql::range_eval::histogram::Histograms"],["
§

impl<T> PartialEq<Vec1<T>> for [T]
where\n T: PartialEq,

§

fn eq(&self, other: &Vec1<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq>","promql::range_eval::histogram::Histograms"],["
1.0.0 (const: unstable) · Source§

impl<T> PartialOrd for [T]
where\n T: PartialOrd,

Implements comparison of slices lexicographically.

\n
Source§

fn partial_cmp(&self, other: &[T]) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
Source§

fn lt(&self, other: &[T]) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
Source§

fn le(&self, other: &[T]) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
Source§

fn gt(&self, other: &[T]) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
Source§

fn ge(&self, other: &[T]) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","promql::range_eval::histogram::Histograms"],["
Source§

impl<T> Serialize for [T]
where\n T: Serialize,

Source§

fn serialize<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer. Read more
","Serialize","promql::range_eval::histogram::Histograms"],["
Source§

impl<T, U> SerializeAs<[T]> for [U]
where\n U: SerializeAs<T>,

Source§

fn serialize_as<S>(\n source: &[T],\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

Serialize this value into the given Serde serializer.
","SerializeAs<[T]>","promql::range_eval::histogram::Histograms"],["
§

impl<T> SliceExt<T> for [T]

§

fn as_hybrid_array<U>(&self) -> Option<&Array<T, U>>
where\n U: ArraySize,

Get a reference to an array from a slice, if the slice is exactly the size of the array. Read more
§

fn as_mut_hybrid_array<U>(&mut self) -> Option<&mut Array<T, U>>
where\n U: ArraySize,

Get a mutable reference to an array from a slice, if the slice is exactly the size of the\narray. Read more
§

fn as_hybrid_chunks<U>(&self) -> (&[Array<T, U>], &[T])
where\n U: ArraySize,

Splits the shared slice into a slice of U-element arrays, starting at the beginning\nof the slice, and a remainder slice with length strictly less than U. Read more
§

fn as_hybrid_chunks_mut<U>(&mut self) -> (&mut [Array<T, U>], &mut [T])
where\n U: ArraySize,

Splits the exclusive slice into a slice of U-element arrays, starting at the beginning\nof the slice, and a remainder slice with length strictly less than U. Read more
","SliceExt","promql::range_eval::histogram::Histograms"],["
§

impl<T> SliceExt<T> for [T]

§

fn to_vec_in<A>(&self, alloc: A) -> Vec<T, A>
where\n A: Allocator,\n T: Clone,

Copies self into a new Vec with an allocator. Read more
§

fn repeat(&self, n: usize) -> Vec<T>
where\n T: Copy,

Creates a vector by copying a slice n times. Read more
§

fn to_vec(&self) -> Vec<T>
where\n T: Clone,

Copies self into a new Vec. Read more
","SliceExt","promql::range_eval::histogram::Histograms"],["
1.51.0 · Source§

impl<T> SlicePattern for [T]

Source§

type Item = T

🔬This is a nightly-only experimental API. (slice_pattern)
The element type of the slice being matched on.
Source§

fn as_slice(&self) -> &[<[T] as SlicePattern>::Item]

🔬This is a nightly-only experimental API. (slice_pattern)
Currently, the consumers of SlicePattern need a slice.
","SlicePattern","promql::range_eval::histogram::Histograms"],["
Source§

impl<T> SliceRandom for [T]

Source§

type Item = T

The element type.
Source§

fn choose<R>(&self, rng: &mut R) -> Option<&<[T] as SliceRandom>::Item>
where\n R: Rng + ?Sized,

Returns a reference to one random element of the slice, or None if the\nslice is empty. Read more
Source§

fn choose_mut<R>(\n &mut self,\n rng: &mut R,\n) -> Option<&mut <[T] as SliceRandom>::Item>
where\n R: Rng + ?Sized,

Returns a mutable reference to one random element of the slice, or\nNone if the slice is empty. Read more
Source§

fn choose_multiple<R>(\n &self,\n rng: &mut R,\n amount: usize,\n) -> SliceChooseIter<'_, [T], <[T] as SliceRandom>::Item>
where\n R: Rng + ?Sized,

Chooses amount elements from the slice at random, without repetition,\nand in random order. The returned iterator is appropriate both for\ncollection into a Vec and filling an existing buffer (see example). Read more
Source§

fn choose_weighted<R, F, B, X>(\n &self,\n rng: &mut R,\n weight: F,\n) -> Result<&<[T] as SliceRandom>::Item, WeightedError>
where\n R: Rng + ?Sized,\n F: Fn(&<[T] as SliceRandom>::Item) -> B,\n B: SampleBorrow<X>,\n X: SampleUniform + for<'a> AddAssign<&'a X> + PartialOrd + Clone + Default,

Similar to choose, but where the likelihood of each outcome may be\nspecified. Read more
Source§

fn choose_weighted_mut<R, F, B, X>(\n &mut self,\n rng: &mut R,\n weight: F,\n) -> Result<&mut <[T] as SliceRandom>::Item, WeightedError>
where\n R: Rng + ?Sized,\n F: Fn(&<[T] as SliceRandom>::Item) -> B,\n B: SampleBorrow<X>,\n X: SampleUniform + for<'a> AddAssign<&'a X> + PartialOrd + Clone + Default,

Similar to choose_mut, but where the likelihood of each outcome may\nbe specified. Read more
Source§

fn choose_multiple_weighted<R, F, X>(\n &self,\n rng: &mut R,\n amount: usize,\n weight: F,\n) -> Result<SliceChooseIter<'_, [T], <[T] as SliceRandom>::Item>, WeightedError>
where\n R: Rng + ?Sized,\n F: Fn(&<[T] as SliceRandom>::Item) -> X,\n X: Into<f64>,

Similar to choose_multiple, but where the likelihood of each element’s\ninclusion in the output may be specified. The elements are returned in an\narbitrary, unspecified order. Read more
Source§

fn shuffle<R>(&mut self, rng: &mut R)
where\n R: Rng + ?Sized,

Shuffle a mutable slice in place. Read more
Source§

fn partial_shuffle<R>(\n &mut self,\n rng: &mut R,\n amount: usize,\n) -> (&mut [<[T] as SliceRandom>::Item], &mut [<[T] as SliceRandom>::Item])
where\n R: Rng + ?Sized,

Shuffle a slice in place, but exit early. Read more
","SliceRandom","promql::range_eval::histogram::Histograms"],["
Source§

impl<T> SliceRandom for [T]

Source§

fn shuffle<R>(&mut self, rng: &mut R)
where\n R: Rng + ?Sized,

Shuffle a mutable slice in place. Read more
Source§

fn partial_shuffle<R>(\n &mut self,\n rng: &mut R,\n amount: usize,\n) -> (&mut [T], &mut [T])
where\n R: Rng + ?Sized,

Shuffle a slice in place, but exit early. Read more
","SliceRandom","promql::range_eval::histogram::Histograms"],["
§

impl<T> SliceRandom for [T]

§

fn shuffle<R>(&mut self, rng: &mut R)
where\n R: Rng + ?Sized,

Shuffle a mutable slice in place. Read more
§

fn partial_shuffle<R>(\n &mut self,\n rng: &mut R,\n amount: usize,\n) -> (&mut [T], &mut [T])
where\n R: Rng + ?Sized,

Shuffle a slice in place, but exit early. Read more
","SliceRandom","promql::range_eval::histogram::Histograms"],["
§

impl<T> SplitAt for [T]

§

type Elem = T

The element type of the trailing slice.
§

unsafe fn split_at_unchecked(&self, l_len: usize) -> Split<&Self>

Unsafely splits self in two. Read more
§

fn split_at(&self, l_len: usize) -> Option<Split<&Self>>

Attempts to split self in two. Read more
§

unsafe fn split_at_mut_unchecked(&mut self, l_len: usize) -> Split<&mut Self>

Unsafely splits self in two. Read more
§

fn split_at_mut(&mut self, l_len: usize) -> Option<Split<&mut Self>>

Attempts to split self in two. Read more
","SplitAt","promql::range_eval::histogram::Histograms"],["
§

impl<T> ToByteSlice for [T]
where\n T: ArrowNativeType,

§

fn to_byte_slice(&self) -> &[u8] ⓘ

Converts this instance into a byte slice
","ToByteSlice","promql::range_eval::histogram::Histograms"],["
1.0.0 · Source§

impl<T> ToOwned for [T]
where\n T: Clone,

Available on non-no_global_oom_handling only.
Source§

type Owned = Vec<T>

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> Vec<T>

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut Vec<T>)

Uses borrowed data to replace owned data, usually by cloning. Read more
","ToOwned","promql::range_eval::histogram::Histograms"],["
§

impl<A> ToSmallVec<A> for [<A as Array>::Item]
where\n A: Array,\n <A as Array>::Item: Copy,

§

fn to_smallvec(&self) -> SmallVec<A>

Construct a new SmallVec from a slice.
","ToSmallVec","promql::range_eval::histogram::Histograms"],["
§

impl<T> TryFromBytes for [T]
where\n T: TryFromBytes,

§

fn try_ref_from_bytes(\n source: &[u8],\n) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>
where\n Self: KnownLayout + Immutable,

Attempts to interpret the given source as a &Self. Read more
§

fn try_ref_from_prefix(\n source: &[u8],\n) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>
where\n Self: KnownLayout + Immutable,

Attempts to interpret the prefix of the given source as a &Self. Read more
§

fn try_ref_from_suffix(\n source: &[u8],\n) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>
where\n Self: KnownLayout + Immutable,

Attempts to interpret the suffix of the given source as a &Self. Read more
§

fn try_mut_from_bytes(\n bytes: &mut [u8],\n) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>
where\n Self: KnownLayout + IntoBytes,

Attempts to interpret the given source as a &mut Self without\ncopying. Read more
§

fn try_mut_from_prefix(\n source: &mut [u8],\n) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>
where\n Self: KnownLayout + IntoBytes,

Attempts to interpret the prefix of the given source as a &mut Self. Read more
§

fn try_mut_from_suffix(\n source: &mut [u8],\n) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>
where\n Self: KnownLayout + IntoBytes,

Attempts to interpret the suffix of the given source as a &mut Self. Read more
§

fn try_ref_from_bytes_with_elems(\n source: &[u8],\n count: usize,\n) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>
where\n Self: KnownLayout<PointerMetadata = usize> + Immutable,

Attempts to interpret the given source as a &Self with a DST length\nequal to count. Read more
§

fn try_ref_from_prefix_with_elems(\n source: &[u8],\n count: usize,\n) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>
where\n Self: KnownLayout<PointerMetadata = usize> + Immutable,

Attempts to interpret the prefix of the given source as a &Self with\na DST length equal to count. Read more
§

fn try_ref_from_suffix_with_elems(\n source: &[u8],\n count: usize,\n) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>
where\n Self: KnownLayout<PointerMetadata = usize> + Immutable,

Attempts to interpret the suffix of the given source as a &Self with\na DST length equal to count. Read more
§

fn try_mut_from_bytes_with_elems(\n source: &mut [u8],\n count: usize,\n) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>
where\n Self: KnownLayout<PointerMetadata = usize> + IntoBytes,

Attempts to interpret the given source as a &mut Self with a DST\nlength equal to count. Read more
§

fn try_mut_from_prefix_with_elems(\n source: &mut [u8],\n count: usize,\n) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>
where\n Self: KnownLayout<PointerMetadata = usize> + IntoBytes,

Attempts to interpret the prefix of the given source as a &mut Self\nwith a DST length equal to count. Read more
§

fn try_mut_from_suffix_with_elems(\n source: &mut [u8],\n count: usize,\n) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>
where\n Self: KnownLayout<PointerMetadata = usize> + IntoBytes,

Attempts to interpret the suffix of the given source as a &mut Self\nwith a DST length equal to count. Read more
","TryFromBytes","promql::range_eval::histogram::Histograms"],["
§

impl<T> VarULE for [T]
where\n T: ULE,

Note: VarULE is well-defined for all [T] where T: ULE, but ZeroSlice is more ergonomic\nwhen T is a low-level ULE type. For example:

\n
\n
// OK: [u8] is a useful type\nlet _: VarZeroVec<[u8]> = unimplemented!();\n\n// Technically works, but [u32::ULE] is not very useful\nlet _: VarZeroVec<[<u32 as AsULE>::ULE]> = unimplemented!();\n\n// Better: ZeroSlice<u32>\nlet _: VarZeroVec<ZeroSlice<u32>> = unimplemented!();
§

fn validate_bytes(slice: &[u8]) -> Result<(), UleError>

Validates a byte slice, &[u8]. Read more
§

unsafe fn from_bytes_unchecked(bytes: &[u8]) -> &[T]

Takes a byte slice, &[u8], and return it as &Self with the same lifetime, assuming\nthat this byte slice has previously been run through [Self::parse_bytes()] with\nsuccess. Read more
§

fn parse_bytes(bytes: &[u8]) -> Result<&Self, UleError>

Parses a byte slice, &[u8], and return it as &Self with the same lifetime. Read more
§

fn as_bytes(&self) -> &[u8] ⓘ

Given &Self, returns a &[u8] with the same lifetime. Read more
§

fn to_boxed(&self) -> Box<Self>

Allocate on the heap as a Box<T>
","VarULE","promql::range_eval::histogram::Histograms"],["
§

impl<V> WriteTomlValue for [V]
where\n V: WriteTomlValue,

§

fn write_toml_value<W>(&self, writer: &mut W) -> Result<(), Error>
where\n W: TomlWrite + ?Sized,

","WriteTomlValue","promql::range_eval::histogram::Histograms"],["
§

impl<'a, T> ZeroMapKV<'a> for [T]
where\n T: ULE + AsULE<ULE = T>,

§

type Container = VarZeroVec<'a, [T]>

The container that can be used with this type: [ZeroVec] or [VarZeroVec].
§

type Slice = VarZeroSlice<[T]>

§

type GetType = [T]

The type produced by Container::get() Read more
§

type OwnedType = Box<[T]>

The type produced by Container::replace() and Container::remove(),\nalso used during deserialization. If Self is human readable serialized,\ndeserializing to Self::OwnedType should produce the same value once\npassed through Self::owned_as_self() Read more
","ZeroMapKV<'a>","promql::range_eval::histogram::Histograms"],["
§

impl<Z> Zeroize for [Z]
where\n Z: DefaultIsZeroes,

Impl [Zeroize] on slices of types that can be zeroized with Default.

\n

This impl can eventually be optimized using an memset intrinsic,\nsuch as core::intrinsics::volatile_set_memory. For that reason the\nblanket impl on slices is bounded by [DefaultIsZeroes].

\n

To zeroize a mut slice of Z: Zeroize which does not impl\n[DefaultIsZeroes], call iter_mut().zeroize().

\n
§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the\nzeroization operation is not “optimized away” by the compiler.
","Zeroize","promql::range_eval::histogram::Histograms"],["
Source§

impl<T> ConstParamTy_ for [T]
where\n T: ConstParamTy_,

","ConstParamTy_","promql::range_eval::histogram::Histograms"],["
Source§

impl<T> DynClone for [T]
where\n T: Clone,

","DynClone","promql::range_eval::histogram::Histograms"],["
1.0.0 (const: unstable) · Source§

impl<T> Eq for [T]
where\n T: Eq,

","Eq","promql::range_eval::histogram::Histograms"],["
§

impl<T> Immutable for [T]
where\n T: Immutable,

","Immutable","promql::range_eval::histogram::Histograms"],["
1.80.0 · Source§

impl<T> !Iterator for [T]

","Iterator","promql::range_eval::histogram::Histograms"],["
Source§

impl<T> StructuralPartialEq for [T]

","StructuralPartialEq","promql::range_eval::histogram::Histograms"],["
§

impl<T> Unaligned for [T]
where\n T: Unaligned,

","Unaligned","promql::range_eval::histogram::Histograms"]]],["servers",[["
§

impl Adler32Hash for &[u8]

§

fn hash(&self) -> u32

Feeds this value into Adler32.
","Adler32Hash","servers::prom_remote_write::types::RawBytes"],["
§

impl<T> ApproxEq for &[T]
where\n T: Copy + ApproxEq,

§

type Margin = <T as ApproxEq>::Margin

This type type defines a margin within which two values are to be\nconsidered approximately equal. It must implement Default so that\napprox_eq() can be called on unknown types.
§

fn approx_eq<M>(self, other: &[T], margin: M) -> bool
where\n M: Into<<&[T] as ApproxEq>::Margin>,

This method tests that the self and other values are equal within margin\nof each other.
§

fn approx_ne<M>(self, other: Self, margin: M) -> bool
where\n M: Into<Self::Margin>,

This method tests that the self and other values are not within margin\nof each other.
","ApproxEq","servers::prom_remote_write::types::RawBytes"],["
§

impl Arg for &[u8]

§

fn as_str(&self) -> Result<&str, Errno>

Returns a view of this string as a string slice.
§

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

Returns a potentially-lossy rendering of this string as a\nCow<'_, str>.
§

fn as_cow_c_str(&self) -> Result<Cow<'_, CStr>, Errno>

Returns a view of this string as a maybe-owned CStr.
§

fn into_c_str<'b>(self) -> Result<Cow<'b, CStr>, Errno>
where\n &[u8]: 'b,

Consumes self and returns a view of this string as a maybe-owned\nCStr.
§

fn into_with_c_str<T, F>(self, f: F) -> Result<T, Errno>
where\n &[u8]: Sized,\n F: FnOnce(&CStr) -> Result<T, Errno>,

Runs a closure with self passed in as a &CStr.
","Arg","servers::prom_remote_write::types::RawBytes"],["
§

impl Arg for &[u8]

§

fn as_str(&self) -> Result<&str, Errno>

Returns a view of this string as a string slice.
§

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

Returns a potentially-lossy rendering of this string as a\nCow<'_, str>.
§

fn as_cow_c_str(&self) -> Result<Cow<'_, CStr>, Errno>

Returns a view of this string as a maybe-owned CStr.
§

fn into_c_str<'b>(self) -> Result<Cow<'b, CStr>, Errno>
where\n &[u8]: 'b,

Consumes self and returns a view of this string as a maybe-owned\nCStr.
§

fn into_with_c_str<T, F>(self, f: F) -> Result<T, Errno>
where\n &[u8]: Sized,\n F: FnOnce(&CStr) -> Result<T, Errno>,

Runs a closure with self passed in as a &CStr.
","Arg","servers::prom_remote_write::types::RawBytes"],["
§

impl AsBStr for &[u8]

§

fn as_bstr(&self) -> &[u8] ⓘ

Casts the input type to a byte slice
","AsBStr","servers::prom_remote_write::types::RawBytes"],["
§

impl AsBytes for &[u8]

§

fn as_bytes(&self) -> &[u8] ⓘ

Casts the input type to a byte slice
","AsBytes","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> AsBytes for &'a [u8]

§

fn as_bytes(&self) -> &[u8] ⓘ

Casts the input type to a byte slice
","AsBytes","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> AsBytes for &'a [u8]

§

fn as_bytes(&self) -> &[u8] ⓘ

Casts the input type to a byte slice
","AsBytes","servers::prom_remote_write::types::RawBytes"],["
§

impl AsQuery for &[u8]

§

fn as_query(&self) -> Cow<'_, [u8]>

","AsQuery","servers::prom_remote_write::types::RawBytes"],["
§

impl<T> AsRef<ZeroSlice<T>> for &[<T as AsULE>::ULE]
where\n T: AsULE,

§

fn as_ref(&self) -> &ZeroSlice<T>

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef>","servers::prom_remote_write::types::RawBytes"],["
§

impl AsyncBufRead for &[u8]

§

fn poll_fill_buf(\n self: Pin<&mut &[u8]>,\n _: &mut Context<'_>,\n) -> Poll<Result<&[u8], Error>>

Attempt to return the contents of the internal buffer, filling it with more data\nfrom the inner reader if it is empty. Read more
§

fn consume(self: Pin<&mut &[u8]>, amt: usize)

Tells this buffer that amt bytes have been consumed from the buffer,\nso they should no longer be returned in calls to poll_read. Read more
","AsyncBufRead","servers::prom_remote_write::types::RawBytes"],["
§

impl AsyncBufRead for &[u8]

§

fn poll_fill_buf(\n self: Pin<&mut &[u8]>,\n _cx: &mut Context<'_>,\n) -> Poll<Result<&[u8], Error>>

Attempts to return the contents of the internal buffer, filling it with more data\nfrom the inner reader if it is empty. Read more
§

fn consume(self: Pin<&mut &[u8]>, amt: usize)

Tells this buffer that amt bytes have been consumed from the buffer,\nso they should no longer be returned in calls to poll_read. Read more
","AsyncBufRead","servers::prom_remote_write::types::RawBytes"],["
§

impl AsyncRead for &[u8]

§

fn poll_read(\n self: Pin<&mut &[u8]>,\n _: &mut Context<'_>,\n buf: &mut [u8],\n) -> Poll<Result<usize, Error>>

Attempt to read from the AsyncRead into buf. Read more
§

fn poll_read_vectored(\n self: Pin<&mut &[u8]>,\n _: &mut Context<'_>,\n bufs: &mut [IoSliceMut<'_>],\n) -> Poll<Result<usize, Error>>

Attempt to read from the AsyncRead into bufs using vectored\nIO operations. Read more
","AsyncRead","servers::prom_remote_write::types::RawBytes"],["
§

impl AsyncRead for &[u8]

§

fn poll_read(\n self: Pin<&mut &[u8]>,\n _cx: &mut Context<'_>,\n buf: &mut ReadBuf<'_>,\n) -> Poll<Result<(), Error>>

Attempts to read from the AsyncRead into buf. Read more
","AsyncRead","servers::prom_remote_write::types::RawBytes"],["
§

impl Buf for &[u8]

§

fn remaining(&self) -> usize

Returns the number of bytes between the current position and the end of\nthe buffer. Read more
§

fn chunk(&self) -> &[u8] ⓘ

Returns a slice starting at the current position and of length between 0\nand Buf::remaining(). Note that this can return a shorter slice (this\nallows non-continuous internal representation). Read more
§

fn advance(&mut self, cnt: usize)

Advance the internal cursor of the Buf Read more
§

fn copy_to_slice(&mut self, dst: &mut [u8])

Copies bytes from self into dst. Read more
§

fn chunks_vectored<'a>(&'a self, dst: &mut [IoSlice<'a>]) -> usize

Fills dst with potentially multiple slices starting at self’s\ncurrent position. Read more
§

fn has_remaining(&self) -> bool

Returns true if there are any more bytes to consume Read more
§

fn get_u8(&mut self) -> u8

Gets an unsigned 8 bit integer from self. Read more
§

fn get_i8(&mut self) -> i8

Gets a signed 8 bit integer from self. Read more
§

fn get_u16(&mut self) -> u16

Gets an unsigned 16 bit integer from self in big-endian byte order. Read more
§

fn get_u16_le(&mut self) -> u16

Gets an unsigned 16 bit integer from self in little-endian byte order. Read more
§

fn get_u16_ne(&mut self) -> u16

Gets an unsigned 16 bit integer from self in native-endian byte order. Read more
§

fn get_i16(&mut self) -> i16

Gets a signed 16 bit integer from self in big-endian byte order. Read more
§

fn get_i16_le(&mut self) -> i16

Gets a signed 16 bit integer from self in little-endian byte order. Read more
§

fn get_i16_ne(&mut self) -> i16

Gets a signed 16 bit integer from self in native-endian byte order. Read more
§

fn get_u32(&mut self) -> u32

Gets an unsigned 32 bit integer from self in the big-endian byte order. Read more
§

fn get_u32_le(&mut self) -> u32

Gets an unsigned 32 bit integer from self in the little-endian byte order. Read more
§

fn get_u32_ne(&mut self) -> u32

Gets an unsigned 32 bit integer from self in native-endian byte order. Read more
§

fn get_i32(&mut self) -> i32

Gets a signed 32 bit integer from self in big-endian byte order. Read more
§

fn get_i32_le(&mut self) -> i32

Gets a signed 32 bit integer from self in little-endian byte order. Read more
§

fn get_i32_ne(&mut self) -> i32

Gets a signed 32 bit integer from self in native-endian byte order. Read more
§

fn get_u64(&mut self) -> u64

Gets an unsigned 64 bit integer from self in big-endian byte order. Read more
§

fn get_u64_le(&mut self) -> u64

Gets an unsigned 64 bit integer from self in little-endian byte order. Read more
§

fn get_u64_ne(&mut self) -> u64

Gets an unsigned 64 bit integer from self in native-endian byte order. Read more
§

fn get_i64(&mut self) -> i64

Gets a signed 64 bit integer from self in big-endian byte order. Read more
§

fn get_i64_le(&mut self) -> i64

Gets a signed 64 bit integer from self in little-endian byte order. Read more
§

fn get_i64_ne(&mut self) -> i64

Gets a signed 64 bit integer from self in native-endian byte order. Read more
§

fn get_u128(&mut self) -> u128

Gets an unsigned 128 bit integer from self in big-endian byte order. Read more
§

fn get_u128_le(&mut self) -> u128

Gets an unsigned 128 bit integer from self in little-endian byte order. Read more
§

fn get_u128_ne(&mut self) -> u128

Gets an unsigned 128 bit integer from self in native-endian byte order. Read more
§

fn get_i128(&mut self) -> i128

Gets a signed 128 bit integer from self in big-endian byte order. Read more
§

fn get_i128_le(&mut self) -> i128

Gets a signed 128 bit integer from self in little-endian byte order. Read more
§

fn get_i128_ne(&mut self) -> i128

Gets a signed 128 bit integer from self in native-endian byte order. Read more
§

fn get_uint(&mut self, nbytes: usize) -> u64

Gets an unsigned n-byte integer from self in big-endian byte order. Read more
§

fn get_uint_le(&mut self, nbytes: usize) -> u64

Gets an unsigned n-byte integer from self in little-endian byte order. Read more
§

fn get_uint_ne(&mut self, nbytes: usize) -> u64

Gets an unsigned n-byte integer from self in native-endian byte order. Read more
§

fn get_int(&mut self, nbytes: usize) -> i64

Gets a signed n-byte integer from self in big-endian byte order. Read more
§

fn get_int_le(&mut self, nbytes: usize) -> i64

Gets a signed n-byte integer from self in little-endian byte order. Read more
§

fn get_int_ne(&mut self, nbytes: usize) -> i64

Gets a signed n-byte integer from self in native-endian byte order. Read more
§

fn get_f32(&mut self) -> f32

Gets an IEEE754 single-precision (4 bytes) floating point number from\nself in big-endian byte order. Read more
§

fn get_f32_le(&mut self) -> f32

Gets an IEEE754 single-precision (4 bytes) floating point number from\nself in little-endian byte order. Read more
§

fn get_f32_ne(&mut self) -> f32

Gets an IEEE754 single-precision (4 bytes) floating point number from\nself in native-endian byte order. Read more
§

fn get_f64(&mut self) -> f64

Gets an IEEE754 double-precision (8 bytes) floating point number from\nself in big-endian byte order. Read more
§

fn get_f64_le(&mut self) -> f64

Gets an IEEE754 double-precision (8 bytes) floating point number from\nself in little-endian byte order. Read more
§

fn get_f64_ne(&mut self) -> f64

Gets an IEEE754 double-precision (8 bytes) floating point number from\nself in native-endian byte order. Read more
§

fn try_copy_to_slice(&mut self, dst: &mut [u8]) -> Result<(), TryGetError>

Copies bytes from self into dst. Read more
§

fn try_get_u8(&mut self) -> Result<u8, TryGetError>

Gets an unsigned 8 bit integer from self. Read more
§

fn try_get_i8(&mut self) -> Result<i8, TryGetError>

Gets a signed 8 bit integer from self. Read more
§

fn try_get_u16(&mut self) -> Result<u16, TryGetError>

Gets an unsigned 16 bit integer from self in big-endian byte order. Read more
§

fn try_get_u16_le(&mut self) -> Result<u16, TryGetError>

Gets an unsigned 16 bit integer from self in little-endian byte order. Read more
§

fn try_get_u16_ne(&mut self) -> Result<u16, TryGetError>

Gets an unsigned 16 bit integer from self in native-endian byte order. Read more
§

fn try_get_i16(&mut self) -> Result<i16, TryGetError>

Gets a signed 16 bit integer from self in big-endian byte order. Read more
§

fn try_get_i16_le(&mut self) -> Result<i16, TryGetError>

Gets an signed 16 bit integer from self in little-endian byte order. Read more
§

fn try_get_i16_ne(&mut self) -> Result<i16, TryGetError>

Gets a signed 16 bit integer from self in native-endian byte order. Read more
§

fn try_get_u32(&mut self) -> Result<u32, TryGetError>

Gets an unsigned 32 bit integer from self in big-endian byte order. Read more
§

fn try_get_u32_le(&mut self) -> Result<u32, TryGetError>

Gets an unsigned 32 bit integer from self in little-endian byte order. Read more
§

fn try_get_u32_ne(&mut self) -> Result<u32, TryGetError>

Gets an unsigned 32 bit integer from self in native-endian byte order. Read more
§

fn try_get_i32(&mut self) -> Result<i32, TryGetError>

Gets a signed 32 bit integer from self in big-endian byte order. Read more
§

fn try_get_i32_le(&mut self) -> Result<i32, TryGetError>

Gets a signed 32 bit integer from self in little-endian byte order. Read more
§

fn try_get_i32_ne(&mut self) -> Result<i32, TryGetError>

Gets a signed 32 bit integer from self in native-endian byte order. Read more
§

fn try_get_u64(&mut self) -> Result<u64, TryGetError>

Gets an unsigned 64 bit integer from self in big-endian byte order. Read more
§

fn try_get_u64_le(&mut self) -> Result<u64, TryGetError>

Gets an unsigned 64 bit integer from self in little-endian byte order. Read more
§

fn try_get_u64_ne(&mut self) -> Result<u64, TryGetError>

Gets an unsigned 64 bit integer from self in native-endian byte order. Read more
§

fn try_get_i64(&mut self) -> Result<i64, TryGetError>

Gets a signed 64 bit integer from self in big-endian byte order. Read more
§

fn try_get_i64_le(&mut self) -> Result<i64, TryGetError>

Gets a signed 64 bit integer from self in little-endian byte order. Read more
§

fn try_get_i64_ne(&mut self) -> Result<i64, TryGetError>

Gets a signed 64 bit integer from self in native-endian byte order. Read more
§

fn try_get_u128(&mut self) -> Result<u128, TryGetError>

Gets an unsigned 128 bit integer from self in big-endian byte order. Read more
§

fn try_get_u128_le(&mut self) -> Result<u128, TryGetError>

Gets an unsigned 128 bit integer from self in little-endian byte order. Read more
§

fn try_get_u128_ne(&mut self) -> Result<u128, TryGetError>

Gets an unsigned 128 bit integer from self in native-endian byte order. Read more
§

fn try_get_i128(&mut self) -> Result<i128, TryGetError>

Gets a signed 128 bit integer from self in big-endian byte order. Read more
§

fn try_get_i128_le(&mut self) -> Result<i128, TryGetError>

Gets a signed 128 bit integer from self in little-endian byte order. Read more
§

fn try_get_i128_ne(&mut self) -> Result<i128, TryGetError>

Gets a signed 128 bit integer from self in native-endian byte order. Read more
§

fn try_get_uint(&mut self, nbytes: usize) -> Result<u64, TryGetError>

Gets an unsigned n-byte integer from self in big-endian byte order. Read more
§

fn try_get_uint_le(&mut self, nbytes: usize) -> Result<u64, TryGetError>

Gets an unsigned n-byte integer from self in little-endian byte order. Read more
§

fn try_get_uint_ne(&mut self, nbytes: usize) -> Result<u64, TryGetError>

Gets an unsigned n-byte integer from self in native-endian byte order. Read more
§

fn try_get_int(&mut self, nbytes: usize) -> Result<i64, TryGetError>

Gets a signed n-byte integer from self in big-endian byte order. Read more
§

fn try_get_int_le(&mut self, nbytes: usize) -> Result<i64, TryGetError>

Gets a signed n-byte integer from self in little-endian byte order. Read more
§

fn try_get_int_ne(&mut self, nbytes: usize) -> Result<i64, TryGetError>

Gets a signed n-byte integer from self in native-endian byte order. Read more
§

fn try_get_f32(&mut self) -> Result<f32, TryGetError>

Gets an IEEE754 single-precision (4 bytes) floating point number from\nself in big-endian byte order. Read more
§

fn try_get_f32_le(&mut self) -> Result<f32, TryGetError>

Gets an IEEE754 single-precision (4 bytes) floating point number from\nself in little-endian byte order. Read more
§

fn try_get_f32_ne(&mut self) -> Result<f32, TryGetError>

Gets an IEEE754 single-precision (4 bytes) floating point number from\nself in native-endian byte order. Read more
§

fn try_get_f64(&mut self) -> Result<f64, TryGetError>

Gets an IEEE754 double-precision (8 bytes) floating point number from\nself in big-endian byte order. Read more
§

fn try_get_f64_le(&mut self) -> Result<f64, TryGetError>

Gets an IEEE754 double-precision (8 bytes) floating point number from\nself in little-endian byte order. Read more
§

fn try_get_f64_ne(&mut self) -> Result<f64, TryGetError>

Gets an IEEE754 double-precision (8 bytes) floating point number from\nself in native-endian byte order. Read more
§

fn copy_to_bytes(&mut self, len: usize) -> Bytes

Consumes len bytes inside self and returns new instance of Bytes\nwith this data. Read more
§

fn take(self, limit: usize) -> Take<Self>
where\n Self: Sized,

Creates an adaptor which will read at most limit bytes from self. Read more
§

fn chain<U>(self, next: U) -> Chain<Self, U>
where\n U: Buf,\n Self: Sized,

Creates an adaptor which will chain this buffer with another. Read more
§

fn reader(self) -> Reader<Self>
where\n Self: Sized,

Creates an adaptor which implements the Read trait for self. Read more
","Buf","servers::prom_remote_write::types::RawBytes"],["
1.0.0 · Source§

impl BufRead for &[u8]

Source§

fn fill_buf(&mut self) -> Result<&[u8], Error>

Returns the contents of the internal buffer, filling it with more data, via Read methods, if empty. Read more
Source§

fn consume(&mut self, amt: usize)

Marks the given amount of additional bytes from the internal buffer as having been read.\nSubsequent calls to read only return bytes that have not been marked as read. Read more
Source§

fn has_data_left(&mut self) -> Result<bool, Error>

🔬This is a nightly-only experimental API. (buf_read_has_data_left)
Checks if there is any data left to be read. Read more
1.0.0 · Source§

fn read_until(&mut self, byte: u8, buf: &mut Vec<u8>) -> Result<usize, Error>

Reads all bytes into buf until the delimiter byte or EOF is reached. Read more
1.83.0 · Source§

fn skip_until(&mut self, byte: u8) -> Result<usize, Error>

Skips all bytes until the delimiter byte or EOF is reached. Read more
1.0.0 · Source§

fn read_line(&mut self, buf: &mut String) -> Result<usize, Error>

Reads all bytes until a newline (the 0xA byte) is reached, and append\nthem to the provided String buffer. Read more
1.0.0 · Source§

fn split(self, byte: u8) -> Split<Self>
where\n Self: Sized,

Returns an iterator over the contents of this reader split on the byte\nbyte. Read more
1.0.0 · Source§

fn lines(self) -> Lines<Self>
where\n Self: Sized,

Returns an iterator over the lines of this reader. Read more
","BufRead","servers::prom_remote_write::types::RawBytes"],["
§

impl<'de> Buffer for &'de [u8]

§

fn empty_str() -> <&'de [u8] as Buffer>::BufferString ⓘ

Based off of the empty function, allows override for optimization purposes.

\n
§

type BufferString = &'de str

A BufferString which will live at least as long as the Buffer itself. Read more
§

fn slice(&self, range: Range<usize>) -> Option<&'de [u8]>

This method returns an instance of type Self. This allows for lifetimes to be tracked\nin cases of deserialization. Read more
§

fn empty() -> &'de [u8] ⓘ

Creates an empty instance of a Buffer. This is different than Default b/c it\nguarantees that the buffer instance will have length zero. Read more
§

fn buffer_str(&self) -> Result<<&'de [u8] as Buffer>::BufferString, Utf8Error>

Attempts to convert the given buffer to a custom string type. Read more
§

fn shallow_copy(&self) -> Self

Creates a shallow copy of the given buffer, similar to slice. Read more
","Buffer","servers::prom_remote_write::types::RawBytes"],["
Source§

impl Clear for &[u8]

Source§

fn clear(&mut self)

Clear this make, make it equivalent to newly created object.
","Clear","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8]> for &'a [u8]

§

fn compare(&self, t: &'b [u8]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8]> for &'a [u8]

§

fn compare(&self, t: &'b [u8]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'b> Compare<&'b [u8]> for &[u8]

§

fn compare(&self, t: &'b [u8]) -> CompareResult

Compares self to another value for equality
","Compare<&'b [u8]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 0]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 0]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 0]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 0]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 1]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 1]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 1]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 1]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 10]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 10]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 10]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 10]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 11]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 11]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 11]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 11]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 12]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 12]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 12]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 12]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 13]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 13]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 13]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 13]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 14]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 14]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 14]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 14]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 15]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 15]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 15]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 15]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 16]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 16]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 16]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 16]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 17]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 17]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 17]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 17]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 18]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 18]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 18]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 18]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 19]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 19]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 19]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 19]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 2]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 2]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 2]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 2]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 20]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 20]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 20]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 20]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 21]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 21]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 21]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 21]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 22]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 22]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 22]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 22]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 23]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 23]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 23]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 23]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 24]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 24]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 24]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 24]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 25]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 25]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 25]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 25]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 26]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 26]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 26]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 26]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 27]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 27]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 27]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 27]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 28]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 28]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 28]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 28]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 29]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 29]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 29]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 29]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 3]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 3]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 3]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 3]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 30]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 30]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 30]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 30]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 31]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 31]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 31]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 31]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 32]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 32]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 32]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 32]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 4]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 4]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 4]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 4]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 5]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 5]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 5]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 5]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 6]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 6]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 6]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 6]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 7]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 7]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 7]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 7]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 8]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 8]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 8]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 8]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b [u8; 9]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; 9]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; 9]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; 9]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'b, const LEN: usize> Compare<&'b [u8; LEN]> for &[u8]

§

fn compare(&self, t: &'b [u8; LEN]) -> CompareResult

Compares self to another value for equality
","Compare<&'b [u8; LEN]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b, const N: usize> Compare<&'b [u8; N]> for &'a [u8]

§

fn compare(&self, t: &'b [u8; N]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b [u8; N]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b [u8; N]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b str> for &'a [u8]

§

fn compare(&self, t: &'b str) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b str) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b str>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> Compare<&'b str> for &'a [u8]

§

fn compare(&self, t: &'b str) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: &'b str) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<&'b str>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'b> Compare<&'b str> for &[u8]

§

fn compare(&self, t: &'b str) -> CompareResult

Compares self to another value for equality
","Compare<&'b str>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 0]> for &'a [u8]

§

fn compare(&self, t: [u8; 0]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 0]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 0]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 1]> for &'a [u8]

§

fn compare(&self, t: [u8; 1]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 1]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 1]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 10]> for &'a [u8]

§

fn compare(&self, t: [u8; 10]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 10]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 10]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 11]> for &'a [u8]

§

fn compare(&self, t: [u8; 11]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 11]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 11]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 12]> for &'a [u8]

§

fn compare(&self, t: [u8; 12]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 12]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 12]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 13]> for &'a [u8]

§

fn compare(&self, t: [u8; 13]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 13]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 13]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 14]> for &'a [u8]

§

fn compare(&self, t: [u8; 14]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 14]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 14]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 15]> for &'a [u8]

§

fn compare(&self, t: [u8; 15]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 15]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 15]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 16]> for &'a [u8]

§

fn compare(&self, t: [u8; 16]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 16]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 16]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 17]> for &'a [u8]

§

fn compare(&self, t: [u8; 17]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 17]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 17]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 18]> for &'a [u8]

§

fn compare(&self, t: [u8; 18]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 18]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 18]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 19]> for &'a [u8]

§

fn compare(&self, t: [u8; 19]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 19]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 19]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 2]> for &'a [u8]

§

fn compare(&self, t: [u8; 2]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 2]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 2]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 20]> for &'a [u8]

§

fn compare(&self, t: [u8; 20]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 20]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 20]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 21]> for &'a [u8]

§

fn compare(&self, t: [u8; 21]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 21]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 21]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 22]> for &'a [u8]

§

fn compare(&self, t: [u8; 22]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 22]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 22]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 23]> for &'a [u8]

§

fn compare(&self, t: [u8; 23]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 23]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 23]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 24]> for &'a [u8]

§

fn compare(&self, t: [u8; 24]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 24]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 24]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 25]> for &'a [u8]

§

fn compare(&self, t: [u8; 25]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 25]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 25]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 26]> for &'a [u8]

§

fn compare(&self, t: [u8; 26]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 26]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 26]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 27]> for &'a [u8]

§

fn compare(&self, t: [u8; 27]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 27]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 27]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 28]> for &'a [u8]

§

fn compare(&self, t: [u8; 28]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 28]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 28]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 29]> for &'a [u8]

§

fn compare(&self, t: [u8; 29]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 29]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 29]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 3]> for &'a [u8]

§

fn compare(&self, t: [u8; 3]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 3]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 3]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 30]> for &'a [u8]

§

fn compare(&self, t: [u8; 30]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 30]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 30]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 31]> for &'a [u8]

§

fn compare(&self, t: [u8; 31]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 31]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 31]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 32]> for &'a [u8]

§

fn compare(&self, t: [u8; 32]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 32]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 32]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 4]> for &'a [u8]

§

fn compare(&self, t: [u8; 4]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 4]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 4]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 5]> for &'a [u8]

§

fn compare(&self, t: [u8; 5]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 5]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 5]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 6]> for &'a [u8]

§

fn compare(&self, t: [u8; 6]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 6]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 6]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 7]> for &'a [u8]

§

fn compare(&self, t: [u8; 7]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 7]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 7]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 8]> for &'a [u8]

§

fn compare(&self, t: [u8; 8]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 8]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 8]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Compare<[u8; 9]> for &'a [u8]

§

fn compare(&self, t: [u8; 9]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; 9]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; 9]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<const LEN: usize> Compare<[u8; LEN]> for &[u8]

§

fn compare(&self, t: [u8; LEN]) -> CompareResult

Compares self to another value for equality
","Compare<[u8; LEN]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, const N: usize> Compare<[u8; N]> for &'a [u8]

§

fn compare(&self, t: [u8; N]) -> CompareResult

Compares self to another value for equality
§

fn compare_no_case(&self, t: [u8; N]) -> CompareResult

Compares self to another value for equality\nindependently of the case. Read more
","Compare<[u8; N]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'b> Compare<Caseless<&'b [u8]>> for &[u8]

§

fn compare(&self, t: Caseless<&'b [u8]>) -> CompareResult

Compares self to another value for equality
","Compare>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'b, const LEN: usize> Compare<Caseless<&'b [u8; LEN]>> for &[u8]

§

fn compare(&self, t: Caseless<&'b [u8; LEN]>) -> CompareResult

Compares self to another value for equality
","Compare>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'b> Compare<Caseless<&'b str>> for &[u8]

§

fn compare(&self, t: Caseless<&'b str>) -> CompareResult

Compares self to another value for equality
","Compare>","servers::prom_remote_write::types::RawBytes"],["
§

impl<const LEN: usize> Compare<Caseless<[u8; LEN]>> for &[u8]

§

fn compare(&self, t: Caseless<[u8; LEN]>) -> CompareResult

Compares self to another value for equality
","Compare>","servers::prom_remote_write::types::RawBytes"],["
§

impl Compare<Caseless<char>> for &[u8]

§

fn compare(&self, t: Caseless<char>) -> CompareResult

Compares self to another value for equality
","Compare>","servers::prom_remote_write::types::RawBytes"],["
§

impl Compare<Caseless<u8>> for &[u8]

§

fn compare(&self, t: Caseless<u8>) -> CompareResult

Compares self to another value for equality
","Compare>","servers::prom_remote_write::types::RawBytes"],["
§

impl Compare<char> for &[u8]

§

fn compare(&self, t: char) -> CompareResult

Compares self to another value for equality
","Compare","servers::prom_remote_write::types::RawBytes"],["
§

impl Compare<u8> for &[u8]

§

fn compare(&self, t: u8) -> CompareResult

Compares self to another value for equality
","Compare","servers::prom_remote_write::types::RawBytes"],["
§

impl<C> ContainsToken<C> for &[u8]
where\n C: AsChar,

§

fn contains_token(&self, token: C) -> bool

Returns true if self contains the token
","ContainsToken","servers::prom_remote_write::types::RawBytes"],["
§

impl<'r> Decode<'r, Any> for &'r [u8]

§

fn decode(\n value: <Any as Database>::ValueRef<'r>,\n) -> Result<&'r [u8], Box<dyn Error + Send + Sync>>

Decode a new value of this type using a raw value from the database.
","Decode<'r, Any>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'r> Decode<'r, MySql> for &'r [u8]

§

fn decode(\n value: MySqlValueRef<'r>,\n) -> Result<&'r [u8], Box<dyn Error + Send + Sync>>

Decode a new value of this type using a raw value from the database.
","Decode<'r, MySql>","servers::prom_remote_write::types::RawBytes"],["
1.0.0 (const: unstable) · Source§

impl<T> Default for &[T]

Source§

fn default() -> &[T]

Creates an empty slice.

\n
","Default","servers::prom_remote_write::types::RawBytes"],["
Source§

impl<'de, 'a> Deserialize<'de> for &'a [u8]
where\n 'de: 'a,

Source§

fn deserialize<D>(\n deserializer: D,\n) -> Result<&'a [u8], <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","servers::prom_remote_write::types::RawBytes"],["
§

impl<T> DeserializeFrom<T> for &[u8]
where\n T: BinarySerializable,

Implement deserialize from &u8 for all types which implement BinarySerializable.

\n

TryFrom would actually be preferable, but not possible because of the orphan\nrules (not completely sure if this could be resolved)

\n
§

fn deserialize(&mut self) -> Result<T, Error>

","DeserializeFrom","servers::prom_remote_write::types::RawBytes"],["
§

impl<'de> DeserializeOctets<'de> for &'de [u8]

§

type Visitor = BorrowedVisitor<&'de [u8]>

§

fn deserialize_octets<D>(\n deserializer: D,\n) -> Result<&'de [u8], <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

§

fn deserialize_with_visitor<D, V>(\n deserializer: D,\n visitor: V,\n) -> Result<<V as Visitor<'de>>::Value, <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,\n V: Visitor<'de>,

§

fn visitor() -> <&'de [u8] as DeserializeOctets<'de>>::Visitor ⓘ

","DeserializeOctets<'de>","servers::prom_remote_write::types::RawBytes"],["
§

impl Encode<'_, MySql> for &[u8]

§

fn encode_by_ref(\n &self,\n buf: &mut Vec<u8>,\n) -> Result<IsNull, Box<dyn Error + Send + Sync>>

Writes the value of self into buf without moving self. Read more
§

fn encode(\n self,\n buf: &mut <DB as Database>::ArgumentBuffer,\n) -> Result<IsNull, Box<dyn Error + Send + Sync>>
where\n Self: Sized,

Writes the value of self into buf in the expected format for the database.
§

fn produces(&self) -> Option<<DB as Database>::TypeInfo>

§

fn size_hint(&self) -> usize

","Encode<'_, MySql>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'q> Encode<'q, Any> for &'q [u8]

§

fn encode_by_ref(\n &self,\n buf: &mut <Any as Database>::ArgumentBuffer,\n) -> Result<IsNull, Box<dyn Error + Send + Sync>>

Writes the value of self into buf without moving self. Read more
§

fn encode(\n self,\n buf: &mut <DB as Database>::ArgumentBuffer,\n) -> Result<IsNull, Box<dyn Error + Send + Sync>>
where\n Self: Sized,

Writes the value of self into buf in the expected format for the database.
§

fn produces(&self) -> Option<<DB as Database>::TypeInfo>

§

fn size_hint(&self) -> usize

","Encode<'q, Any>","servers::prom_remote_write::types::RawBytes"],["
§

impl<T, E, F> EncodeAsVarULE<VarZeroSlice<T, F>> for &[E]
where\n T: VarULE + ?Sized,\n E: EncodeAsVarULE<T>,\n F: VarZeroVecFormat,

§

fn encode_var_ule_as_slices<R>(&self, _: impl FnOnce(&[&[u8]]) -> R) -> R

Calls cb with a piecewise list of byte slices that when concatenated\nproduce the memory pattern of the corresponding instance of T. Read more
§

fn encode_var_ule_len(&self) -> usize

Return the length, in bytes, of the corresponding [VarULE] type
§

fn encode_var_ule_write(&self, dst: &mut [u8])

Write the corresponding [VarULE] type to the dst buffer. dst should\nbe the size of [Self::encode_var_ule_len()]
","EncodeAsVarULE>","servers::prom_remote_write::types::RawBytes"],["
§

impl<T> EncodeAsVarULE<ZeroSlice<T>> for &[T]
where\n T: AsULE + 'static,

§

fn encode_var_ule_as_slices<R>(&self, _: impl FnOnce(&[&[u8]]) -> R) -> R

Calls cb with a piecewise list of byte slices that when concatenated\nproduce the memory pattern of the corresponding instance of T. Read more
§

fn encode_var_ule_len(&self) -> usize

Return the length, in bytes, of the corresponding [VarULE] type
§

fn encode_var_ule_write(&self, dst: &mut [u8])

Write the corresponding [VarULE] type to the dst buffer. dst should\nbe the size of [Self::encode_var_ule_len()]
","EncodeAsVarULE>","servers::prom_remote_write::types::RawBytes"],["
§

impl ExtendInto for &[u8]

Available on crate feature alloc only.
§

type Item = u8

The current input type is a sequence of that Item type. Read more
§

type Extender = Vec<u8>

The type that will be produced
§

fn new_builder(&self) -> Vec<u8> ⓘ

Create a new Extend of the correct type
§

fn extend_into(&self, acc: &mut Vec<u8>)

Accumulate the input into an accumulator
","ExtendInto","servers::prom_remote_write::types::RawBytes"],["
§

impl ExtendInto for &[u8]

Available on crate feature alloc only.
§

type Item = u8

The current input type is a sequence of that Item type. Read more
§

type Extender = Vec<u8>

The type that will be produced
§

fn new_builder(&self) -> Vec<u8> ⓘ

Create a new Extend of the correct type
§

fn extend_into(&self, acc: &mut Vec<u8>)

Accumulate the input into an accumulator
","ExtendInto","servers::prom_remote_write::types::RawBytes"],["
§

impl FileHandle for &'static [u8]

§

fn read_bytes(&self, range: Range<usize>) -> Result<OwnedBytes, Error>

Reads a slice of bytes. Read more
","FileHandle","servers::prom_remote_write::types::RawBytes"],["
§

impl<'s> FindSlice<&'s [u8]> for &[u8]

§

fn find_slice(&self, substr: &'s [u8]) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<&'s [u8]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'s> FindSlice<&'s str> for &[u8]

§

fn find_slice(&self, substr: &'s str) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<&'s str>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'s> FindSlice<(&'s [u8],)> for &[u8]

§

fn find_slice(&self, substr: (&'s [u8],)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(&'s [u8],)>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'s> FindSlice<(&'s [u8], &'s [u8])> for &[u8]

§

fn find_slice(&self, substr: (&'s [u8], &'s [u8])) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(&'s [u8], &'s [u8])>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'s> FindSlice<(&'s [u8], &'s [u8], &'s [u8])> for &[u8]

§

fn find_slice(\n &self,\n substr: (&'s [u8], &'s [u8], &'s [u8]),\n) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(&'s [u8], &'s [u8], &'s [u8])>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'s> FindSlice<(&'s str,)> for &[u8]

§

fn find_slice(&self, substr: (&'s str,)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(&'s str,)>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'s> FindSlice<(&'s str, &'s str)> for &[u8]

§

fn find_slice(&self, substr: (&'s str, &'s str)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(&'s str, &'s str)>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'s> FindSlice<(&'s str, &'s str, &'s str)> for &[u8]

§

fn find_slice(\n &self,\n substr: (&'s str, &'s str, &'s str),\n) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(&'s str, &'s str, &'s str)>","servers::prom_remote_write::types::RawBytes"],["
§

impl FindSlice<(char,)> for &[u8]

§

fn find_slice(&self, substr: (char,)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(char,)>","servers::prom_remote_write::types::RawBytes"],["
§

impl FindSlice<(char, char)> for &[u8]

§

fn find_slice(&self, substr: (char, char)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(char, char)>","servers::prom_remote_write::types::RawBytes"],["
§

impl FindSlice<(char, char, char)> for &[u8]

§

fn find_slice(&self, substr: (char, char, char)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(char, char, char)>","servers::prom_remote_write::types::RawBytes"],["
§

impl FindSlice<(u8,)> for &[u8]

§

fn find_slice(&self, substr: (u8,)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(u8,)>","servers::prom_remote_write::types::RawBytes"],["
§

impl FindSlice<(u8, u8)> for &[u8]

§

fn find_slice(&self, substr: (u8, u8)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(u8, u8)>","servers::prom_remote_write::types::RawBytes"],["
§

impl FindSlice<(u8, u8, u8)> for &[u8]

§

fn find_slice(&self, substr: (u8, u8, u8)) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice<(u8, u8, u8)>","servers::prom_remote_write::types::RawBytes"],["
§

impl FindSlice<char> for &[u8]

§

fn find_slice(&self, substr: char) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice","servers::prom_remote_write::types::RawBytes"],["
§

impl FindSlice<u8> for &[u8]

§

fn find_slice(&self, substr: u8) -> Option<Range<usize>>

Returns the offset of the slice if it is found
","FindSlice","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> FindSubstring<&'b [u8]> for &'a [u8]

§

fn find_substring(&self, substr: &'b [u8]) -> Option<usize>

Returns the byte position of the substring if it is found
","FindSubstring<&'b [u8]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> FindSubstring<&'b [u8]> for &'a [u8]

§

fn find_substring(&self, substr: &'b [u8]) -> Option<usize>

Returns the byte position of the substring if it is found
","FindSubstring<&'b [u8]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> FindSubstring<&'b str> for &'a [u8]

§

fn find_substring(&self, substr: &'b str) -> Option<usize>

Returns the byte position of the substring if it is found
","FindSubstring<&'b str>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> FindSubstring<&'b str> for &'a [u8]

§

fn find_substring(&self, substr: &'b str) -> Option<usize>

Returns the byte position of the substring if it is found
","FindSubstring<&'b str>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> FindToken<&'a u8> for &'b [u8]

§

fn find_token(&self, token: &u8) -> bool

Returns true if self contains the token
","FindToken<&'a u8>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, 'b> FindToken<&'a u8> for &'b [u8]

§

fn find_token(&self, token: &u8) -> bool

Returns true if self contains the token
","FindToken<&'a u8>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> FindToken<char> for &'a [u8]

§

fn find_token(&self, token: char) -> bool

Returns true if self contains the token
","FindToken","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> FindToken<char> for &'a [u8]

§

fn find_token(&self, token: char) -> bool

Returns true if self contains the token
","FindToken","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> FindToken<u8> for &'a [u8]

§

fn find_token(&self, token: u8) -> bool

Returns true if self contains the token
","FindToken","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> FindToken<u8> for &'a [u8]

§

fn find_token(&self, token: u8) -> bool

Returns true if self contains the token
","FindToken","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Follow<'a> for &'a [u8]

§

type Inner = &'a [u8]

§

unsafe fn follow(buf: &'a [u8], loc: usize) -> <&'a [u8] as Follow<'a>>::Inner ⓘ

Safety Read more
","Follow<'a>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> From<&'a BStr> for &'a [u8]

§

fn from(s: &'a BStr) -> &'a [u8] ⓘ

Converts to this type from the input type.
","From<&'a BStr>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> From<&'a BStr> for &'a [u8]

§

fn from(s: &'a BStr) -> &'a [u8] ⓘ

Converts to this type from the input type.
","From<&'a BStr>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> From<&'a Bytes> for &'a [u8]

§

fn from(s: &'a Bytes) -> &'a [u8] ⓘ

Converts to this type from the input type.
","From<&'a Bytes>","servers::prom_remote_write::types::RawBytes"],["
Source§

impl<'a, T, R, C, S> From<&'a Matrix<T, R, C, S>> for &'a [T]
where\n T: Scalar + Copy,\n R: Dim,\n C: Dim,\n S: RawStorage<T, R, C> + IsContiguous,

Source§

fn from(matrix: &'a Matrix<T, R, C, S>) -> &'a [T]

Converts to this type from the input type.
","From<&'a Matrix>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> From<&'a OctetStringRef> for &'a [u8]

§

fn from(octet_string: &'a OctetStringRef) -> &'a [u8] ⓘ

Converts to this type from the input type.
","From<&'a OctetStringRef>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'h> From<Match<'h>> for &'h [u8]

§

fn from(m: Match<'h>) -> &'h [u8] ⓘ

Converts to this type from the input type.
","From>","servers::prom_remote_write::types::RawBytes"],["
Source§

impl<'a, T> From<Matrix<T, Dyn, Const<1>, ViewStorage<'a, T, Dyn, Const<1>, Const<1>, Dyn>>> for &'a [T]
where\n T: Scalar,

Source§

fn from(\n vec: Matrix<T, Dyn, Const<1>, ViewStorage<'a, T, Dyn, Const<1>, Const<1>, Dyn>>,\n) -> &'a [T]

Converts to this type from the input type.
","From, ViewStorage<'a, T, Dyn, Const<1>, Const<1>, Dyn>>>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> From<OctetStringRef<'a>> for &'a [u8]

§

fn from(octet_string: OctetStringRef<'a>) -> &'a [u8] ⓘ

Converts to this type from the input type.
","From>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> From<Value<'a>> for &'a [u8]

§

fn from(val: Value<'a>) -> &'a [u8] ⓘ

Converts to this type from the input type.
","From>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> From<VideotexStringRef<'a>> for &'a [u8]

§

fn from(printable_string: VideotexStringRef<'a>) -> &'a [u8] ⓘ

Converts to this type from the input type.
","From>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> From<VideotexStringRef<'a>> for &'a [u8]

§

fn from(videotex_string: VideotexStringRef<'a>) -> &'a [u8] ⓘ

Converts to this type from the input type.
","From>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> FromBytesWithInput<'a> for &'a [u8]

§

type Input = usize

The type of the additional input.
§

fn from_bytes_with_input(\n buffer: &mut Cursor<&'a [u8]>,\n input: usize,\n) -> Result<&'a [u8], DeError>

Takes a byte buffer and an additional input and returns\nthe deserialized data structure.
","FromBytesWithInput<'a>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> FromSql<'a> for &'a [u8]

§

fn from_sql(\n _: &Type,\n raw: &'a [u8],\n) -> Result<&'a [u8], Box<dyn Error + Send + Sync>>

Creates a new value of this type from a buffer of data of the specified\nPostgres Type in its binary format. Read more
§

fn accepts(ty: &Type) -> bool

Determines if a value of this type can be created from the specified\nPostgres Type.
§

fn from_sql_null(ty: &Type) -> Result<Self, Box<dyn Error + Send + Sync>>

Creates a new value of this type from a NULL SQL value. Read more
§

fn from_sql_nullable(\n ty: &Type,\n raw: Option<&'a [u8]>,\n) -> Result<Self, Box<dyn Error + Send + Sync>>

A convenience function that delegates to from_sql and from_sql_null depending on the\nvalue of raw.
","FromSql<'a>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Input for &'a [u8]

§

fn split_at_position_mode<OM, P, E>(\n &self,\n predicate: P,\n) -> Result<(&'a [u8], <<OM as OutputMode>::Output as Mode>::Output<&'a [u8]>), Err<E, <<OM as OutputMode>::Error as Mode>::Output<E>>>
where\n OM: OutputMode,\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as Input>::Item) -> bool,

mode version of split_at_position

\n
§

fn split_at_position_mode1<OM, P, E>(\n &self,\n predicate: P,\n e: ErrorKind,\n) -> Result<(&'a [u8], <<OM as OutputMode>::Output as Mode>::Output<&'a [u8]>), Err<E, <<OM as OutputMode>::Error as Mode>::Output<E>>>
where\n OM: OutputMode,\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as Input>::Item) -> bool,

mode version of split_at_position

\n
§

type Item = u8

The current input type is a sequence of that Item type. Read more
§

type Iter = Copied<Iter<'a, u8>>

An iterator over the input type, producing the item
§

type IterIndices = Enumerate<<&'a [u8] as Input>::Iter>

An iterator over the input type, producing the item and its byte position\nIf we’re iterating over &str, the position\ncorresponds to the byte index of the character
§

fn input_len(&self) -> usize

Calculates the input length, as indicated by its name,\nand the name of the trait itself
§

fn take(&self, index: usize) -> &'a [u8] ⓘ

Returns a slice of index bytes. panics if index > length
§

fn take_from(&self, index: usize) -> &'a [u8] ⓘ

Returns a slice starting at index bytes. panics if index > length
§

fn take_split(&self, index: usize) -> (&'a [u8], &'a [u8])

Split the stream at the index byte offset. panics if index > length
§

fn position<P>(&self, predicate: P) -> Option<usize>
where\n P: Fn(<&'a [u8] as Input>::Item) -> bool,

Returns the byte position of the first element satisfying the predicate
§

fn iter_elements(&self) -> <&'a [u8] as Input>::Iter ⓘ

Returns an iterator over the elements
§

fn iter_indices(&self) -> <&'a [u8] as Input>::IterIndices ⓘ

Returns an iterator over the elements and their byte offsets
§

fn slice_index(&self, count: usize) -> Result<usize, Needed>

Get the byte offset from the element’s position in the stream
§

fn split_at_position<P, E>(\n &self,\n predicate: P,\n) -> Result<(&'a [u8], &'a [u8]), Err<E>>
where\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as Input>::Item) -> bool,

Looks for the first element of the input type for which the condition returns true,\nand returns the input up to this position. Read more
§

fn split_at_position1<P, E>(\n &self,\n predicate: P,\n e: ErrorKind,\n) -> Result<(&'a [u8], &'a [u8]), Err<E>>
where\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as Input>::Item) -> bool,

Looks for the first element of the input type for which the condition returns true\nand returns the input up to this position. Read more
§

fn split_at_position_complete<P, E>(\n &self,\n predicate: P,\n) -> Result<(&'a [u8], &'a [u8]), Err<E>>
where\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as Input>::Item) -> bool,

Looks for the first element of the input type for which the condition returns true,\nand returns the input up to this position. Read more
§

fn split_at_position1_complete<P, E>(\n &self,\n predicate: P,\n e: ErrorKind,\n) -> Result<(&'a [u8], &'a [u8]), Err<E>>
where\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as Input>::Item) -> bool,

Looks for the first element of the input type for which the condition returns true\nand returns the input up to this position. Read more
","Input","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> InputIter for &'a [u8]

§

type Item = u8

The current input type is a sequence of that Item type. Read more
§

type Iter = Enumerate<<&'a [u8] as InputIter>::IterElem>

An iterator over the input type, producing the item and its position\nfor use with [Slice]. If we’re iterating over &str, the position\ncorresponds to the byte index of the character
§

type IterElem = Copied<Iter<'a, u8>>

An iterator over the input type, producing the item
§

fn iter_indices(&self) -> <&'a [u8] as InputIter>::Iter ⓘ

Returns an iterator over the elements and their byte offsets
§

fn iter_elements(&self) -> <&'a [u8] as InputIter>::IterElem ⓘ

Returns an iterator over the elements
§

fn position<P>(&self, predicate: P) -> Option<usize>
where\n P: Fn(<&'a [u8] as InputIter>::Item) -> bool,

Finds the byte position of the element
§

fn slice_index(&self, count: usize) -> Result<usize, Needed>

Get the byte offset from the element’s position in the stream
","InputIter","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, T> InputLength for &'a [T]

§

fn input_len(&self) -> usize

Calculates the input length, as indicated by its name,\nand the name of the trait itself
","InputLength","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> InputTake for &'a [u8]

§

fn take(&self, count: usize) -> &'a [u8] ⓘ

Returns a slice of count bytes. panics if count > length
§

fn take_split(&self, count: usize) -> (&'a [u8], &'a [u8])

Split the stream at the count byte offset. panics if count > length
","InputTake","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> InputTakeAtPosition for &'a [u8]

§

type Item = u8

The current input type is a sequence of that Item type. Read more
§

fn split_at_position<P, E>(\n &self,\n predicate: P,\n) -> Result<(&'a [u8], &'a [u8]), Err<E>>
where\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as InputTakeAtPosition>::Item) -> bool,

Looks for the first element of the input type for which the condition returns true,\nand returns the input up to this position. Read more
§

fn split_at_position1<P, E>(\n &self,\n predicate: P,\n e: ErrorKind,\n) -> Result<(&'a [u8], &'a [u8]), Err<E>>
where\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as InputTakeAtPosition>::Item) -> bool,

Looks for the first element of the input type for which the condition returns true\nand returns the input up to this position. Read more
§

fn split_at_position_complete<P, E>(\n &self,\n predicate: P,\n) -> Result<(&'a [u8], &'a [u8]), Err<E>>
where\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as InputTakeAtPosition>::Item) -> bool,

Looks for the first element of the input type for which the condition returns true,\nand returns the input up to this position. Read more
§

fn split_at_position1_complete<P, E>(\n &self,\n predicate: P,\n e: ErrorKind,\n) -> Result<(&'a [u8], &'a [u8]), Err<E>>
where\n E: ParseError<&'a [u8]>,\n P: Fn(<&'a [u8] as InputTakeAtPosition>::Item) -> bool,

Looks for the first element of the input type for which the condition returns true\nand returns the input up to this position. Read more
","InputTakeAtPosition","servers::prom_remote_write::types::RawBytes"],["
§

impl IntoArrayRef for &[u8]

§

fn into_array_ref(self) -> Arc<dyn Array> ⓘ

","IntoArrayRef","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> IntoBuilder for &'a [u8]

Available on crate feature alloc only.
§

type Builder = Vec<u8>

The type of octets builder this octets type can be converted into.
§

fn into_builder(self) -> <&'a [u8] as IntoBuilder>::Builder ⓘ

Converts an octets value into an octets builder.
","IntoBuilder","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> IntoByteSlice<'a> for &'a [u8]

§

fn into_byte_slice(self) -> &'a [u8] ⓘ

Coverts self into a &[u8]. Read more
","IntoByteSlice<'a>","servers::prom_remote_write::types::RawBytes"],["
Source§

impl<'de, 'a, E> IntoDeserializer<'de, E> for &'a [u8]
where\n E: Error,

Source§

type Deserializer = BytesDeserializer<'a, E>

The type of the deserializer being converted into.
Source§

fn into_deserializer(self) -> BytesDeserializer<'a, E>

Convert this value into a deserializer.
","IntoDeserializer<'de, E>","servers::prom_remote_write::types::RawBytes"],["
1.0.0 · Source§

impl<'a, T> IntoIterator for &'a [T]

Source§

type Item = &'a T

The type of the elements being iterated over.
Source§

type IntoIter = Iter<'a, T>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Iter<'a, T>

Creates an iterator from a value. Read more
","IntoIterator","servers::prom_remote_write::types::RawBytes"],["
§

impl<'data, T> IntoParallelIterator for &'data [T]
where\n T: Sync + 'data,

§

type Item = &'data T

The type of item that the parallel iterator will produce.
§

type Iter = Iter<'data, T>

The parallel iterator type that will be created.
§

fn into_par_iter(self) -> <&'data [T] as IntoParallelIterator>::Iter ⓘ

Converts self into a parallel iterator. Read more
","IntoParallelIterator","servers::prom_remote_write::types::RawBytes"],["
§

impl IntoResponse for &'static [u8]

§

fn into_response(self) -> Response<Body>

Create a response.
","IntoResponse","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> IntoSource for &'a [u8]

§

type Source = SliceSource<'a>

§

fn into_source(self) -> <&'a [u8] as IntoSource>::Source ⓘ

","IntoSource","servers::prom_remote_write::types::RawBytes"],["
§

impl Literal for &[u8]

§

fn lit(&self) -> Expr

convert the value to a Literal expression
","Literal","servers::prom_remote_write::types::RawBytes"],["
§

impl<'de> MyDeserialize<'de> for &'de [u8]

§

const SIZE: Option<usize> = None

Size hint of a serialized value (in bytes), if it’s constant.
§

type Ctx = usize

Some structs defines deserialization in the context of another value. Read more
§

fn deserialize(\n len: <&'de [u8] as MyDeserialize<'de>>::Ctx,\n buf: &mut ParseBuf<'de>,\n) -> Result<&'de [u8], Error>

Deserializes self from the given buf. Read more
","MyDeserialize<'de>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'de> MyDeserialize<'de> for &'de [u8]

§

const SIZE: Option<usize> = None

Size hint of a serialized value (in bytes), if it’s constant.
§

type Ctx = usize

Some structs defines deserialization in the context of another value. Read more
§

fn deserialize(\n len: <&'de [u8] as MyDeserialize<'de>>::Ctx,\n buf: &mut ParseBuf<'de>,\n) -> Result<&'de [u8], Error>

Deserializes self from the given buf. Read more
","MyDeserialize<'de>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'de> MyDeserialize<'de> for &'de [u8]

§

const SIZE: Option<usize> = None

Size hint of a serialized value (in bytes), if it’s constant.
§

type Ctx = usize

Some structs defines deserialization in the context of another value. Read more
§

fn deserialize(\n len: <&'de [u8] as MyDeserialize<'de>>::Ctx,\n buf: &mut ParseBuf<'de>,\n) -> Result<&'de [u8], Error>

Deserializes self from the given buf. Read more
","MyDeserialize<'de>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, Source> OctetsFrom<&'a Source> for &'a [u8]
where\n Source: AsRef<[u8]> + 'a,

§

type Error = Infallible

§

fn try_octets_from(\n source: &'a Source,\n) -> Result<&'a [u8], <&'a [u8] as OctetsFrom<&'a Source>>::Error>

Performs the conversion.
§

fn octets_from(source: Source) -> Self
where\n Self::Error: Into<Infallible>,

Performs an infallible conversion.
","OctetsFrom<&'a Source>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, T> Offset<<&'a [T] as Stream>::Checkpoint> for &'a [T]
where\n T: Clone + Debug,

§

fn offset_from(&self, other: &<&'a [T] as Stream>::Checkpoint) -> usize

Offset between the first byte of start and the first byte of selfa Read more
","Offset<<&'a [T] as Stream>::Checkpoint>","servers::prom_remote_write::types::RawBytes"],["
§

impl<T> Offset for &[T]

§

fn offset_from(&self, start: &&[T]) -> usize

Offset between the first byte of start and the first byte of selfa Read more
","Offset","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Offset for &'a [u8]

§

fn offset(&self, second: &&'a [u8]) -> usize

Offset between the first byte of self and the first byte of the argument
","Offset","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Offset for &'a [u8]

§

fn offset(&self, second: &&'a [u8]) -> usize

Offset between the first byte of self and the first byte of the argument\nthe argument must be a part of self, otherwise this can fail with arithmetic\nunderflows as it compares byte offsets
","Offset","servers::prom_remote_write::types::RawBytes"],["
§

impl<'b, P, T> OverlayResource<P, T> for &'b [P]
where\n P: FloatPointCompatible<T>,\n T: FloatNumber,

§

type ResourceIter<'a> = SingleResourceIterator<'a, P>\nwhere\n P: 'a,\n &'b [P]: 'a

§

fn iter_paths(&self) -> <&'b [P] as OverlayResource<P, T>>::ResourceIter<'b> ⓘ

","OverlayResource","servers::prom_remote_write::types::RawBytes"],["
§

impl<R> ParseSlice<R> for &[u8]
where\n R: FromStr,

§

fn parse_slice(&self) -> Option<R>

Succeeds if parse() succeeded Read more
","ParseSlice","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, R> ParseTo<R> for &'a [u8]
where\n R: FromStr,

§

fn parse_to(&self) -> Option<R>

Succeeds if parse() succeeded. The byte slice implementation\nwill first convert it to a &str, then apply the parse() function
","ParseTo","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, R> ParseTo<R> for &'a [u8]
where\n R: FromStr,

§

fn parse_to(&self) -> Option<R>

Succeeds if parse() succeeded. The byte slice implementation\nwill first convert it to a &str, then apply the parse() function
","ParseTo","servers::prom_remote_write::types::RawBytes"],["
§

impl<'s, I, E> Parser<I, <I as Stream>::Slice, E> for &'s [u8]
where\n E: ParserError<I>,\n I: Compare<&'s [u8]> + StreamIsPartial + Stream,

This is a shortcut for [literal][crate::token::literal].

\n

§Example

\n
\nfn parser<'s>(s: &mut &'s [u8]) -> ModalResult<&'s [u8]> {\n  alt((&\"Hello\"[..], take(5usize))).parse_next(s)\n}\n\nassert_eq!(parser.parse_peek(&b\"Hello, World!\"[..]), Ok((&b\", World!\"[..], &b\"Hello\"[..])));\nassert_eq!(parser.parse_peek(&b\"Something\"[..]), Ok((&b\"hing\"[..], &b\"Somet\"[..])));\nassert!(parser.parse_peek(&b\"Some\"[..]).is_err());\nassert!(parser.parse_peek(&b\"\"[..]).is_err());
§

fn parse_next(&mut self, i: &mut I) -> Result<<I as Stream>::Slice, E>

Take tokens from the [Stream], turning it into the output Read more
§

fn parse(\n &mut self,\n input: I,\n) -> Result<O, ParseError<I, <E as ParserError<I>>::Inner>>
where\n Self: Sized,\n I: Stream + StreamIsPartial,\n E: ParserError<I>,\n <E as ParserError<I>>::Inner: ParserError<I>,

Parse all of input, generating O from it
§

fn parse_peek(&mut self, input: I) -> Result<(I, O), E>

Take tokens from the [Stream], turning it into the output Read more
§

fn by_ref(&mut self) -> ByRef<'_, Self, I, O, E>
where\n Self: Sized,

Treat &mut Self as a parser Read more
§

fn value<O2>(self, val: O2) -> Value<Self, I, O, O2, E>
where\n Self: Sized,\n O2: Clone,

Produce the provided value Read more
§

fn default_value<O2>(self) -> DefaultValue<Self, I, O, O2, E>
where\n Self: Sized,\n O2: Default,

Produce a type’s default value Read more
§

fn void(self) -> Void<Self, I, O, E>
where\n Self: Sized,

Discards the output of the Parser Read more
§

fn output_into<O2>(self) -> OutputInto<Self, I, O, O2, E>
where\n Self: Sized,\n O: Into<O2>,

Convert the parser’s output to another type using std::convert::From Read more
§

fn take(self) -> Take<Self, I, O, E>
where\n Self: Sized,\n I: Stream,

Produce the consumed input as produced value. Read more
§

fn with_taken(self) -> WithTaken<Self, I, O, E>
where\n Self: Sized,\n I: Stream,

Produce the consumed input with the output Read more
§

fn span(self) -> Span<Self, I, O, E>
where\n Self: Sized,\n I: Stream + Location,

Produce the location of the consumed input as produced value. Read more
§

fn with_span(self) -> WithSpan<Self, I, O, E>
where\n Self: Sized,\n I: Stream + Location,

Produce the location of consumed input with the output Read more
§

fn map<G, O2>(self, map: G) -> Map<Self, G, I, O, O2, E>
where\n G: FnMut(O) -> O2,\n Self: Sized,

Maps a function over the output of a parser Read more
§

fn try_map<G, O2, E2>(self, map: G) -> TryMap<Self, G, I, O, O2, E, E2>
where\n Self: Sized,\n G: FnMut(O) -> Result<O2, E2>,\n I: Stream,\n E: FromExternalError<I, E2> + ParserError<I>,

Applies a function returning a Result over the output of a parser. Read more
§

fn verify_map<G, O2>(self, map: G) -> VerifyMap<Self, G, I, O, O2, E>
where\n Self: Sized,\n G: FnMut(O) -> Option<O2>,\n I: Stream,\n E: ParserError<I>,

Apply both [Parser::verify] and [Parser::map]. Read more
§

fn flat_map<G, H, O2>(self, map: G) -> FlatMap<Self, G, H, I, O, O2, E>
where\n Self: Sized,\n G: FnMut(O) -> H,\n H: Parser<I, O2, E>,

Creates a parser from the output of this one Read more
§

fn and_then<G, O2>(self, inner: G) -> AndThen<Self, G, I, O, O2, E>
where\n Self: Sized,\n G: Parser<O, O2, E>,\n O: StreamIsPartial,\n I: Stream,

Applies a second parser over the output of the first one Read more
§

fn parse_to<O2>(self) -> ParseTo<Self, I, O, O2, E>
where\n Self: Sized,\n I: Stream,\n O: ParseSlice<O2>,\n E: ParserError<I>,

Apply std::str::FromStr to the output of the parser Read more
§

fn verify<G, O2>(self, filter: G) -> Verify<Self, G, I, O, O2, E>
where\n Self: Sized,\n G: FnMut(&O2) -> bool,\n I: Stream,\n O: Borrow<O2>,\n E: ParserError<I>,\n O2: ?Sized,

Returns the output of the child parser if it satisfies a verification function. Read more
§

fn context<C>(self, context: C) -> Context<Self, I, O, E, C>
where\n Self: Sized,\n I: Stream,\n E: AddContext<I, C> + ParserError<I>,\n C: Clone + Debug,

If parsing fails, add context to the error Read more
§

fn context_with<F, C, FI>(\n self,\n context: F,\n) -> ContextWith<Self, I, O, E, F, C, FI>
where\n Self: Sized,\n I: Stream,\n E: AddContext<I, C> + ParserError<I>,\n F: Fn() -> FI + Clone,\n C: Debug,\n FI: Iterator<Item = C>,

If parsing fails, dynamically add context to the error Read more
§

fn map_err<G, E2>(self, map: G) -> MapErr<Self, G, I, O, E, E2>
where\n G: FnMut(E) -> E2,\n Self: Sized,

Maps a function over the error of a parser Read more
§

fn complete_err(self) -> CompleteErr<Self, I, O, E>
where\n Self: Sized,

Transforms [Incomplete][crate::error::ErrMode::Incomplete] into [Backtrack][crate::error::ErrMode::Backtrack] Read more
§

fn err_into<E2>(self) -> ErrInto<Self, I, O, E, E2>
where\n Self: Sized,\n E: Into<E2>,

Convert the parser’s error to another type using std::convert::From
","Parser::Slice, E>","servers::prom_remote_write::types::RawBytes"],["
1.0.0 (const: unstable) · Source§

impl<T, U, const N: usize> PartialEq<[U; N]> for &[T]
where\n T: PartialEq<U>,

Source§

fn eq(&self, other: &[U; N]) -> bool

Tests for self and other values to be equal, and is used by ==.
Source§

fn ne(&self, other: &[U; N]) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq<[U; N]>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> PartialEq<BStr> for &'a [u8]

§

fn eq(&self, other: &BStr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> PartialEq<BStr> for &'a [u8]

§

fn eq(&self, other: &BStr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> PartialEq<BString> for &'a [u8]

§

fn eq(&self, other: &BString) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","servers::prom_remote_write::types::RawBytes"],["
Source§

impl PartialEq<ByteStr> for &[u8]

Source§

fn eq(&self, other: &ByteStr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","servers::prom_remote_write::types::RawBytes"],["
Source§

impl PartialEq<ByteString> for &[u8]

Source§

fn eq(&self, other: &ByteString) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","servers::prom_remote_write::types::RawBytes"],["
§

impl PartialEq<Bytes> for &[u8]

§

fn eq(&self, other: &Bytes) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> PartialEq<Bytes> for &'a [u8]

§

fn eq(&self, other: &Bytes) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","servers::prom_remote_write::types::RawBytes"],["
§

impl PartialEq<BytesMut> for &[u8]

§

fn eq(&self, other: &BytesMut) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq","servers::prom_remote_write::types::RawBytes"],["
§

impl<A, B, const N: usize> PartialEq<Vec<A, N>> for &[B]
where\n A: PartialEq<B>,

§

fn eq(&self, other: &Vec<A, N>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq>","servers::prom_remote_write::types::RawBytes"],["
§

impl<T, U, A> PartialEq<Vec<U, A>> for &[T]
where\n A: Allocator,\n T: PartialEq<U>,

§

fn eq(&self, other: &Vec<U, A>) -> bool

Tests for self and other values to be equal, and is used by ==.
§

fn ne(&self, other: &Vec<U, A>) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq>","servers::prom_remote_write::types::RawBytes"],["
1.46.0 (const: unstable) · Source§

impl<T, U, A> PartialEq<Vec<U, A>> for &[T]
where\n A: Allocator,\n T: PartialEq<U>,

Source§

fn eq(&self, other: &Vec<U, A>) -> bool

Tests for self and other values to be equal, and is used by ==.
Source§

fn ne(&self, other: &Vec<U, A>) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq>","servers::prom_remote_write::types::RawBytes"],["
§

impl<T> PartialEq<Vec1<T>> for &[T]
where\n T: PartialEq,

§

fn eq(&self, other: &Vec1<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq>","servers::prom_remote_write::types::RawBytes"],["
§

impl<T> PartialEq<VecList<T>> for &[T]
where\n T: PartialEq,

§

fn eq(&self, other: &VecList<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
","PartialEq>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> PartialOrd<BStr> for &'a [u8]

§

fn partial_cmp(&self, other: &BStr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> PartialOrd<BStr> for &'a [u8]

§

fn partial_cmp(&self, other: &BStr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> PartialOrd<BString> for &'a [u8]

§

fn partial_cmp(&self, other: &BString) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","servers::prom_remote_write::types::RawBytes"],["
§

impl PartialOrd<Bytes> for &[u8]

§

fn partial_cmp(&self, other: &Bytes) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> PartialOrd<Bytes> for &'a [u8]

§

fn partial_cmp(&self, other: &Bytes) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","servers::prom_remote_write::types::RawBytes"],["
§

impl PartialOrd<BytesMut> for &[u8]

§

fn partial_cmp(&self, other: &BytesMut) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the >\noperator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
","PartialOrd","servers::prom_remote_write::types::RawBytes"],["
Source§

impl<'a> PhfBorrow<[u8]> for &'a [u8]

Source§

fn borrow(&self) -> &[u8] ⓘ

Convert a reference to self to a reference to the borrowed type.
","PhfBorrow<[u8]>","servers::prom_remote_write::types::RawBytes"],["
Source§

impl PhfBorrow<[u8]> for &[u8]

Source§

fn borrow(&self) -> &[u8] ⓘ

Convert a reference to self to a reference to the borrowed type.
","PhfBorrow<[u8]>","servers::prom_remote_write::types::RawBytes"],["
§

impl PrimitiveContent for &[u8]

§

const TAG: Tag = Tag::OCTET_STRING

The natural tag of an encoded value of this type.
§

fn encoded_len(&self, _: Mode) -> usize

Returns the length of the encoded content of this type.
§

fn write_encoded<W>(&self, _: Mode, target: &mut W) -> Result<(), Error>
where\n W: Write,

Writes the encoded content to a writer.
§

fn to_encoded_bytes(&self, mode: Mode) -> Bytes

Encodes the value to bytes (useful when you need to sign a structure)
§

fn encode(self) -> Primitive<Self>

Returns a value encoder for this content using the natural tag. Read more
§

fn encode_as(self, tag: Tag) -> Primitive<Self>

Returns a value encoder for this content using the given tag. Read more
§

fn encode_ref(&self) -> Primitive<&Self>

Returns a value encoder for a reference using the natural tag.
§

fn encode_ref_as(&self, tag: Tag) -> Primitive<&Self>

Returns a value encoder for a reference using the given tag.
","PrimitiveContent","servers::prom_remote_write::types::RawBytes"],["
§

impl<C> ProtocolEncode<'_, C> for &[u8]

§

fn encode_with(&self, buf: &mut Vec<u8>, _context: C) -> Result<(), Error>

§

fn encode(&self, buf: &mut Vec<u8>) -> Result<(), Error>
where\n Self: ProtocolEncode<'en>,

","ProtocolEncode<'_, C>","servers::prom_remote_write::types::RawBytes"],["
§

impl Pushable for &[u8]

§

fn push_to_builder(self, builder: &mut Builder)

","Pushable","servers::prom_remote_write::types::RawBytes"],["
1.0.0 · Source§

impl Read for &[u8]

Read is implemented for &[u8] by copying from the slice.

\n

Note that reading updates the slice to point to the yet unread part.\nThe slice will be empty when EOF is reached.

\n
Source§

fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>

Pull some bytes from this source into the specified buffer, returning\nhow many bytes were read. Read more
Source§

fn read_buf(&mut self, cursor: BorrowedCursor<'_, u8>) -> Result<(), Error>

🔬This is a nightly-only experimental API. (read_buf)
Pull some bytes from this source into the specified buffer. Read more
Source§

fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>

Like read, except that it reads into a slice of buffers. Read more
Source§

fn is_read_vectored(&self) -> bool

🔬This is a nightly-only experimental API. (can_vector)
Determines if this Reader has an efficient read_vectored\nimplementation. Read more
Source§

fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>

Reads the exact number of bytes required to fill buf. Read more
Source§

fn read_buf_exact(\n &mut self,\n cursor: BorrowedCursor<'_, u8>,\n) -> Result<(), Error>

🔬This is a nightly-only experimental API. (read_buf)
Reads the exact number of bytes required to fill cursor. Read more
Source§

fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>

Reads all bytes until EOF in this source, placing them into buf. Read more
Source§

fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>

Reads all bytes until EOF in this source, appending them to buf. Read more
1.0.0 · Source§

fn by_ref(&mut self) -> &mut Self
where\n Self: Sized,

Creates a “by reference” adapter for this instance of Read. Read more
1.0.0 · Source§

fn bytes(self) -> Bytes<Self>
where\n Self: Sized,

Transforms this Read instance to an Iterator over its bytes. Read more
1.0.0 · Source§

fn chain<R>(self, next: R) -> Chain<Self, R>
where\n R: Read,\n Self: Sized,

Creates an adapter which will chain this stream with another. Read more
1.0.0 · Source§

fn take(self, limit: u64) -> Take<Self>
where\n Self: Sized,

Creates an adapter which will read at most limit bytes from it. Read more
Source§

fn read_array<const N: usize>(&mut self) -> Result<[u8; N], Error>
where\n Self: Sized,

🔬This is a nightly-only experimental API. (read_array)
Read and return a fixed array of bytes from this source. Read more
Source§

fn read_le<T>(&mut self) -> Result<T, Error>
where\n T: FromEndianBytes,\n Self: Sized,

🔬This is a nightly-only experimental API. (read_le)
Read and return a type (e.g. an integer) in little-endian order. Read more
Source§

fn read_be<T>(&mut self) -> Result<T, Error>
where\n T: FromEndianBytes,\n Self: Sized,

🔬This is a nightly-only experimental API. (read_le)
Read and return a type (e.g. an integer) in big-endian order. Read more
","Read","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> ReadRef<'a> for &'a [u8]

§

fn len(self) -> Result<u64, ()>

The total size of the block of data.
§

fn read_bytes_at(self, offset: u64, size: u64) -> Result<&'a [u8], ()>

Get a reference to a u8 slice at the given offset. Read more
§

fn read_bytes_at_until(\n self,\n range: Range<u64>,\n delimiter: u8,\n) -> Result<&'a [u8], ()>

Get a reference to a delimited u8 slice which starts at range.start. Read more
§

fn read_bytes(self, offset: &mut u64, size: u64) -> Result<&'a [u8], ()>

Get a reference to a u8 slice at the given offset, and update the offset. Read more
§

fn read<T>(self, offset: &mut u64) -> Result<&'a T, ()>
where\n T: Pod,

Get a reference to a Pod type at the given offset, and update the offset. Read more
§

fn read_at<T>(self, offset: u64) -> Result<&'a T, ()>
where\n T: Pod,

Get a reference to a Pod type at the given offset. Read more
§

fn read_slice<T>(self, offset: &mut u64, count: usize) -> Result<&'a [T], ()>
where\n T: Pod,

Get a reference to a slice of a Pod type at the given offset, and update the offset. Read more
§

fn read_slice_at<T>(self, offset: u64, count: usize) -> Result<&'a [T], ()>
where\n T: Pod,

Get a reference to a slice of a Pod type at the given offset. Read more
","ReadRef<'a>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> ReadRef<'a> for &'a [u8]

§

fn len(self) -> Result<u64, ()>

The total size of the block of data.
§

fn read_bytes_at(self, offset: u64, size: u64) -> Result<&'a [u8], ()>

Get a reference to a u8 slice at the given offset. Read more
§

fn read_bytes_at_until(\n self,\n range: Range<u64>,\n delimiter: u8,\n) -> Result<&'a [u8], ()>

Get a reference to a delimited u8 slice which starts at range.start. Read more
§

fn read_bytes(self, offset: &mut u64, size: u64) -> Result<&'a [u8], ()>

Get a reference to a u8 slice at the given offset, and update the offset. Read more
§

fn read<T>(self, offset: &mut u64) -> Result<&'a T, ()>
where\n T: Pod,

Get a reference to a Pod type at the given offset, and update the offset. Read more
§

fn read_at<T>(self, offset: u64) -> Result<&'a T, ()>
where\n T: Pod,

Get a reference to a Pod type at the given offset. Read more
§

fn read_slice<T>(self, offset: &mut u64, count: usize) -> Result<&'a [T], ()>
where\n T: Pod,

Get a reference to a slice of a Pod type at the given offset, and update the offset. Read more
§

fn read_slice_at<T>(self, offset: u64, count: usize) -> Result<&'a [T], ()>
where\n T: Pod,

Get a reference to a slice of a Pod type at the given offset. Read more
","ReadRef<'a>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> RefToOwned<'a> for &'a [u8]

§

type Owned = Box<[u8]>

The resulting type after obtaining ownership.
§

fn ref_to_owned(&self) -> <&'a [u8] as RefToOwned<'a>>::Owned ⓘ

Creates a new object taking ownership of the data
","RefToOwned<'a>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> RefToOwned<'a> for &'a [u8]

§

type Owned = Box<[u8]>

The resulting type after obtaining ownership.
§

fn ref_to_owned(&self) -> <&'a [u8] as RefToOwned<'a>>::Owned ⓘ

Creates a new object taking ownership of the data
","RefToOwned<'a>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Replacer for &'a [u8]

§

fn replace_append(&mut self, caps: &Captures<'_>, dst: &mut Vec<u8>)

Appends possibly empty data to dst to replace the current match. Read more
§

fn no_expansion(&mut self) -> Option<Cow<'_, [u8]>>

Return a fixed unchanging replacement byte string. Read more
§

fn by_ref<'r>(&'r mut self) -> ReplacerRef<'r, Self>

Returns a type that implements Replacer, but that borrows and wraps\nthis Replacer. Read more
","Replacer","servers::prom_remote_write::types::RawBytes"],["
Source§

impl<'a> ScalarRef<'a> for &'a [u8]

Source§

type ScalarType = Vec<u8>

The corresponding Scalar type.
Source§

fn to_owned_scalar(&self) -> Vec<u8> ⓘ

Convert the reference into an owned value.
","ScalarRef<'a>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> SerializeOctets for &'a [u8]

§

fn serialize_octets<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where\n S: Serializer,

§

fn as_serialized_octets(&self) -> AsSerializedOctets<'_, Self>

","SerializeOctets","servers::prom_remote_write::types::RawBytes"],["
§

impl Size for &[u8]

§

fn unpadded_size(&self) -> usize

Size of the unpadded data structure. This will usually\nonly be unaligned for variable length types like\nstrings or byte buffers.
§

fn padded_size(&self) -> usize

Get the size of of the payload and align it to\nthe required netlink byte alignment.
","Size","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, T> Slice<Range<usize>> for &'a [T]

§

fn slice(&self, range: Range<usize>) -> &'a [T]

Slices self according to the range argument
","Slice>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, T> Slice<RangeFrom<usize>> for &'a [T]

§

fn slice(&self, range: RangeFrom<usize>) -> &'a [T]

Slices self according to the range argument
","Slice>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, T> Slice<RangeFull> for &'a [T]

§

fn slice(&self, range: RangeFull) -> &'a [T]

Slices self according to the range argument
","Slice","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a, T> Slice<RangeTo<usize>> for &'a [T]

§

fn slice(&self, range: RangeTo<usize>) -> &'a [T]

Slices self according to the range argument
","Slice>","servers::prom_remote_write::types::RawBytes"],["
§

impl<T> SliceLen for &[T]

§

fn slice_len(&self) -> usize

Calculates the input length, as indicated by its name,\nand the name of the trait itself
","SliceLen","servers::prom_remote_write::types::RawBytes"],["
§

impl SplitByteSlice for &[u8]

§

unsafe fn split_at_unchecked(self, mid: usize) -> (&[u8], &[u8])

Splits the slice at the midpoint, possibly omitting bounds checks. Read more
§

fn split_at(self, mid: usize) -> Result<(Self, Self), Self>

Attempts to split self at the midpoint. Read more
","SplitByteSlice","servers::prom_remote_write::types::RawBytes"],["
§

impl<'i, T> Stream for &'i [T]
where\n T: Clone + Debug,

§

type Token = T

The smallest unit being parsed Read more
§

type Slice = &'i [T]

Sequence of Tokens Read more
§

type IterOffsets = Enumerate<Cloned<Iter<'i, T>>>

Iterate with the offset from the current location
§

type Checkpoint = Checkpoint<&'i [T], &'i [T]>

A parse location within the stream
§

fn iter_offsets(&self) -> <&'i [T] as Stream>::IterOffsets ⓘ

Iterate with the offset from the current location
§

fn eof_offset(&self) -> usize

Returns the offset to the end of the input
§

fn next_token(&mut self) -> Option<<&'i [T] as Stream>::Token>

Split off the next token from the input
§

fn peek_token(&self) -> Option<<&'i [T] as Stream>::Token>

Split off the next token from the input
§

fn offset_for<P>(&self, predicate: P) -> Option<usize>
where\n P: Fn(<&'i [T] as Stream>::Token) -> bool,

Finds the offset of the next matching token
§

fn offset_at(&self, tokens: usize) -> Result<usize, Needed>

Get the offset for the number of tokens into the stream Read more
§

fn next_slice(&mut self, offset: usize) -> <&'i [T] as Stream>::Slice ⓘ

Split off a slice of tokens from the input Read more
§

unsafe fn next_slice_unchecked(\n &mut self,\n offset: usize,\n) -> <&'i [T] as Stream>::Slice ⓘ

Split off a slice of tokens from the input Read more
§

fn peek_slice(&self, offset: usize) -> <&'i [T] as Stream>::Slice ⓘ

Split off a slice of tokens from the input
§

unsafe fn peek_slice_unchecked(\n &self,\n offset: usize,\n) -> <&'i [T] as Stream>::Slice ⓘ

Split off a slice of tokens from the input Read more
§

fn checkpoint(&self) -> <&'i [T] as Stream>::Checkpoint ⓘ

Save the current parse location within the stream
§

fn reset(&mut self, checkpoint: &<&'i [T] as Stream>::Checkpoint)

Revert the stream to a prior [Self::Checkpoint] Read more
§

fn raw(&self) -> &dyn Debug

👎Deprecated since 0.7.10:

Replaced with Stream::trace

\n
Deprecated for callers as of 0.7.10, instead call [Stream::trace]
§

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

Write out a single-line summary of the current parse location
§

fn finish(&mut self) -> Self::Slice

Advance to the end of the stream
§

fn peek_finish(&self) -> Self::Slice
where\n Self: Clone,

Advance to the end of the stream
","Stream","servers::prom_remote_write::types::RawBytes"],["
§

impl<T> StreamIsPartial for &[T]

§

type PartialState = ()

Whether the stream is currently partial or complete
§

fn complete(&mut self) -> <&[T] as StreamIsPartial>::PartialState ⓘ

Mark the stream is complete
§

fn restore_partial(&mut self, _state: <&[T] as StreamIsPartial>::PartialState)

Restore the stream back to its previous state
§

fn is_partial_supported() -> bool

Report whether the [Stream] is can ever be incomplete
§

fn is_partial(&self) -> bool

Report whether the [Stream] is currently incomplete
","StreamIsPartial","servers::prom_remote_write::types::RawBytes"],["
§

impl ToBytes for &[u8]

§

fn to_bytes(&self, buffer: &mut Cursor<Vec<u8>>) -> Result<(), SerError>

Takes a byte buffer and serializes the data structure into\nit.
§

fn pad(&self, buffer: &mut Cursor<Vec<u8>>) -> Result<(), SerError>

Pad a netlink message to the appropriate alignment.
","ToBytes","servers::prom_remote_write::types::RawBytes"],["
§

impl<T> ToSql for &[T]
where\n T: ToSql,

§

fn to_sql(\n &self,\n ty: &Type,\n w: &mut BytesMut,\n) -> Result<IsNull, Box<dyn Error + Send + Sync>>

Converts the value of self into the binary format of the specified\nPostgres Type, appending it to out. Read more
§

fn accepts(ty: &Type) -> bool

Determines if a value of this type can be converted to the specified\nPostgres Type.
§

fn to_sql_checked(\n &self,\n ty: &Type,\n out: &mut BytesMut,\n) -> Result<IsNull, Box<dyn Error + Send + Sync>>

An adaptor method used internally by Rust-Postgres. Read more
§

fn encode_format(&self, _ty: &Type) -> Format

Specify the encode format
","ToSql","servers::prom_remote_write::types::RawBytes"],["
§

impl ToSql for &[u8]

§

fn to_sql(\n &self,\n _: &Type,\n w: &mut BytesMut,\n) -> Result<IsNull, Box<dyn Error + Send + Sync>>

Converts the value of self into the binary format of the specified\nPostgres Type, appending it to out. Read more
§

fn accepts(ty: &Type) -> bool

Determines if a value of this type can be converted to the specified\nPostgres Type.
§

fn to_sql_checked(\n &self,\n ty: &Type,\n out: &mut BytesMut,\n) -> Result<IsNull, Box<dyn Error + Send + Sync>>

An adaptor method used internally by Rust-Postgres. Read more
§

fn encode_format(&self, _ty: &Type) -> Format

Specify the encode format
","ToSql","servers::prom_remote_write::types::RawBytes"],["
§

impl<T> ToSqlText for &[T]
where\n T: ToSqlText,

§

fn to_sql_text(\n &self,\n ty: &Type,\n out: &mut BytesMut,\n format_options: &FormatOptions,\n) -> Result<IsNull, Box<dyn Error + Send + Sync>>

Converts value to text format of Postgres type. Read more
","ToSqlText","servers::prom_remote_write::types::RawBytes"],["
§

impl ToSqlText for &[u8]

§

fn to_sql_text(\n &self,\n ty: &Type,\n out: &mut BytesMut,\n format_options: &FormatOptions,\n) -> Result<IsNull, Box<dyn Error + Send + Sync>>

Converts value to text format of Postgres type. Read more
","ToSqlText","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Truncate for &'a [u8]

§

fn truncate(&mut self, len: usize)

Truncate the sequence to len octets. Read more
","Truncate","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> TryFrom<&'a DecryptionContext> for &'a [u8]

§

type Error = Unspecified

The type returned in the event of a conversion error.
§

fn try_from(value: &'a DecryptionContext) -> Result<&'a [u8], Unspecified>

Performs the conversion.
","TryFrom<&'a DecryptionContext>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> TryFrom<&'a EncryptionContext> for &'a [u8]

§

type Error = Unspecified

The type returned in the event of a conversion error.
§

fn try_from(value: &'a EncryptionContext) -> Result<&'a [u8], Unspecified>

Performs the conversion.
","TryFrom<&'a EncryptionContext>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> TryFrom<BitStringRef<'a>> for &'a [u8]

§

type Error = Error

The type returned in the event of a conversion error.
§

fn try_from(bit_string: BitStringRef<'a>) -> Result<&'a [u8], Error>

Performs the conversion.
","TryFrom>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> TryFrom<BitStringRef<'a>> for &'a [u8]

§

type Error = Error

The type returned in the event of a conversion error.
§

fn try_from(bit_string: BitStringRef<'a>) -> Result<&'a [u8], Error>

Performs the conversion.
","TryFrom>","servers::prom_remote_write::types::RawBytes"],["
§

impl<T> UpdateSlice for &[T]
where\n T: Clone + Debug,

§

fn update_slice(self, inner: <&[T] as Stream>::Slice) -> &[T]

Convert an Output type to be used as Stream
","UpdateSlice","servers::prom_remote_write::types::RawBytes"],["
§

impl<'a> Value<'a> for &'a [u8]

§

type ArrayIter = Empty<&'a [u8]>

The child value type returned by this doc value.\nThe iterator for walking through the elements within the array.
§

type ObjectIter = Empty<(&'a str, &'a [u8])>

The visitor walking through the key-value pairs within\nthe object.
§

fn as_value(&self) -> ReferenceValue<'a, &'a [u8]>

Returns the field value represented by an enum which borrows it’s data.
§

fn as_leaf(&self) -> Option<ReferenceValueLeaf<'a>>

If the Value is a leaf, returns the associated leaf. Returns None otherwise.
§

fn as_str(&self) -> Option<&'a str>

If the Value is a String, returns the associated str. Returns None otherwise.
§

fn as_u64(&self) -> Option<u64>

If the Value is a u64, returns the associated u64. Returns None otherwise.
§

fn as_i64(&self) -> Option<i64>

If the Value is a i64, returns the associated i64. Returns None otherwise.
§

fn as_f64(&self) -> Option<f64>

If the Value is a f64, returns the associated f64. Returns None otherwise.
§

fn as_datetime(&self) -> Option<DateTime>

If the Value is a datetime, returns the associated datetime. Returns None otherwise.
§

fn as_ip_addr(&self) -> Option<Ipv6Addr>

If the Value is a IP address, returns the associated IP. Returns None otherwise.
§

fn as_bool(&self) -> Option<bool>

If the Value is a bool, returns the associated bool. Returns None otherwise.
§

fn as_pre_tokenized_text(&self) -> Option<Box<PreTokenizedString>>

If the Value is a pre-tokenized string, returns the associated string. Returns None\notherwise.
§

fn as_bytes(&self) -> Option<&'a [u8]>

If the Value is a bytes value, returns the associated set of bytes. Returns None otherwise.
§

fn as_facet(&self) -> Option<&'a str>

If the Value is a facet, returns the associated facet. Returns None otherwise.
§

fn as_array(&self) -> Option<Self::ArrayIter>

Returns the iterator over the array if the Value is an array.
§

fn as_object(&self) -> Option<Self::ObjectIter>

Returns the iterator over the object if the Value is an object.
","Value<'a>","servers::prom_remote_write::types::RawBytes"],["
§

impl<'zf, T> ZeroFrom<'zf, [T]> for &'zf [T]

§

fn zero_from(other: &'zf [T]) -> &'zf [T]

Clone the other C into a struct that may retain references into C.
","ZeroFrom<'zf, [T]>","servers::prom_remote_write::types::RawBytes"],["
§

impl AsSymbolName for &[u8]

","AsSymbolName","servers::prom_remote_write::types::RawBytes"],["
§

impl ByteSlice for &[u8]

","ByteSlice","servers::prom_remote_write::types::RawBytes"],["
§

impl CloneableByteSlice for &[u8]

","CloneableByteSlice","servers::prom_remote_write::types::RawBytes"],["
§

impl CopyableByteSlice for &[u8]

","CopyableByteSlice","servers::prom_remote_write::types::RawBytes"]]]]); if (window.register_type_impls) { window.register_type_impls(type_impls); } else { window.pending_type_impls = type_impls; } })() //{"start":55,"fragment_lengths":[532644,532136,666103,634082]}