diff --git a/bytes/all.html b/bytes/all.html index 0800293e4..7830ae5b7 100644 --- a/bytes/all.html +++ b/bytes/all.html @@ -1 +1,2 @@ -List of all items in this crate

List of all items

Structs

Traits

\ No newline at end of file +List of all items in this crate +

List of all items

Structs

Traits

\ No newline at end of file diff --git a/bytes/buf/index.html b/bytes/buf/index.html index 97f658e02..b03a75d9b 100644 --- a/bytes/buf/index.html +++ b/bytes/buf/index.html @@ -1,4 +1,5 @@ -bytes::buf - Rust

Module bytes::buf

source ·
Expand description

Utilities for working with buffers.

+bytes::buf - Rust +

Module bytes::buf

source ·
Expand description

Utilities for working with buffers.

A buffer is any structure that contains a sequence of bytes. The bytes may or may not be stored in contiguous memory. This module contains traits used to abstract over buffers as well as utilities for working with buffer types.

@@ -7,5 +8,5 @@

Buf, BufMut< They can be thought as iterators for byte structures. They offer additional performance over Iterator by providing an API optimized for byte slices.

See Buf and BufMut for more details.

-

Structs

  • A Chain sequences two buffers.
  • Iterator over the bytes contained by the buffer.
  • A BufMut adapter which limits the amount of bytes that can be written -to an underlying buffer.
  • A Buf adapter which implements io::Read for the inner value.
  • A Buf adapter which limits the bytes read from an underlying buffer.
  • Uninitialized byte slice.
  • A BufMut adapter which implements io::Write for the inner value.

Traits

  • Read bytes from a buffer.
  • A trait for values that provide sequential write access to bytes.
\ No newline at end of file +

Structs

  • A Chain sequences two buffers.
  • Iterator over the bytes contained by the buffer.
  • A BufMut adapter which limits the amount of bytes that can be written +to an underlying buffer.
  • A Buf adapter which implements io::Read for the inner value.
  • A Buf adapter which limits the bytes read from an underlying buffer.
  • Uninitialized byte slice.
  • A BufMut adapter which implements io::Write for the inner value.

Traits

  • Read bytes from a buffer.
  • A trait for values that provide sequential write access to bytes.
\ No newline at end of file diff --git a/bytes/buf/struct.Chain.html b/bytes/buf/struct.Chain.html index 0aa3234ae..ab80dc5ea 100644 --- a/bytes/buf/struct.Chain.html +++ b/bytes/buf/struct.Chain.html @@ -1,4 +1,5 @@ -Chain in bytes::buf - Rust

Struct bytes::buf::Chain

source ·
pub struct Chain<T, U> { /* private fields */ }
Expand description

A Chain sequences two buffers.

+Chain in bytes::buf - Rust +

Struct bytes::buf::Chain

source ·
pub struct Chain<T, U> { /* private fields */ }
Expand description

A Chain sequences two buffers.

Chain is an adapter that links two underlying buffers and provides a continuous view across both buffers. It is able to sequence either immutable buffers (Buf values) or mutable buffers (BufMut values).

@@ -7,112 +8,112 @@

Examples

use bytes::{Bytes, Buf};
 
-let mut buf = (&b"hello "[..])
-    .chain(&b"world"[..]);
+let mut buf = (&b"hello "[..])
+    .chain(&b"world"[..]);
 
 let full: Bytes = buf.copy_to_bytes(11);
-assert_eq!(full[..], b"hello world"[..]);
-

Implementations§

source§

impl<T, U> Chain<T, U>

source

pub fn first_ref(&self) -> &T

Gets a reference to the first underlying Buf.

+assert_eq!(full[..], b"hello world"[..]);
+

Implementations§

source§

impl<T, U> Chain<T, U>

source

pub fn first_ref(&self) -> &T

Gets a reference to the first underlying Buf.

Examples
use bytes::Buf;
 
-let buf = (&b"hello"[..])
-    .chain(&b"world"[..]);
+let buf = (&b"hello"[..])
+    .chain(&b"world"[..]);
 
-assert_eq!(buf.first_ref()[..], b"hello"[..]);
-
source

pub fn first_mut(&mut self) -> &mut T

Gets a mutable reference to the first underlying Buf.

+assert_eq!(buf.first_ref()[..], b"hello"[..]);
+
source

pub fn first_mut(&mut self) -> &mut T

Gets a mutable reference to the first underlying Buf.

Examples
use bytes::Buf;
 
-let mut buf = (&b"hello"[..])
-    .chain(&b"world"[..]);
+let mut buf = (&b"hello"[..])
+    .chain(&b"world"[..]);
 
 buf.first_mut().advance(1);
 
 let full = buf.copy_to_bytes(9);
-assert_eq!(full, b"elloworld"[..]);
-
source

pub fn last_ref(&self) -> &U

Gets a reference to the last underlying Buf.

+assert_eq!(full, b"elloworld"[..]);
+
source

pub fn last_ref(&self) -> &U

Gets a reference to the last underlying Buf.

Examples
use bytes::Buf;
 
-let buf = (&b"hello"[..])
-    .chain(&b"world"[..]);
+let buf = (&b"hello"[..])
+    .chain(&b"world"[..]);
 
-assert_eq!(buf.last_ref()[..], b"world"[..]);
-
source

pub fn last_mut(&mut self) -> &mut U

Gets a mutable reference to the last underlying Buf.

+assert_eq!(buf.last_ref()[..], b"world"[..]);
+
source

pub fn last_mut(&mut self) -> &mut U

Gets a mutable reference to the last underlying Buf.

Examples
use bytes::Buf;
 
-let mut buf = (&b"hello "[..])
-    .chain(&b"world"[..]);
+let mut buf = (&b"hello "[..])
+    .chain(&b"world"[..]);
 
 buf.last_mut().advance(1);
 
 let full = buf.copy_to_bytes(10);
-assert_eq!(full, b"hello orld"[..]);
-
source

pub fn into_inner(self) -> (T, U)

Consumes this Chain, returning the underlying values.

+assert_eq!(full, b"hello orld"[..]);
+
source

pub fn into_inner(self) -> (T, U)

Consumes this Chain, returning the underlying values.

Examples
use bytes::Buf;
 
-let chain = (&b"hello"[..])
-    .chain(&b"world"[..]);
+let chain = (&b"hello"[..])
+    .chain(&b"world"[..]);
 
 let (first, last) = chain.into_inner();
-assert_eq!(first[..], b"hello"[..]);
-assert_eq!(last[..], b"world"[..]);
-

Trait Implementations§

source§

impl<T, U> Buf for Chain<T, U>where +assert_eq!(first[..], b"hello"[..]); +assert_eq!(last[..], b"world"[..]);

+

Trait Implementations§

source§

impl<T, U> Buf for Chain<T, U>
where T: Buf, - U: Buf,

source§

fn remaining(&self) -> usize

Returns the number of bytes between the current position and the end of -the buffer. Read more
source§

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

Returns a slice starting at the current position and of length between 0 + U: Buf,
source§

fn remaining(&self) -> usize

Returns the number of bytes between the current position and the end of +the buffer. Read more
source§

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

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

fn advance(&mut self, cnt: usize)

Advance the internal cursor of the Buf Read more
source§

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

Fills dst with potentially multiple slices starting at self’s -current position. Read more
source§

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

Consumes len bytes inside self and returns new instance of Bytes -with this data. Read more
source§

fn has_remaining(&self) -> bool

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

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

Copies bytes from self into dst. Read more
source§

fn get_u8(&mut self) -> u8

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

fn get_i8(&mut self) -> i8

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

fn get_u16(&mut self) -> u16

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

fn get_u16_le(&mut self) -> u16

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

fn get_u16_ne(&mut self) -> u16

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

fn get_i16(&mut self) -> i16

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

fn get_i16_le(&mut self) -> i16

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

fn get_i16_ne(&mut self) -> i16

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

fn get_u32(&mut self) -> u32

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

fn get_u32_le(&mut self) -> u32

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

fn get_u32_ne(&mut self) -> u32

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

fn get_i32(&mut self) -> i32

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

fn get_i32_le(&mut self) -> i32

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

fn get_i32_ne(&mut self) -> i32

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

fn get_u64(&mut self) -> u64

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

fn get_u64_le(&mut self) -> u64

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

fn get_u64_ne(&mut self) -> u64

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

fn get_i64(&mut self) -> i64

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

fn get_i64_le(&mut self) -> i64

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

fn get_i64_ne(&mut self) -> i64

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

fn get_u128(&mut self) -> u128

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

fn get_u128_le(&mut self) -> u128

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

fn get_u128_ne(&mut self) -> u128

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

fn get_i128(&mut self) -> i128

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

fn get_i128_le(&mut self) -> i128

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

fn get_i128_ne(&mut self) -> i128

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

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

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

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

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

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

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

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

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

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

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

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

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

fn get_f32(&mut self) -> f32

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

fn get_f32_le(&mut self) -> f32

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

fn get_f32_ne(&mut self) -> f32

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

fn get_f64(&mut self) -> f64

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

fn get_f64_le(&mut self) -> f64

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

fn get_f64_ne(&mut self) -> f64

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

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

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

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

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

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

Creates an adaptor which implements the Read trait for self. Read more
source§

impl<T, U> BufMut for Chain<T, U>where +non-continuous internal representation). Read more

source§

fn advance(&mut self, cnt: usize)

Advance the internal cursor of the Buf Read more
source§

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

Fills dst with potentially multiple slices starting at self’s +current position. Read more
source§

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

Consumes len bytes inside self and returns new instance of Bytes +with this data. Read more
source§

fn has_remaining(&self) -> bool

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

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

Copies bytes from self into dst. Read more
source§

fn get_u8(&mut self) -> u8

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

fn get_i8(&mut self) -> i8

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

fn get_u16(&mut self) -> u16

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

fn get_u16_le(&mut self) -> u16

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

fn get_u16_ne(&mut self) -> u16

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

fn get_i16(&mut self) -> i16

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

fn get_i16_le(&mut self) -> i16

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

fn get_i16_ne(&mut self) -> i16

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

fn get_u32(&mut self) -> u32

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

fn get_u32_le(&mut self) -> u32

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

fn get_u32_ne(&mut self) -> u32

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

fn get_i32(&mut self) -> i32

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

fn get_i32_le(&mut self) -> i32

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

fn get_i32_ne(&mut self) -> i32

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

fn get_u64(&mut self) -> u64

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

fn get_u64_le(&mut self) -> u64

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

fn get_u64_ne(&mut self) -> u64

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

fn get_i64(&mut self) -> i64

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

fn get_i64_le(&mut self) -> i64

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

fn get_i64_ne(&mut self) -> i64

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

fn get_u128(&mut self) -> u128

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

fn get_u128_le(&mut self) -> u128

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

fn get_u128_ne(&mut self) -> u128

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

fn get_i128(&mut self) -> i128

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

fn get_i128_le(&mut self) -> i128

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

fn get_i128_ne(&mut self) -> i128

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

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

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

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

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

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

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

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

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

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

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

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

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

fn get_f32(&mut self) -> f32

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

fn get_f32_le(&mut self) -> f32

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

fn get_f32_ne(&mut self) -> f32

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

fn get_f64(&mut self) -> f64

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

fn get_f64_le(&mut self) -> f64

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

fn get_f64_ne(&mut self) -> f64

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

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

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

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

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

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

Creates an adaptor which implements the Read trait for self. Read more
source§

impl<T, U> BufMut for Chain<T, U>
where T: BufMut, - U: BufMut,

source§

fn remaining_mut(&self) -> usize

Returns the number of bytes that can be written from the current + U: BufMut,
source§

fn remaining_mut(&self) -> usize

Returns the number of bytes that can be written from the current position until the end of the buffer is reached. Read more
source§

fn chunk_mut(&mut self) -> &mut UninitSlice

Returns a mutable slice starting at the current BufMut position and of length between 0 and BufMut::remaining_mut(). Note that this can be shorter than the -whole remainder of the buffer (this allows non-continuous implementation). Read more
source§

unsafe fn advance_mut(&mut self, cnt: usize)

Advance the internal cursor of the BufMut Read more
source§

fn has_remaining_mut(&self) -> bool

Returns true if there is space in self for more bytes. Read more
source§

fn put<T: Buf>(&mut self, src: T)where - Self: Sized,

Transfer bytes into self from src and advance the cursor by the -number of bytes written. Read more
source§

fn put_slice(&mut self, src: &[u8])

Transfer bytes into self from src and advance the cursor by the -number of bytes written. Read more
source§

fn put_bytes(&mut self, val: u8, cnt: usize)

Put cnt bytes val into self. Read more
source§

fn put_u8(&mut self, n: u8)

Writes an unsigned 8 bit integer to self. Read more
source§

fn put_i8(&mut self, n: i8)

Writes a signed 8 bit integer to self. Read more
source§

fn put_u16(&mut self, n: u16)

Writes an unsigned 16 bit integer to self in big-endian byte order. Read more
source§

fn put_u16_le(&mut self, n: u16)

Writes an unsigned 16 bit integer to self in little-endian byte order. Read more
source§

fn put_u16_ne(&mut self, n: u16)

Writes an unsigned 16 bit integer to self in native-endian byte order. Read more
source§

fn put_i16(&mut self, n: i16)

Writes a signed 16 bit integer to self in big-endian byte order. Read more
source§

fn put_i16_le(&mut self, n: i16)

Writes a signed 16 bit integer to self in little-endian byte order. Read more
source§

fn put_i16_ne(&mut self, n: i16)

Writes a signed 16 bit integer to self in native-endian byte order. Read more
source§

fn put_u32(&mut self, n: u32)

Writes an unsigned 32 bit integer to self in big-endian byte order. Read more
source§

fn put_u32_le(&mut self, n: u32)

Writes an unsigned 32 bit integer to self in little-endian byte order. Read more
source§

fn put_u32_ne(&mut self, n: u32)

Writes an unsigned 32 bit integer to self in native-endian byte order. Read more
source§

fn put_i32(&mut self, n: i32)

Writes a signed 32 bit integer to self in big-endian byte order. Read more
source§

fn put_i32_le(&mut self, n: i32)

Writes a signed 32 bit integer to self in little-endian byte order. Read more
source§

fn put_i32_ne(&mut self, n: i32)

Writes a signed 32 bit integer to self in native-endian byte order. Read more
source§

fn put_u64(&mut self, n: u64)

Writes an unsigned 64 bit integer to self in the big-endian byte order. Read more
source§

fn put_u64_le(&mut self, n: u64)

Writes an unsigned 64 bit integer to self in little-endian byte order. Read more
source§

fn put_u64_ne(&mut self, n: u64)

Writes an unsigned 64 bit integer to self in native-endian byte order. Read more
source§

fn put_i64(&mut self, n: i64)

Writes a signed 64 bit integer to self in the big-endian byte order. Read more
source§

fn put_i64_le(&mut self, n: i64)

Writes a signed 64 bit integer to self in little-endian byte order. Read more
source§

fn put_i64_ne(&mut self, n: i64)

Writes a signed 64 bit integer to self in native-endian byte order. Read more
source§

fn put_u128(&mut self, n: u128)

Writes an unsigned 128 bit integer to self in the big-endian byte order. Read more
source§

fn put_u128_le(&mut self, n: u128)

Writes an unsigned 128 bit integer to self in little-endian byte order. Read more
source§

fn put_u128_ne(&mut self, n: u128)

Writes an unsigned 128 bit integer to self in native-endian byte order. Read more
source§

fn put_i128(&mut self, n: i128)

Writes a signed 128 bit integer to self in the big-endian byte order. Read more
source§

fn put_i128_le(&mut self, n: i128)

Writes a signed 128 bit integer to self in little-endian byte order. Read more
source§

fn put_i128_ne(&mut self, n: i128)

Writes a signed 128 bit integer to self in native-endian byte order. Read more
source§

fn put_uint(&mut self, n: u64, nbytes: usize)

Writes an unsigned n-byte integer to self in big-endian byte order. Read more
source§

fn put_uint_le(&mut self, n: u64, nbytes: usize)

Writes an unsigned n-byte integer to self in the little-endian byte order. Read more
source§

fn put_uint_ne(&mut self, n: u64, nbytes: usize)

Writes an unsigned n-byte integer to self in the native-endian byte order. Read more
source§

fn put_int(&mut self, n: i64, nbytes: usize)

Writes low nbytes of a signed integer to self in big-endian byte order. Read more
source§

fn put_int_le(&mut self, n: i64, nbytes: usize)

Writes low nbytes of a signed integer to self in little-endian byte order. Read more
source§

fn put_int_ne(&mut self, n: i64, nbytes: usize)

Writes low nbytes of a signed integer to self in native-endian byte order. Read more
source§

fn put_f32(&mut self, n: f32)

Writes an IEEE754 single-precision (4 bytes) floating point number to -self in big-endian byte order. Read more
source§

fn put_f32_le(&mut self, n: f32)

Writes an IEEE754 single-precision (4 bytes) floating point number to -self in little-endian byte order. Read more
source§

fn put_f32_ne(&mut self, n: f32)

Writes an IEEE754 single-precision (4 bytes) floating point number to -self in native-endian byte order. Read more
source§

fn put_f64(&mut self, n: f64)

Writes an IEEE754 double-precision (8 bytes) floating point number to -self in big-endian byte order. Read more
source§

fn put_f64_le(&mut self, n: f64)

Writes an IEEE754 double-precision (8 bytes) floating point number to -self in little-endian byte order. Read more
source§

fn put_f64_ne(&mut self, n: f64)

Writes an IEEE754 double-precision (8 bytes) floating point number to -self in native-endian byte order. Read more
source§

fn limit(self, limit: usize) -> Limit<Self>where - Self: Sized,

Creates an adaptor which can write at most limit bytes to self. Read more
source§

fn writer(self) -> Writer<Self> where - Self: Sized,

Creates an adaptor which implements the Write trait for self. Read more
source§

fn chain_mut<U: BufMut>(self, next: U) -> Chain<Self, U>where - Self: Sized,

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

impl<T: Debug, U: Debug> Debug for Chain<T, U>

source§

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

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

impl<T, U> IntoIterator for Chain<T, U>where +whole remainder of the buffer (this allows non-continuous implementation). Read more

source§

unsafe fn advance_mut(&mut self, cnt: usize)

Advance the internal cursor of the BufMut Read more
source§

fn has_remaining_mut(&self) -> bool

Returns true if there is space in self for more bytes. Read more
source§

fn put<T: Buf>(&mut self, src: T)
where + Self: Sized,

Transfer bytes into self from src and advance the cursor by the +number of bytes written. Read more
source§

fn put_slice(&mut self, src: &[u8])

Transfer bytes into self from src and advance the cursor by the +number of bytes written. Read more
source§

fn put_bytes(&mut self, val: u8, cnt: usize)

Put cnt bytes val into self. Read more
source§

fn put_u8(&mut self, n: u8)

Writes an unsigned 8 bit integer to self. Read more
source§

fn put_i8(&mut self, n: i8)

Writes a signed 8 bit integer to self. Read more
source§

fn put_u16(&mut self, n: u16)

Writes an unsigned 16 bit integer to self in big-endian byte order. Read more
source§

fn put_u16_le(&mut self, n: u16)

Writes an unsigned 16 bit integer to self in little-endian byte order. Read more
source§

fn put_u16_ne(&mut self, n: u16)

Writes an unsigned 16 bit integer to self in native-endian byte order. Read more
source§

fn put_i16(&mut self, n: i16)

Writes a signed 16 bit integer to self in big-endian byte order. Read more
source§

fn put_i16_le(&mut self, n: i16)

Writes a signed 16 bit integer to self in little-endian byte order. Read more
source§

fn put_i16_ne(&mut self, n: i16)

Writes a signed 16 bit integer to self in native-endian byte order. Read more
source§

fn put_u32(&mut self, n: u32)

Writes an unsigned 32 bit integer to self in big-endian byte order. Read more
source§

fn put_u32_le(&mut self, n: u32)

Writes an unsigned 32 bit integer to self in little-endian byte order. Read more
source§

fn put_u32_ne(&mut self, n: u32)

Writes an unsigned 32 bit integer to self in native-endian byte order. Read more
source§

fn put_i32(&mut self, n: i32)

Writes a signed 32 bit integer to self in big-endian byte order. Read more
source§

fn put_i32_le(&mut self, n: i32)

Writes a signed 32 bit integer to self in little-endian byte order. Read more
source§

fn put_i32_ne(&mut self, n: i32)

Writes a signed 32 bit integer to self in native-endian byte order. Read more
source§

fn put_u64(&mut self, n: u64)

Writes an unsigned 64 bit integer to self in the big-endian byte order. Read more
source§

fn put_u64_le(&mut self, n: u64)

Writes an unsigned 64 bit integer to self in little-endian byte order. Read more
source§

fn put_u64_ne(&mut self, n: u64)

Writes an unsigned 64 bit integer to self in native-endian byte order. Read more
source§

fn put_i64(&mut self, n: i64)

Writes a signed 64 bit integer to self in the big-endian byte order. Read more
source§

fn put_i64_le(&mut self, n: i64)

Writes a signed 64 bit integer to self in little-endian byte order. Read more
source§

fn put_i64_ne(&mut self, n: i64)

Writes a signed 64 bit integer to self in native-endian byte order. Read more
source§

fn put_u128(&mut self, n: u128)

Writes an unsigned 128 bit integer to self in the big-endian byte order. Read more
source§

fn put_u128_le(&mut self, n: u128)

Writes an unsigned 128 bit integer to self in little-endian byte order. Read more
source§

fn put_u128_ne(&mut self, n: u128)

Writes an unsigned 128 bit integer to self in native-endian byte order. Read more
source§

fn put_i128(&mut self, n: i128)

Writes a signed 128 bit integer to self in the big-endian byte order. Read more
source§

fn put_i128_le(&mut self, n: i128)

Writes a signed 128 bit integer to self in little-endian byte order. Read more
source§

fn put_i128_ne(&mut self, n: i128)

Writes a signed 128 bit integer to self in native-endian byte order. Read more
source§

fn put_uint(&mut self, n: u64, nbytes: usize)

Writes an unsigned n-byte integer to self in big-endian byte order. Read more
source§

fn put_uint_le(&mut self, n: u64, nbytes: usize)

Writes an unsigned n-byte integer to self in the little-endian byte order. Read more
source§

fn put_uint_ne(&mut self, n: u64, nbytes: usize)

Writes an unsigned n-byte integer to self in the native-endian byte order. Read more
source§

fn put_int(&mut self, n: i64, nbytes: usize)

Writes low nbytes of a signed integer to self in big-endian byte order. Read more
source§

fn put_int_le(&mut self, n: i64, nbytes: usize)

Writes low nbytes of a signed integer to self in little-endian byte order. Read more
source§

fn put_int_ne(&mut self, n: i64, nbytes: usize)

Writes low nbytes of a signed integer to self in native-endian byte order. Read more
source§

fn put_f32(&mut self, n: f32)

Writes an IEEE754 single-precision (4 bytes) floating point number to +self in big-endian byte order. Read more
source§

fn put_f32_le(&mut self, n: f32)

Writes an IEEE754 single-precision (4 bytes) floating point number to +self in little-endian byte order. Read more
source§

fn put_f32_ne(&mut self, n: f32)

Writes an IEEE754 single-precision (4 bytes) floating point number to +self in native-endian byte order. Read more
source§

fn put_f64(&mut self, n: f64)

Writes an IEEE754 double-precision (8 bytes) floating point number to +self in big-endian byte order. Read more
source§

fn put_f64_le(&mut self, n: f64)

Writes an IEEE754 double-precision (8 bytes) floating point number to +self in little-endian byte order. Read more
source§

fn put_f64_ne(&mut self, n: f64)

Writes an IEEE754 double-precision (8 bytes) floating point number to +self in native-endian byte order. Read more
source§

fn limit(self, limit: usize) -> Limit<Self>
where + Self: Sized,

Creates an adaptor which can write at most limit bytes to self. Read more
source§

fn writer(self) -> Writer<Self>
where + Self: Sized,

Creates an adaptor which implements the Write trait for self. Read more
source§

fn chain_mut<U: BufMut>(self, next: U) -> Chain<Self, U>
where + Self: Sized,

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

impl<T: Debug, U: Debug> Debug for Chain<T, U>

source§

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

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

impl<T, U> IntoIterator for Chain<T, U>
where T: Buf, - U: Buf,

§

type Item = u8

The type of the elements being iterated over.
§

type IntoIter = IntoIter<Chain<T, U>>

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

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more

Auto Trait Implementations§

§

impl<T, U> RefUnwindSafe for Chain<T, U>where - T: RefUnwindSafe, - U: RefUnwindSafe,

§

impl<T, U> Send for Chain<T, U>where - T: Send, - U: Send,

§

impl<T, U> Sync for Chain<T, U>where - T: Sync, - U: Sync,

§

impl<T, U> Unpin for Chain<T, U>where - T: Unpin, - U: Unpin,

§

impl<T, U> UnwindSafe for Chain<T, U>where - T: UnwindSafe, - U: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+ U: Buf,
§

type Item = u8

The type of the elements being iterated over.
§

type IntoIter = IntoIter<Chain<T, U>>

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

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more

Auto Trait Implementations§

§

impl<T, U> RefUnwindSafe for Chain<T, U>
where + T: RefUnwindSafe, + U: RefUnwindSafe,

§

impl<T, U> Send for Chain<T, U>
where + T: Send, + U: Send,

§

impl<T, U> Sync for Chain<T, U>
where + T: Sync, + U: Sync,

§

impl<T, U> Unpin for Chain<T, U>
where + T: Unpin, + U: Unpin,

§

impl<T, U> UnwindSafe for Chain<T, U>
where + T: UnwindSafe, + U: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/bytes/buf/struct.IntoIter.html b/bytes/buf/struct.IntoIter.html index 0bd684f49..639db0ab0 100644 --- a/bytes/buf/struct.IntoIter.html +++ b/bytes/buf/struct.IntoIter.html @@ -1,253 +1,254 @@ -IntoIter in bytes::buf - Rust

Struct bytes::buf::IntoIter

source ·
pub struct IntoIter<T> { /* private fields */ }
Expand description

Iterator over the bytes contained by the buffer.

+IntoIter in bytes::buf - Rust +

Struct bytes::buf::IntoIter

source ·
pub struct IntoIter<T> { /* private fields */ }
Expand description

Iterator over the bytes contained by the buffer.

Examples

Basic usage:

use bytes::Bytes;
 
-let buf = Bytes::from(&b"abc"[..]);
+let buf = Bytes::from(&b"abc"[..]);
 let mut iter = buf.into_iter();
 
-assert_eq!(iter.next(), Some(b'a'));
-assert_eq!(iter.next(), Some(b'b'));
-assert_eq!(iter.next(), Some(b'c'));
+assert_eq!(iter.next(), Some(b'a'));
+assert_eq!(iter.next(), Some(b'b'));
+assert_eq!(iter.next(), Some(b'c'));
 assert_eq!(iter.next(), None);
-

Implementations§

source§

impl<T> IntoIter<T>

source

pub fn new(inner: T) -> IntoIter<T>

Creates an iterator over the bytes contained by the buffer.

+

Implementations§

source§

impl<T> IntoIter<T>

source

pub fn new(inner: T) -> IntoIter<T>

Creates an iterator over the bytes contained by the buffer.

Examples
use bytes::Bytes;
 
-let buf = Bytes::from_static(b"abc");
+let buf = Bytes::from_static(b"abc");
 let mut iter = buf.into_iter();
 
-assert_eq!(iter.next(), Some(b'a'));
-assert_eq!(iter.next(), Some(b'b'));
-assert_eq!(iter.next(), Some(b'c'));
+assert_eq!(iter.next(), Some(b'a'));
+assert_eq!(iter.next(), Some(b'b'));
+assert_eq!(iter.next(), Some(b'c'));
 assert_eq!(iter.next(), None);
source

pub fn into_inner(self) -> T

Consumes this IntoIter, returning the underlying value.

Examples
use bytes::{Buf, Bytes};
 
-let buf = Bytes::from(&b"abc"[..]);
+let buf = Bytes::from(&b"abc"[..]);
 let mut iter = buf.into_iter();
 
-assert_eq!(iter.next(), Some(b'a'));
+assert_eq!(iter.next(), Some(b'a'));
 
 let buf = iter.into_inner();
 assert_eq!(2, buf.remaining());
-
source

pub fn get_ref(&self) -> &T

Gets a reference to the underlying Buf.

+
source

pub fn get_ref(&self) -> &T

Gets a reference to the underlying Buf.

It is inadvisable to directly read from the underlying Buf.

Examples
use bytes::{Buf, Bytes};
 
-let buf = Bytes::from(&b"abc"[..]);
+let buf = Bytes::from(&b"abc"[..]);
 let mut iter = buf.into_iter();
 
-assert_eq!(iter.next(), Some(b'a'));
+assert_eq!(iter.next(), Some(b'a'));
 
 assert_eq!(2, iter.get_ref().remaining());
-
source

pub fn get_mut(&mut self) -> &mut T

Gets a mutable reference to the underlying Buf.

+
source

pub fn get_mut(&mut self) -> &mut T

Gets a mutable reference to the underlying Buf.

It is inadvisable to directly read from the underlying Buf.

Examples
use bytes::{Buf, BytesMut};
 
-let buf = BytesMut::from(&b"abc"[..]);
+let buf = BytesMut::from(&b"abc"[..]);
 let mut iter = buf.into_iter();
 
-assert_eq!(iter.next(), Some(b'a'));
+assert_eq!(iter.next(), Some(b'a'));
 
 iter.get_mut().advance(1);
 
-assert_eq!(iter.next(), Some(b'c'));
-

Trait Implementations§

source§

impl<T: Debug> Debug for IntoIter<T>

source§

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

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

impl<T: Buf> ExactSizeIterator for IntoIter<T>

1.0.0 · source§

fn len(&self) -> usize

Returns the exact remaining length of the iterator. Read more
source§

fn is_empty(&self) -> bool

🔬This is a nightly-only experimental API. (exact_size_is_empty)
Returns true if the iterator is empty. Read more
source§

impl<T: Buf> Iterator for IntoIter<T>

§

type Item = u8

The type of the elements being iterated over.
source§

fn next(&mut self) -> Option<u8>

Advances the iterator and returns the next value. Read more
source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
source§

fn next_chunk<const N: usize>( +assert_eq!(iter.next(), Some(b'c'));

+

Trait Implementations§

source§

impl<T: Debug> Debug for IntoIter<T>

source§

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

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

impl<T: Buf> ExactSizeIterator for IntoIter<T>

1.0.0 · source§

fn len(&self) -> usize

Returns the exact remaining length of the iterator. Read more
source§

fn is_empty(&self) -> bool

🔬This is a nightly-only experimental API. (exact_size_is_empty)
Returns true if the iterator is empty. Read more
source§

impl<T: Buf> Iterator for IntoIter<T>

§

type Item = u8

The type of the elements being iterated over.
source§

fn next(&mut self) -> Option<u8>

Advances the iterator and returns the next value. Read more
source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
source§

fn next_chunk<const N: usize>( &mut self -) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where - Self: Sized,

🔬This is a nightly-only experimental API. (iter_next_chunk)
Advances the iterator and returns an array containing the next N values. Read more
1.0.0 · source§

fn count(self) -> usizewhere - Self: Sized,

Consumes the iterator, counting the number of iterations and returning it. Read more
1.0.0 · source§

fn last(self) -> Option<Self::Item>where - Self: Sized,

Consumes the iterator, returning the last element. Read more
source§

fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator by n elements. Read more
1.0.0 · source§

fn nth(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element of the iterator. Read more
1.28.0 · source§

fn step_by(self, step: usize) -> StepBy<Self>where - Self: Sized,

Creates an iterator starting at the same point, but stepping by -the given amount at each iteration. Read more
1.0.0 · source§

fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>where - Self: Sized, - U: IntoIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both in sequence. Read more
1.0.0 · source§

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>where - Self: Sized, - U: IntoIterator,

‘Zips up’ two iterators into a single iterator of pairs. Read more
source§

fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>where - Self: Sized, - G: FnMut() -> Self::Item,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places an item generated by separator -between adjacent items of the original iterator. Read more
1.0.0 · source§

fn map<B, F>(self, f: F) -> Map<Self, F>where - Self: Sized, - F: FnMut(Self::Item) -> B,

Takes a closure and creates an iterator which calls that closure on each -element. Read more
1.21.0 · source§

fn for_each<F>(self, f: F)where - Self: Sized, - F: FnMut(Self::Item),

Calls a closure on each element of an iterator. Read more
1.0.0 · source§

fn filter<P>(self, predicate: P) -> Filter<Self, P>where - Self: Sized, - P: FnMut(&Self::Item) -> bool,

Creates an iterator which uses a closure to determine if an element -should be yielded. Read more
1.0.0 · source§

fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>where - Self: Sized, - F: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both filters and maps. Read more
1.0.0 · source§

fn enumerate(self) -> Enumerate<Self>where - Self: Sized,

Creates an iterator which gives the current iteration count as well as -the next value. Read more
1.0.0 · source§

fn peekable(self) -> Peekable<Self>where - Self: Sized,

Creates an iterator which can use the peek and peek_mut methods +) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>
where + Self: Sized,
🔬This is a nightly-only experimental API. (iter_next_chunk)
Advances the iterator and returns an array containing the next N values. Read more
1.0.0 · source§

fn count(self) -> usize
where + Self: Sized,

Consumes the iterator, counting the number of iterations and returning it. Read more
1.0.0 · source§

fn last(self) -> Option<Self::Item>
where + Self: Sized,

Consumes the iterator, returning the last element. Read more
source§

fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize>

🔬This is a nightly-only experimental API. (iter_advance_by)
Advances the iterator by n elements. Read more
1.0.0 · source§

fn nth(&mut self, n: usize) -> Option<Self::Item>

Returns the nth element of the iterator. Read more
1.28.0 · source§

fn step_by(self, step: usize) -> StepBy<Self>
where + Self: Sized,

Creates an iterator starting at the same point, but stepping by +the given amount at each iteration. Read more
1.0.0 · source§

fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
where + Self: Sized, + U: IntoIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both in sequence. Read more
1.0.0 · source§

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>
where + Self: Sized, + U: IntoIterator,

‘Zips up’ two iterators into a single iterator of pairs. Read more
source§

fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
where + Self: Sized, + G: FnMut() -> Self::Item,

🔬This is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places an item generated by separator +between adjacent items of the original iterator. Read more
1.0.0 · source§

fn map<B, F>(self, f: F) -> Map<Self, F>
where + Self: Sized, + F: FnMut(Self::Item) -> B,

Takes a closure and creates an iterator which calls that closure on each +element. Read more
1.21.0 · source§

fn for_each<F>(self, f: F)
where + Self: Sized, + F: FnMut(Self::Item),

Calls a closure on each element of an iterator. Read more
1.0.0 · source§

fn filter<P>(self, predicate: P) -> Filter<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator which uses a closure to determine if an element +should be yielded. Read more
1.0.0 · source§

fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
where + Self: Sized, + F: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both filters and maps. Read more
1.0.0 · source§

fn enumerate(self) -> Enumerate<Self>
where + Self: Sized,

Creates an iterator which gives the current iteration count as well as +the next value. Read more
1.0.0 · source§

fn peekable(self) -> Peekable<Self>
where + Self: Sized,

Creates an iterator which can use the peek and peek_mut methods to look at the next element of the iterator without consuming it. See -their documentation for more information. Read more
1.0.0 · source§

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>where - Self: Sized, - P: FnMut(&Self::Item) -> bool,

Creates an iterator that skips elements based on a predicate. Read more
1.0.0 · source§

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>where - Self: Sized, - P: FnMut(&Self::Item) -> bool,

Creates an iterator that yields elements based on a predicate. Read more
1.57.0 · source§

fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>where - Self: Sized, - P: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both yields elements based on a predicate and maps. Read more
1.0.0 · source§

fn skip(self, n: usize) -> Skip<Self>where - Self: Sized,

Creates an iterator that skips the first n elements. Read more
1.0.0 · source§

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

Creates an iterator that yields the first n elements, or fewer -if the underlying iterator ends sooner. Read more
1.0.0 · source§

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>where - Self: Sized, - F: FnMut(&mut St, Self::Item) -> Option<B>,

An iterator adapter which, like fold, holds internal state, but -unlike fold, produces a new iterator. Read more
1.0.0 · source§

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>where - Self: Sized, - U: IntoIterator, - F: FnMut(Self::Item) -> U,

Creates an iterator that works like map, but flattens nested structure. Read more
source§

fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>where - Self: Sized, - F: FnMut(&[Self::Item; N]) -> R,

🔬This is a nightly-only experimental API. (iter_map_windows)
Calls the given function f for each contiguous window of size N over -self and returns an iterator over the outputs of f. Like slice::windows(), -the windows during mapping overlap as well. Read more
1.0.0 · source§

fn fuse(self) -> Fuse<Self>where - Self: Sized,

Creates an iterator which ends after the first None. Read more
1.0.0 · source§

fn inspect<F>(self, f: F) -> Inspect<Self, F>where - Self: Sized, - F: FnMut(&Self::Item),

Does something with each element of an iterator, passing the value on. Read more
1.0.0 · source§

fn by_ref(&mut self) -> &mut Selfwhere - Self: Sized,

Borrows an iterator, rather than consuming it. Read more
1.0.0 · source§

fn collect<B>(self) -> Bwhere - B: FromIterator<Self::Item>, - Self: Sized,

Transforms an iterator into a collection. Read more
source§

fn collect_into<E>(self, collection: &mut E) -> &mut Ewhere - E: Extend<Self::Item>, - Self: Sized,

🔬This is a nightly-only experimental API. (iter_collect_into)
Collects all the items from an iterator into a collection. Read more
1.0.0 · source§

fn partition<B, F>(self, f: F) -> (B, B)where - Self: Sized, - B: Default + Extend<Self::Item>, - F: FnMut(&Self::Item) -> bool,

Consumes an iterator, creating two collections from it. Read more
source§

fn is_partitioned<P>(self, predicate: P) -> boolwhere - Self: Sized, - P: FnMut(Self::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_is_partitioned)
Checks if the elements of this iterator are partitioned according to the given predicate, -such that all those that return true precede all those that return false. Read more
1.27.0 · source§

fn try_fold<B, F, R>(&mut self, init: B, f: F) -> Rwhere - Self: Sized, - F: FnMut(B, Self::Item) -> R, - R: Try<Output = B>,

An iterator method that applies a function as long as it returns -successfully, producing a single, final value. Read more
1.27.0 · source§

fn try_for_each<F, R>(&mut self, f: F) -> Rwhere - Self: Sized, - F: FnMut(Self::Item) -> R, - R: Try<Output = ()>,

An iterator method that applies a fallible function to each item in the -iterator, stopping at the first error and returning that error. Read more
1.0.0 · source§

fn fold<B, F>(self, init: B, f: F) -> Bwhere - Self: Sized, - F: FnMut(B, Self::Item) -> B,

Folds every element into an accumulator by applying an operation, -returning the final result. Read more
1.51.0 · source§

fn reduce<F>(self, f: F) -> Option<Self::Item>where - Self: Sized, - F: FnMut(Self::Item, Self::Item) -> Self::Item,

Reduces the elements to a single one, by repeatedly applying a reducing -operation. Read more
source§

fn try_reduce<F, R>( +their documentation for more information. Read more

1.0.0 · source§

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator that skips elements based on a predicate. Read more
1.0.0 · source§

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Creates an iterator that yields elements based on a predicate. Read more
1.57.0 · source§

fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
where + Self: Sized, + P: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both yields elements based on a predicate and maps. Read more
1.0.0 · source§

fn skip(self, n: usize) -> Skip<Self>
where + Self: Sized,

Creates an iterator that skips the first n elements. Read more
1.0.0 · source§

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

Creates an iterator that yields the first n elements, or fewer +if the underlying iterator ends sooner. Read more
1.0.0 · source§

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
where + Self: Sized, + F: FnMut(&mut St, Self::Item) -> Option<B>,

An iterator adapter which, like fold, holds internal state, but +unlike fold, produces a new iterator. Read more
1.0.0 · source§

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
where + Self: Sized, + U: IntoIterator, + F: FnMut(Self::Item) -> U,

Creates an iterator that works like map, but flattens nested structure. Read more
source§

fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
where + Self: Sized, + F: FnMut(&[Self::Item; N]) -> R,

🔬This is a nightly-only experimental API. (iter_map_windows)
Calls the given function f for each contiguous window of size N over +self and returns an iterator over the outputs of f. Like slice::windows(), +the windows during mapping overlap as well. Read more
1.0.0 · source§

fn fuse(self) -> Fuse<Self>
where + Self: Sized,

Creates an iterator which ends after the first None. Read more
1.0.0 · source§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where + Self: Sized, + F: FnMut(&Self::Item),

Does something with each element of an iterator, passing the value on. Read more
1.0.0 · source§

fn by_ref(&mut self) -> &mut Self
where + Self: Sized,

Borrows an iterator, rather than consuming it. Read more
1.0.0 · source§

fn collect<B>(self) -> B
where + B: FromIterator<Self::Item>, + Self: Sized,

Transforms an iterator into a collection. Read more
source§

fn collect_into<E>(self, collection: &mut E) -> &mut E
where + E: Extend<Self::Item>, + Self: Sized,

🔬This is a nightly-only experimental API. (iter_collect_into)
Collects all the items from an iterator into a collection. Read more
1.0.0 · source§

fn partition<B, F>(self, f: F) -> (B, B)
where + Self: Sized, + B: Default + Extend<Self::Item>, + F: FnMut(&Self::Item) -> bool,

Consumes an iterator, creating two collections from it. Read more
source§

fn is_partitioned<P>(self, predicate: P) -> bool
where + Self: Sized, + P: FnMut(Self::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_is_partitioned)
Checks if the elements of this iterator are partitioned according to the given predicate, +such that all those that return true precede all those that return false. Read more
1.27.0 · source§

fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
where + Self: Sized, + F: FnMut(B, Self::Item) -> R, + R: Try<Output = B>,

An iterator method that applies a function as long as it returns +successfully, producing a single, final value. Read more
1.27.0 · source§

fn try_for_each<F, R>(&mut self, f: F) -> R
where + Self: Sized, + F: FnMut(Self::Item) -> R, + R: Try<Output = ()>,

An iterator method that applies a fallible function to each item in the +iterator, stopping at the first error and returning that error. Read more
1.0.0 · source§

fn fold<B, F>(self, init: B, f: F) -> B
where + Self: Sized, + F: FnMut(B, Self::Item) -> B,

Folds every element into an accumulator by applying an operation, +returning the final result. Read more
1.51.0 · source§

fn reduce<F>(self, f: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(Self::Item, Self::Item) -> Self::Item,

Reduces the elements to a single one, by repeatedly applying a reducing +operation. Read more
source§

fn try_reduce<F, R>( &mut self, f: F -) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryTypewhere - Self: Sized, - F: FnMut(Self::Item, Self::Item) -> R, - R: Try<Output = Self::Item>, - <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (iterator_try_reduce)
Reduces the elements to a single one by repeatedly applying a reducing operation. If the -closure returns a failure, the failure is propagated back to the caller immediately. Read more
1.0.0 · source§

fn all<F>(&mut self, f: F) -> boolwhere - Self: Sized, - F: FnMut(Self::Item) -> bool,

Tests if every element of the iterator matches a predicate. Read more
1.0.0 · source§

fn any<F>(&mut self, f: F) -> boolwhere - Self: Sized, - F: FnMut(Self::Item) -> bool,

Tests if any element of the iterator matches a predicate. Read more
1.0.0 · source§

fn find<P>(&mut self, predicate: P) -> Option<Self::Item>where - Self: Sized, - P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator that satisfies a predicate. Read more
1.30.0 · source§

fn find_map<B, F>(&mut self, f: F) -> Option<B>where - Self: Sized, - F: FnMut(Self::Item) -> Option<B>,

Applies function to the elements of iterator and returns -the first non-none result. Read more
source§

fn try_find<F, R>( +) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
where + Self: Sized, + F: FnMut(Self::Item, Self::Item) -> R, + R: Try<Output = Self::Item>, + <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (iterator_try_reduce)
Reduces the elements to a single one by repeatedly applying a reducing operation. If the +closure returns a failure, the failure is propagated back to the caller immediately. Read more
1.0.0 · source§

fn all<F>(&mut self, f: F) -> bool
where + Self: Sized, + F: FnMut(Self::Item) -> bool,

Tests if every element of the iterator matches a predicate. Read more
1.0.0 · source§

fn any<F>(&mut self, f: F) -> bool
where + Self: Sized, + F: FnMut(Self::Item) -> bool,

Tests if any element of the iterator matches a predicate. Read more
1.0.0 · source§

fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
where + Self: Sized, + P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator that satisfies a predicate. Read more
1.30.0 · source§

fn find_map<B, F>(&mut self, f: F) -> Option<B>
where + Self: Sized, + F: FnMut(Self::Item) -> Option<B>,

Applies function to the elements of iterator and returns +the first non-none result. Read more
source§

fn try_find<F, R>( &mut self, f: F -) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryTypewhere - Self: Sized, - F: FnMut(&Self::Item) -> R, - R: Try<Output = bool>, - <R as Try>::Residual: Residual<Option<Self::Item>>,

🔬This is a nightly-only experimental API. (try_find)
Applies function to the elements of iterator and returns -the first true result or the first error. Read more
1.0.0 · source§

fn position<P>(&mut self, predicate: P) -> Option<usize>where - Self: Sized, - P: FnMut(Self::Item) -> bool,

Searches for an element in an iterator, returning its index. Read more
1.6.0 · source§

fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>where - B: Ord, - Self: Sized, - F: FnMut(&Self::Item) -> B,

Returns the element that gives the maximum value from the -specified function. Read more
1.15.0 · source§

fn max_by<F>(self, compare: F) -> Option<Self::Item>where - Self: Sized, - F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the maximum value with respect to the -specified comparison function. Read more
1.6.0 · source§

fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>where - B: Ord, - Self: Sized, - F: FnMut(&Self::Item) -> B,

Returns the element that gives the minimum value from the -specified function. Read more
1.15.0 · source§

fn min_by<F>(self, compare: F) -> Option<Self::Item>where - Self: Sized, - F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the minimum value with respect to the -specified comparison function. Read more
1.0.0 · source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where - FromA: Default + Extend<A>, - FromB: Default + Extend<B>, - Self: Sized + Iterator<Item = (A, B)>,

Converts an iterator of pairs into a pair of containers. Read more
1.36.0 · source§

fn copied<'a, T>(self) -> Copied<Self>where - T: 'a + Copy, - Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which copies all of its elements. Read more
1.0.0 · source§

fn cloned<'a, T>(self) -> Cloned<Self>where - T: 'a + Clone, - Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which clones all of its elements. Read more
source§

fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>where - Self: Sized,

🔬This is a nightly-only experimental API. (iter_array_chunks)
Returns an iterator over N elements of the iterator at a time. Read more
1.11.0 · source§

fn sum<S>(self) -> Swhere - Self: Sized, - S: Sum<Self::Item>,

Sums the elements of an iterator. Read more
1.11.0 · source§

fn product<P>(self) -> Pwhere - Self: Sized, - P: Product<Self::Item>,

Iterates over the entire iterator, multiplying all the elements Read more
source§

fn cmp_by<I, F>(self, other: I, cmp: F) -> Orderingwhere - Self: Sized, - I: IntoIterator, - F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those -of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>where - I: IntoIterator, - Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Lexicographically compares the PartialOrd elements of -this Iterator with those of another. The comparison works like short-circuit +) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
where + Self: Sized, + F: FnMut(&Self::Item) -> R, + R: Try<Output = bool>, + <R as Try>::Residual: Residual<Option<Self::Item>>,
🔬This is a nightly-only experimental API. (try_find)
Applies function to the elements of iterator and returns +the first true result or the first error. Read more
1.0.0 · source§

fn position<P>(&mut self, predicate: P) -> Option<usize>
where + Self: Sized, + P: FnMut(Self::Item) -> bool,

Searches for an element in an iterator, returning its index. Read more
1.6.0 · source§

fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
where + B: Ord, + Self: Sized, + F: FnMut(&Self::Item) -> B,

Returns the element that gives the maximum value from the +specified function. Read more
1.15.0 · source§

fn max_by<F>(self, compare: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the maximum value with respect to the +specified comparison function. Read more
1.6.0 · source§

fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
where + B: Ord, + Self: Sized, + F: FnMut(&Self::Item) -> B,

Returns the element that gives the minimum value from the +specified function. Read more
1.15.0 · source§

fn min_by<F>(self, compare: F) -> Option<Self::Item>
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the minimum value with respect to the +specified comparison function. Read more
1.0.0 · source§

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where + FromA: Default + Extend<A>, + FromB: Default + Extend<B>, + Self: Sized + Iterator<Item = (A, B)>,

Converts an iterator of pairs into a pair of containers. Read more
1.36.0 · source§

fn copied<'a, T>(self) -> Copied<Self>
where + T: 'a + Copy, + Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which copies all of its elements. Read more
1.0.0 · source§

fn cloned<'a, T>(self) -> Cloned<Self>
where + T: 'a + Clone, + Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which clones all of its elements. Read more
source§

fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>
where + Self: Sized,

🔬This is a nightly-only experimental API. (iter_array_chunks)
Returns an iterator over N elements of the iterator at a time. Read more
1.11.0 · source§

fn sum<S>(self) -> S
where + Self: Sized, + S: Sum<Self::Item>,

Sums the elements of an iterator. Read more
1.11.0 · source§

fn product<P>(self) -> P
where + Self: Sized, + P: Product<Self::Item>,

Iterates over the entire iterator, multiplying all the elements Read more
source§

fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn partial_cmp<I>(self, other: I) -> Option<Ordering>
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Lexicographically compares the PartialOrd elements of +this Iterator with those of another. The comparison works like short-circuit evaluation, returning a result without comparing the remaining elements. -As soon as an order can be determined, the evaluation stops and a result is returned. Read more
source§

fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>where - Self: Sized, - I: IntoIterator, - F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those -of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn eq<I>(self, other: I) -> boolwhere - I: IntoIterator, - Self::Item: PartialEq<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are equal to those of -another. Read more
source§

fn eq_by<I, F>(self, other: I, eq: F) -> boolwhere - Self: Sized, - I: IntoIterator, - F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_order_by)
Determines if the elements of this Iterator are equal to those of -another with respect to the specified equality function. Read more
1.5.0 · source§

fn ne<I>(self, other: I) -> boolwhere - I: IntoIterator, - Self::Item: PartialEq<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are not equal to those of -another. Read more
1.5.0 · source§

fn lt<I>(self, other: I) -> boolwhere - I: IntoIterator, - Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are lexicographically -less than those of another. Read more
1.5.0 · source§

fn le<I>(self, other: I) -> boolwhere - I: IntoIterator, - Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are lexicographically -less or equal to those of another. Read more
1.5.0 · source§

fn gt<I>(self, other: I) -> boolwhere - I: IntoIterator, - Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are lexicographically -greater than those of another. Read more
1.5.0 · source§

fn ge<I>(self, other: I) -> boolwhere - I: IntoIterator, - Self::Item: PartialOrd<<I as IntoIterator>::Item>, - Self: Sized,

Determines if the elements of this Iterator are lexicographically -greater than or equal to those of another. Read more
source§

fn is_sorted_by<F>(self, compare: F) -> boolwhere - Self: Sized, - F: FnMut(&Self::Item, &Self::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given comparator function. Read more
source§

fn is_sorted_by_key<F, K>(self, f: F) -> boolwhere - Self: Sized, - F: FnMut(Self::Item) -> K, - K: PartialOrd,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given key extraction -function. Read more

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for IntoIter<T>where - T: RefUnwindSafe,

§

impl<T> Send for IntoIter<T>where - T: Send,

§

impl<T> Sync for IntoIter<T>where - T: Sync,

§

impl<T> Unpin for IntoIter<T>where - T: Unpin,

§

impl<T> UnwindSafe for IntoIter<T>where - T: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+As soon as an order can be determined, the evaluation stops and a result is returned. Read more
source§

fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those +of another with respect to the specified comparison function. Read more
1.5.0 · source§

fn eq<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialEq<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are equal to those of +another. Read more
source§

fn eq_by<I, F>(self, other: I, eq: F) -> bool
where + Self: Sized, + I: IntoIterator, + F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_order_by)
Determines if the elements of this Iterator are equal to those of +another with respect to the specified equality function. Read more
1.5.0 · source§

fn ne<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialEq<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are not equal to those of +another. Read more
1.5.0 · source§

fn lt<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +less than those of another. Read more
1.5.0 · source§

fn le<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +less or equal to those of another. Read more
1.5.0 · source§

fn gt<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +greater than those of another. Read more
1.5.0 · source§

fn ge<I>(self, other: I) -> bool
where + I: IntoIterator, + Self::Item: PartialOrd<<I as IntoIterator>::Item>, + Self: Sized,

Determines if the elements of this Iterator are lexicographically +greater than or equal to those of another. Read more
source§

fn is_sorted_by<F>(self, compare: F) -> bool
where + Self: Sized, + F: FnMut(&Self::Item, &Self::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given comparator function. Read more
source§

fn is_sorted_by_key<F, K>(self, f: F) -> bool
where + Self: Sized, + F: FnMut(Self::Item) -> K, + K: PartialOrd,

🔬This is a nightly-only experimental API. (is_sorted)
Checks if the elements of this iterator are sorted using the given key extraction +function. Read more

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for IntoIter<T>
where + T: RefUnwindSafe,

§

impl<T> Send for IntoIter<T>
where + T: Send,

§

impl<T> Sync for IntoIter<T>
where + T: Sync,

§

impl<T> Unpin for IntoIter<T>
where + T: Unpin,

§

impl<T> UnwindSafe for IntoIter<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<I> IntoIterator for Iwhere - I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
const: unstable · source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<I> IntoIterator for I
where + I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
const: unstable · source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/bytes/buf/struct.Limit.html b/bytes/buf/struct.Limit.html index 805cb4479..161a9c94d 100644 --- a/bytes/buf/struct.Limit.html +++ b/bytes/buf/struct.Limit.html @@ -1,46 +1,47 @@ -Limit in bytes::buf - Rust

Struct bytes::buf::Limit

source ·
pub struct Limit<T> { /* private fields */ }
Expand description

A BufMut adapter which limits the amount of bytes that can be written +Limit in bytes::buf - Rust

+

Struct bytes::buf::Limit

source ·
pub struct Limit<T> { /* private fields */ }
Expand description

A BufMut adapter which limits the amount of bytes that can be written to an underlying buffer.

-

Implementations§

source§

impl<T> Limit<T>

source

pub fn into_inner(self) -> T

Consumes this Limit, returning the underlying value.

-
source

pub fn get_ref(&self) -> &T

Gets a reference to the underlying BufMut.

+

Implementations§

source§

impl<T> Limit<T>

source

pub fn into_inner(self) -> T

Consumes this Limit, returning the underlying value.

+
source

pub fn get_ref(&self) -> &T

Gets a reference to the underlying BufMut.

It is inadvisable to directly write to the underlying BufMut.

-
source

pub fn get_mut(&mut self) -> &mut T

Gets a mutable reference to the underlying BufMut.

+
source

pub fn get_mut(&mut self) -> &mut T

Gets a mutable reference to the underlying BufMut.

It is inadvisable to directly write to the underlying BufMut.

-
source

pub fn limit(&self) -> usize

Returns the maximum number of bytes that can be written

+
source

pub fn limit(&self) -> usize

Returns the maximum number of bytes that can be written

Note

If the inner BufMut has fewer bytes than indicated by this method then that is the actual number of available bytes.

-
source

pub fn set_limit(&mut self, lim: usize)

Sets the maximum number of bytes that can be written.

+
source

pub fn set_limit(&mut self, lim: usize)

Sets the maximum number of bytes that can be written.

Note

If the inner BufMut has fewer bytes than lim then that is the actual number of available bytes.

-

Trait Implementations§

source§

impl<T: BufMut> BufMut for Limit<T>

source§

fn remaining_mut(&self) -> usize

Returns the number of bytes that can be written from the current +

Trait Implementations§

source§

impl<T: BufMut> BufMut for Limit<T>

source§

fn remaining_mut(&self) -> usize

Returns the number of bytes that can be written from the current position until the end of the buffer is reached. Read more
source§

fn chunk_mut(&mut self) -> &mut UninitSlice

Returns a mutable slice starting at the current BufMut position and of length between 0 and BufMut::remaining_mut(). Note that this can be shorter than the -whole remainder of the buffer (this allows non-continuous implementation). Read more
source§

unsafe fn advance_mut(&mut self, cnt: usize)

Advance the internal cursor of the BufMut Read more
source§

fn has_remaining_mut(&self) -> bool

Returns true if there is space in self for more bytes. Read more
source§

fn put<T: Buf>(&mut self, src: T)where - Self: Sized,

Transfer bytes into self from src and advance the cursor by the -number of bytes written. Read more
source§

fn put_slice(&mut self, src: &[u8])

Transfer bytes into self from src and advance the cursor by the -number of bytes written. Read more
source§

fn put_bytes(&mut self, val: u8, cnt: usize)

Put cnt bytes val into self. Read more
source§

fn put_u8(&mut self, n: u8)

Writes an unsigned 8 bit integer to self. Read more
source§

fn put_i8(&mut self, n: i8)

Writes a signed 8 bit integer to self. Read more
source§

fn put_u16(&mut self, n: u16)

Writes an unsigned 16 bit integer to self in big-endian byte order. Read more
source§

fn put_u16_le(&mut self, n: u16)

Writes an unsigned 16 bit integer to self in little-endian byte order. Read more
source§

fn put_u16_ne(&mut self, n: u16)

Writes an unsigned 16 bit integer to self in native-endian byte order. Read more
source§

fn put_i16(&mut self, n: i16)

Writes a signed 16 bit integer to self in big-endian byte order. Read more
source§

fn put_i16_le(&mut self, n: i16)

Writes a signed 16 bit integer to self in little-endian byte order. Read more
source§

fn put_i16_ne(&mut self, n: i16)

Writes a signed 16 bit integer to self in native-endian byte order. Read more
source§

fn put_u32(&mut self, n: u32)

Writes an unsigned 32 bit integer to self in big-endian byte order. Read more
source§

fn put_u32_le(&mut self, n: u32)

Writes an unsigned 32 bit integer to self in little-endian byte order. Read more
source§

fn put_u32_ne(&mut self, n: u32)

Writes an unsigned 32 bit integer to self in native-endian byte order. Read more
source§

fn put_i32(&mut self, n: i32)

Writes a signed 32 bit integer to self in big-endian byte order. Read more
source§

fn put_i32_le(&mut self, n: i32)

Writes a signed 32 bit integer to self in little-endian byte order. Read more
source§

fn put_i32_ne(&mut self, n: i32)

Writes a signed 32 bit integer to self in native-endian byte order. Read more
source§

fn put_u64(&mut self, n: u64)

Writes an unsigned 64 bit integer to self in the big-endian byte order. Read more
source§

fn put_u64_le(&mut self, n: u64)

Writes an unsigned 64 bit integer to self in little-endian byte order. Read more
source§

fn put_u64_ne(&mut self, n: u64)

Writes an unsigned 64 bit integer to self in native-endian byte order. Read more
source§

fn put_i64(&mut self, n: i64)

Writes a signed 64 bit integer to self in the big-endian byte order. Read more
source§

fn put_i64_le(&mut self, n: i64)

Writes a signed 64 bit integer to self in little-endian byte order. Read more
source§

fn put_i64_ne(&mut self, n: i64)

Writes a signed 64 bit integer to self in native-endian byte order. Read more
source§

fn put_u128(&mut self, n: u128)

Writes an unsigned 128 bit integer to self in the big-endian byte order. Read more
source§

fn put_u128_le(&mut self, n: u128)

Writes an unsigned 128 bit integer to self in little-endian byte order. Read more
source§

fn put_u128_ne(&mut self, n: u128)

Writes an unsigned 128 bit integer to self in native-endian byte order. Read more
source§

fn put_i128(&mut self, n: i128)

Writes a signed 128 bit integer to self in the big-endian byte order. Read more
source§

fn put_i128_le(&mut self, n: i128)

Writes a signed 128 bit integer to self in little-endian byte order. Read more
source§

fn put_i128_ne(&mut self, n: i128)

Writes a signed 128 bit integer to self in native-endian byte order. Read more
source§

fn put_uint(&mut self, n: u64, nbytes: usize)

Writes an unsigned n-byte integer to self in big-endian byte order. Read more
source§

fn put_uint_le(&mut self, n: u64, nbytes: usize)

Writes an unsigned n-byte integer to self in the little-endian byte order. Read more
source§

fn put_uint_ne(&mut self, n: u64, nbytes: usize)

Writes an unsigned n-byte integer to self in the native-endian byte order. Read more
source§

fn put_int(&mut self, n: i64, nbytes: usize)

Writes low nbytes of a signed integer to self in big-endian byte order. Read more
source§

fn put_int_le(&mut self, n: i64, nbytes: usize)

Writes low nbytes of a signed integer to self in little-endian byte order. Read more
source§

fn put_int_ne(&mut self, n: i64, nbytes: usize)

Writes low nbytes of a signed integer to self in native-endian byte order. Read more
source§

fn put_f32(&mut self, n: f32)

Writes an IEEE754 single-precision (4 bytes) floating point number to -self in big-endian byte order. Read more
source§

fn put_f32_le(&mut self, n: f32)

Writes an IEEE754 single-precision (4 bytes) floating point number to -self in little-endian byte order. Read more
source§

fn put_f32_ne(&mut self, n: f32)

Writes an IEEE754 single-precision (4 bytes) floating point number to -self in native-endian byte order. Read more
source§

fn put_f64(&mut self, n: f64)

Writes an IEEE754 double-precision (8 bytes) floating point number to -self in big-endian byte order. Read more
source§

fn put_f64_le(&mut self, n: f64)

Writes an IEEE754 double-precision (8 bytes) floating point number to -self in little-endian byte order. Read more
source§

fn put_f64_ne(&mut self, n: f64)

Writes an IEEE754 double-precision (8 bytes) floating point number to -self in native-endian byte order. Read more
source§

fn limit(self, limit: usize) -> Limit<Self>where - Self: Sized,

Creates an adaptor which can write at most limit bytes to self. Read more
source§

fn writer(self) -> Writer<Self> where - Self: Sized,

Creates an adaptor which implements the Write trait for self. Read more
source§

fn chain_mut<U: BufMut>(self, next: U) -> Chain<Self, U>where - Self: Sized,

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

impl<T: Debug> Debug for Limit<T>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for Limit<T>where - T: RefUnwindSafe,

§

impl<T> Send for Limit<T>where - T: Send,

§

impl<T> Sync for Limit<T>where - T: Sync,

§

impl<T> Unpin for Limit<T>where - T: Unpin,

§

impl<T> UnwindSafe for Limit<T>where - T: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+whole remainder of the buffer (this allows non-continuous implementation). Read more
source§

unsafe fn advance_mut(&mut self, cnt: usize)

Advance the internal cursor of the BufMut Read more
source§

fn has_remaining_mut(&self) -> bool

Returns true if there is space in self for more bytes. Read more
source§

fn put<T: Buf>(&mut self, src: T)
where + Self: Sized,

Transfer bytes into self from src and advance the cursor by the +number of bytes written. Read more
source§

fn put_slice(&mut self, src: &[u8])

Transfer bytes into self from src and advance the cursor by the +number of bytes written. Read more
source§

fn put_bytes(&mut self, val: u8, cnt: usize)

Put cnt bytes val into self. Read more
source§

fn put_u8(&mut self, n: u8)

Writes an unsigned 8 bit integer to self. Read more
source§

fn put_i8(&mut self, n: i8)

Writes a signed 8 bit integer to self. Read more
source§

fn put_u16(&mut self, n: u16)

Writes an unsigned 16 bit integer to self in big-endian byte order. Read more
source§

fn put_u16_le(&mut self, n: u16)

Writes an unsigned 16 bit integer to self in little-endian byte order. Read more
source§

fn put_u16_ne(&mut self, n: u16)

Writes an unsigned 16 bit integer to self in native-endian byte order. Read more
source§

fn put_i16(&mut self, n: i16)

Writes a signed 16 bit integer to self in big-endian byte order. Read more
source§

fn put_i16_le(&mut self, n: i16)

Writes a signed 16 bit integer to self in little-endian byte order. Read more
source§

fn put_i16_ne(&mut self, n: i16)

Writes a signed 16 bit integer to self in native-endian byte order. Read more
source§

fn put_u32(&mut self, n: u32)

Writes an unsigned 32 bit integer to self in big-endian byte order. Read more
source§

fn put_u32_le(&mut self, n: u32)

Writes an unsigned 32 bit integer to self in little-endian byte order. Read more
source§

fn put_u32_ne(&mut self, n: u32)

Writes an unsigned 32 bit integer to self in native-endian byte order. Read more
source§

fn put_i32(&mut self, n: i32)

Writes a signed 32 bit integer to self in big-endian byte order. Read more
source§

fn put_i32_le(&mut self, n: i32)

Writes a signed 32 bit integer to self in little-endian byte order. Read more
source§

fn put_i32_ne(&mut self, n: i32)

Writes a signed 32 bit integer to self in native-endian byte order. Read more
source§

fn put_u64(&mut self, n: u64)

Writes an unsigned 64 bit integer to self in the big-endian byte order. Read more
source§

fn put_u64_le(&mut self, n: u64)

Writes an unsigned 64 bit integer to self in little-endian byte order. Read more
source§

fn put_u64_ne(&mut self, n: u64)

Writes an unsigned 64 bit integer to self in native-endian byte order. Read more
source§

fn put_i64(&mut self, n: i64)

Writes a signed 64 bit integer to self in the big-endian byte order. Read more
source§

fn put_i64_le(&mut self, n: i64)

Writes a signed 64 bit integer to self in little-endian byte order. Read more
source§

fn put_i64_ne(&mut self, n: i64)

Writes a signed 64 bit integer to self in native-endian byte order. Read more
source§

fn put_u128(&mut self, n: u128)

Writes an unsigned 128 bit integer to self in the big-endian byte order. Read more
source§

fn put_u128_le(&mut self, n: u128)

Writes an unsigned 128 bit integer to self in little-endian byte order. Read more
source§

fn put_u128_ne(&mut self, n: u128)

Writes an unsigned 128 bit integer to self in native-endian byte order. Read more
source§

fn put_i128(&mut self, n: i128)

Writes a signed 128 bit integer to self in the big-endian byte order. Read more
source§

fn put_i128_le(&mut self, n: i128)

Writes a signed 128 bit integer to self in little-endian byte order. Read more
source§

fn put_i128_ne(&mut self, n: i128)

Writes a signed 128 bit integer to self in native-endian byte order. Read more
source§

fn put_uint(&mut self, n: u64, nbytes: usize)

Writes an unsigned n-byte integer to self in big-endian byte order. Read more
source§

fn put_uint_le(&mut self, n: u64, nbytes: usize)

Writes an unsigned n-byte integer to self in the little-endian byte order. Read more
source§

fn put_uint_ne(&mut self, n: u64, nbytes: usize)

Writes an unsigned n-byte integer to self in the native-endian byte order. Read more
source§

fn put_int(&mut self, n: i64, nbytes: usize)

Writes low nbytes of a signed integer to self in big-endian byte order. Read more
source§

fn put_int_le(&mut self, n: i64, nbytes: usize)

Writes low nbytes of a signed integer to self in little-endian byte order. Read more
source§

fn put_int_ne(&mut self, n: i64, nbytes: usize)

Writes low nbytes of a signed integer to self in native-endian byte order. Read more
source§

fn put_f32(&mut self, n: f32)

Writes an IEEE754 single-precision (4 bytes) floating point number to +self in big-endian byte order. Read more
source§

fn put_f32_le(&mut self, n: f32)

Writes an IEEE754 single-precision (4 bytes) floating point number to +self in little-endian byte order. Read more
source§

fn put_f32_ne(&mut self, n: f32)

Writes an IEEE754 single-precision (4 bytes) floating point number to +self in native-endian byte order. Read more
source§

fn put_f64(&mut self, n: f64)

Writes an IEEE754 double-precision (8 bytes) floating point number to +self in big-endian byte order. Read more
source§

fn put_f64_le(&mut self, n: f64)

Writes an IEEE754 double-precision (8 bytes) floating point number to +self in little-endian byte order. Read more
source§

fn put_f64_ne(&mut self, n: f64)

Writes an IEEE754 double-precision (8 bytes) floating point number to +self in native-endian byte order. Read more
source§

fn limit(self, limit: usize) -> Limit<Self>
where + Self: Sized,

Creates an adaptor which can write at most limit bytes to self. Read more
source§

fn writer(self) -> Writer<Self>
where + Self: Sized,

Creates an adaptor which implements the Write trait for self. Read more
source§

fn chain_mut<U: BufMut>(self, next: U) -> Chain<Self, U>
where + Self: Sized,

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

impl<T: Debug> Debug for Limit<T>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for Limit<T>
where + T: RefUnwindSafe,

§

impl<T> Send for Limit<T>
where + T: Send,

§

impl<T> Sync for Limit<T>
where + T: Sync,

§

impl<T> Unpin for Limit<T>
where + T: Unpin,

§

impl<T> UnwindSafe for Limit<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/bytes/buf/struct.Reader.html b/bytes/buf/struct.Reader.html index 46dcbeb47..4506225dc 100644 --- a/bytes/buf/struct.Reader.html +++ b/bytes/buf/struct.Reader.html @@ -1,55 +1,56 @@ -Reader in bytes::buf - Rust

Struct bytes::buf::Reader

source ·
pub struct Reader<B> { /* private fields */ }
Expand description

A Buf adapter which implements io::Read for the inner value.

+Reader in bytes::buf - Rust +

Struct bytes::buf::Reader

source ·
pub struct Reader<B> { /* private fields */ }
Expand description

A Buf adapter which implements io::Read for the inner value.

This struct is generally created by calling reader() on Buf. See documentation of reader() for more details.

-

Implementations§

source§

impl<B: Buf> Reader<B>

source

pub fn get_ref(&self) -> &B

Gets a reference to the underlying Buf.

+

Implementations§

source§

impl<B: Buf> Reader<B>

source

pub fn get_ref(&self) -> &B

Gets a reference to the underlying Buf.

It is inadvisable to directly read from the underlying Buf.

Examples
use bytes::Buf;
 
-let buf = b"hello world".reader();
+let buf = b"hello world".reader();
 
-assert_eq!(b"hello world", buf.get_ref());
-
source

pub fn get_mut(&mut self) -> &mut B

Gets a mutable reference to the underlying Buf.

+assert_eq!(b"hello world", buf.get_ref());
+
source

pub fn get_mut(&mut self) -> &mut B

Gets a mutable reference to the underlying Buf.

It is inadvisable to directly read from the underlying Buf.

source

pub fn into_inner(self) -> B

Consumes this Reader, returning the underlying value.

Examples
use bytes::Buf;
 use std::io;
 
-let mut buf = b"hello world".reader();
+let mut buf = b"hello world".reader();
 let mut dst = vec![];
 
 io::copy(&mut buf, &mut dst).unwrap();
 
 let buf = buf.into_inner();
 assert_eq!(0, buf.remaining());
-

Trait Implementations§

source§

impl<B: Buf + Sized> BufRead for Reader<B>

source§

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

Returns the contents of the internal buffer, filling it with more data -from the inner reader if it is empty. Read more
source§

fn consume(&mut self, amt: usize)

Tells this buffer that amt bytes have been consumed from the buffer, -so they should no longer be returned in calls to 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)
Check if the underlying Read has 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>

Read all bytes into buf 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>

Read all bytes until a newline (the 0xA byte) is reached, and append -them to the provided String buffer. Read more
1.0.0 · source§

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

Returns an iterator over the contents of this reader split on the byte -byte. Read more
1.0.0 · source§

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

Returns an iterator over the lines of this reader. Read more
source§

impl<B: Debug> Debug for Reader<B>

source§

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

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

impl<B: Buf + Sized> Read for Reader<B>

source§

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

Pull some bytes from this source into the specified buffer, returning -how many bytes were read. Read more
1.36.0 · 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 -implementation. Read more
1.0.0 · source§

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

Read all bytes until EOF in this source, placing them into buf. Read more
1.0.0 · source§

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

Read all bytes until EOF in this source, appending them to buf. Read more
1.6.0 · source§

fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>

Read the exact number of bytes required to fill buf. Read more
source§

fn read_buf(&mut self, buf: BorrowedCursor<'_>) -> 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_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>

🔬This is a nightly-only experimental API. (read_buf)
Read the exact number of bytes required to fill cursor. Read more
1.0.0 · source§

fn by_ref(&mut self) -> &mut Selfwhere - Self: Sized,

Creates a “by reference” adaptor for this instance of Read. Read more
1.0.0 · source§

fn bytes(self) -> Bytes<Self>where - 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 - R: Read, - 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 - Self: Sized,

Creates an adapter which will read at most limit bytes from it. Read more

Auto Trait Implementations§

§

impl<B> RefUnwindSafe for Reader<B>where - B: RefUnwindSafe,

§

impl<B> Send for Reader<B>where - B: Send,

§

impl<B> Sync for Reader<B>where - B: Sync,

§

impl<B> Unpin for Reader<B>where - B: Unpin,

§

impl<B> UnwindSafe for Reader<B>where - B: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

Trait Implementations§

source§

impl<B: Buf + Sized> BufRead for Reader<B>

source§

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

Returns the contents of the internal buffer, filling it with more data +from the inner reader if it is empty. Read more
source§

fn consume(&mut self, amt: usize)

Tells this buffer that amt bytes have been consumed from the buffer, +so they should no longer be returned in calls to 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)
Check if the underlying Read has 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>

Read all bytes into buf until the delimiter byte or EOF is reached. Read more
source§

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

🔬This is a nightly-only experimental API. (bufread_skip_until)
Skip 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>

Read all bytes until a newline (the 0xA byte) is reached, and append +them to the provided String buffer. Read more
1.0.0 · source§

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

Returns an iterator over the contents of this reader split on the byte +byte. Read more
1.0.0 · source§

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

Returns an iterator over the lines of this reader. Read more
source§

impl<B: Debug> Debug for Reader<B>

source§

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

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

impl<B: Buf + Sized> Read for Reader<B>

source§

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

Pull some bytes from this source into the specified buffer, returning +how many bytes were read. Read more
1.36.0 · 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 +implementation. Read more
1.0.0 · source§

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

Read all bytes until EOF in this source, placing them into buf. Read more
1.0.0 · source§

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

Read all bytes until EOF in this source, appending them to buf. Read more
1.6.0 · source§

fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>

Read the exact number of bytes required to fill buf. Read more
source§

fn read_buf(&mut self, buf: BorrowedCursor<'_>) -> 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_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>

🔬This is a nightly-only experimental API. (read_buf)
Read the exact number of bytes required to fill cursor. Read more
1.0.0 · source§

fn by_ref(&mut self) -> &mut Self
where + Self: Sized,

Creates a “by reference” adaptor for this instance of Read. Read more
1.0.0 · source§

fn bytes(self) -> Bytes<Self>
where + 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 + R: Read, + 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 + Self: Sized,

Creates an adapter which will read at most limit bytes from it. Read more

Auto Trait Implementations§

§

impl<B> RefUnwindSafe for Reader<B>
where + B: RefUnwindSafe,

§

impl<B> Send for Reader<B>
where + B: Send,

§

impl<B> Sync for Reader<B>
where + B: Sync,

§

impl<B> Unpin for Reader<B>
where + B: Unpin,

§

impl<B> UnwindSafe for Reader<B>
where + B: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/bytes/buf/struct.Take.html b/bytes/buf/struct.Take.html index 1c2115a13..7f8369c70 100644 --- a/bytes/buf/struct.Take.html +++ b/bytes/buf/struct.Take.html @@ -1,98 +1,99 @@ -Take in bytes::buf - Rust

Struct bytes::buf::Take

source ·
pub struct Take<T> { /* private fields */ }
Expand description

A Buf adapter which limits the bytes read from an underlying buffer.

+Take in bytes::buf - Rust +

Struct bytes::buf::Take

source ·
pub struct Take<T> { /* private fields */ }
Expand description

A Buf adapter which limits the bytes read from an underlying buffer.

This struct is generally created by calling take() on Buf. See documentation of take() for more details.

-

Implementations§

source§

impl<T> Take<T>

source

pub fn into_inner(self) -> T

Consumes this Take, returning the underlying value.

+

Implementations§

source§

impl<T> Take<T>

source

pub fn into_inner(self) -> T

Consumes this Take, returning the underlying value.

Examples
use bytes::{Buf, BufMut};
 
-let mut buf = b"hello world".take(2);
+let mut buf = b"hello world".take(2);
 let mut dst = vec![];
 
 dst.put(&mut buf);
-assert_eq!(*dst, b"he"[..]);
+assert_eq!(*dst, b"he"[..]);
 
 let mut buf = buf.into_inner();
 
 dst.clear();
 dst.put(&mut buf);
-assert_eq!(*dst, b"llo world"[..]);
-
source

pub fn get_ref(&self) -> &T

Gets a reference to the underlying Buf.

+assert_eq!(*dst, b"llo world"[..]);
+
source

pub fn get_ref(&self) -> &T

Gets a reference to the underlying Buf.

It is inadvisable to directly read from the underlying Buf.

Examples
use bytes::Buf;
 
-let buf = b"hello world".take(2);
+let buf = b"hello world".take(2);
 
 assert_eq!(11, buf.get_ref().remaining());
-
source

pub fn get_mut(&mut self) -> &mut T

Gets a mutable reference to the underlying Buf.

+
source

pub fn get_mut(&mut self) -> &mut T

Gets a mutable reference to the underlying Buf.

It is inadvisable to directly read from the underlying Buf.

Examples
use bytes::{Buf, BufMut};
 
-let mut buf = b"hello world".take(2);
+let mut buf = b"hello world".take(2);
 let mut dst = vec![];
 
 buf.get_mut().advance(2);
 
 dst.put(&mut buf);
-assert_eq!(*dst, b"ll"[..]);
-
source

pub fn limit(&self) -> usize

Returns the maximum number of bytes that can be read.

+assert_eq!(*dst, b"ll"[..]);
+
source

pub fn limit(&self) -> usize

Returns the maximum number of bytes that can be read.

Note

If the inner Buf has fewer bytes than indicated by this method then that is the actual number of available bytes.

Examples
use bytes::Buf;
 
-let mut buf = b"hello world".take(2);
+let mut buf = b"hello world".take(2);
 
 assert_eq!(2, buf.limit());
-assert_eq!(b'h', buf.get_u8());
+assert_eq!(b'h', buf.get_u8());
 assert_eq!(1, buf.limit());
-
source

pub fn set_limit(&mut self, lim: usize)

Sets the maximum number of bytes that can be read.

+
source

pub fn set_limit(&mut self, lim: usize)

Sets the maximum number of bytes that can be read.

Note

If the inner Buf has fewer bytes than lim then that is the actual number of available bytes.

Examples
use bytes::{Buf, BufMut};
 
-let mut buf = b"hello world".take(2);
+let mut buf = b"hello world".take(2);
 let mut dst = vec![];
 
 dst.put(&mut buf);
-assert_eq!(*dst, b"he"[..]);
+assert_eq!(*dst, b"he"[..]);
 
 dst.clear();
 
 buf.set_limit(3);
 dst.put(&mut buf);
-assert_eq!(*dst, b"llo"[..]);
-

Trait Implementations§

source§

impl<T: Buf> Buf for Take<T>

source§

fn remaining(&self) -> usize

Returns the number of bytes between the current position and the end of -the buffer. Read more
source§

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

Returns a slice starting at the current position and of length between 0 +assert_eq!(*dst, b"llo"[..]);
+

Trait Implementations§

source§

impl<T: Buf> Buf for Take<T>

source§

fn remaining(&self) -> usize

Returns the number of bytes between the current position and the end of +the buffer. Read more
source§

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

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

fn advance(&mut self, cnt: usize)

Advance the internal cursor of the Buf Read more
source§

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

Consumes len bytes inside self and returns new instance of Bytes -with this data. Read more
source§

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

Fills dst with potentially multiple slices starting at self’s -current position. Read more
source§

fn has_remaining(&self) -> bool

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

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

Copies bytes from self into dst. Read more
source§

fn get_u8(&mut self) -> u8

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

fn get_i8(&mut self) -> i8

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

fn get_u16(&mut self) -> u16

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

fn get_u16_le(&mut self) -> u16

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

fn get_u16_ne(&mut self) -> u16

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

fn get_i16(&mut self) -> i16

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

fn get_i16_le(&mut self) -> i16

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

fn get_i16_ne(&mut self) -> i16

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

fn get_u32(&mut self) -> u32

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

fn get_u32_le(&mut self) -> u32

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

fn get_u32_ne(&mut self) -> u32

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

fn get_i32(&mut self) -> i32

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

fn get_i32_le(&mut self) -> i32

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

fn get_i32_ne(&mut self) -> i32

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

fn get_u64(&mut self) -> u64

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

fn get_u64_le(&mut self) -> u64

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

fn get_u64_ne(&mut self) -> u64

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

fn get_i64(&mut self) -> i64

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

fn get_i64_le(&mut self) -> i64

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

fn get_i64_ne(&mut self) -> i64

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

fn get_u128(&mut self) -> u128

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

fn get_u128_le(&mut self) -> u128

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

fn get_u128_ne(&mut self) -> u128

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

fn get_i128(&mut self) -> i128

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

fn get_i128_le(&mut self) -> i128

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

fn get_i128_ne(&mut self) -> i128

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

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

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

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

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

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

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

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

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

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

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

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

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

fn get_f32(&mut self) -> f32

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

fn get_f32_le(&mut self) -> f32

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

fn get_f32_ne(&mut self) -> f32

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

fn get_f64(&mut self) -> f64

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

fn get_f64_le(&mut self) -> f64

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

fn get_f64_ne(&mut self) -> f64

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

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

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

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

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

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

Creates an adaptor which implements the Read trait for self. Read more
source§

impl<T: Debug> Debug for Take<T>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for Take<T>where - T: RefUnwindSafe,

§

impl<T> Send for Take<T>where - T: Send,

§

impl<T> Sync for Take<T>where - T: Sync,

§

impl<T> Unpin for Take<T>where - T: Unpin,

§

impl<T> UnwindSafe for Take<T>where - T: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+non-continuous internal representation). Read more
source§

fn advance(&mut self, cnt: usize)

Advance the internal cursor of the Buf Read more
source§

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

Consumes len bytes inside self and returns new instance of Bytes +with this data. Read more
source§

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

Fills dst with potentially multiple slices starting at self’s +current position. Read more
source§

fn has_remaining(&self) -> bool

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

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

Copies bytes from self into dst. Read more
source§

fn get_u8(&mut self) -> u8

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

fn get_i8(&mut self) -> i8

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

fn get_u16(&mut self) -> u16

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

fn get_u16_le(&mut self) -> u16

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

fn get_u16_ne(&mut self) -> u16

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

fn get_i16(&mut self) -> i16

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

fn get_i16_le(&mut self) -> i16

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

fn get_i16_ne(&mut self) -> i16

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

fn get_u32(&mut self) -> u32

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

fn get_u32_le(&mut self) -> u32

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

fn get_u32_ne(&mut self) -> u32

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

fn get_i32(&mut self) -> i32

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

fn get_i32_le(&mut self) -> i32

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

fn get_i32_ne(&mut self) -> i32

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

fn get_u64(&mut self) -> u64

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

fn get_u64_le(&mut self) -> u64

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

fn get_u64_ne(&mut self) -> u64

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

fn get_i64(&mut self) -> i64

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

fn get_i64_le(&mut self) -> i64

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

fn get_i64_ne(&mut self) -> i64

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

fn get_u128(&mut self) -> u128

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

fn get_u128_le(&mut self) -> u128

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

fn get_u128_ne(&mut self) -> u128

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

fn get_i128(&mut self) -> i128

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

fn get_i128_le(&mut self) -> i128

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

fn get_i128_ne(&mut self) -> i128

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

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

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

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

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

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

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

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

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

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

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

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

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

fn get_f32(&mut self) -> f32

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

fn get_f32_le(&mut self) -> f32

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

fn get_f32_ne(&mut self) -> f32

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

fn get_f64(&mut self) -> f64

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

fn get_f64_le(&mut self) -> f64

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

fn get_f64_ne(&mut self) -> f64

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

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

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

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

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

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

Creates an adaptor which implements the Read trait for self. Read more
source§

impl<T: Debug> Debug for Take<T>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for Take<T>
where + T: RefUnwindSafe,

§

impl<T> Send for Take<T>
where + T: Send,

§

impl<T> Sync for Take<T>
where + T: Sync,

§

impl<T> Unpin for Take<T>
where + T: Unpin,

§

impl<T> UnwindSafe for Take<T>
where + T: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/bytes/buf/struct.UninitSlice.html b/bytes/buf/struct.UninitSlice.html index 5570e49e4..e6f2771d7 100644 --- a/bytes/buf/struct.UninitSlice.html +++ b/bytes/buf/struct.UninitSlice.html @@ -1,4 +1,5 @@ -UninitSlice in bytes::buf - Rust

Struct bytes::buf::UninitSlice

source ·
pub struct UninitSlice(/* private fields */);
Expand description

Uninitialized byte slice.

+UninitSlice in bytes::buf - Rust +

Struct bytes::buf::UninitSlice

source ·
pub struct UninitSlice(/* private fields */);
Expand description

Uninitialized byte slice.

Returned by BufMut::chunk_mut(), the referenced byte slice may be uninitialized. The wrapper provides safe access without introducing undefined behavior.

@@ -10,13 +11,13 @@

The difference between &mut UninitSlice and &mut [MaybeUninit<u8>] is that it is possible in safe code to write uninitialized bytes to an &mut [MaybeUninit<u8>], which this type prohibits.

-

Implementations§

source§

impl UninitSlice

source

pub fn new(slice: &mut [u8]) -> &mut UninitSlice

Creates a &mut UninitSlice wrapping a slice of initialised memory.

+

Implementations§

source§

impl UninitSlice

source

pub fn new(slice: &mut [u8]) -> &mut UninitSlice

Creates a &mut UninitSlice wrapping a slice of initialised memory.

Examples
use bytes::buf::UninitSlice;
 
 let mut buffer = [0u8; 64];
 let slice = UninitSlice::new(&mut buffer[..]);
-
source

pub fn uninit(slice: &mut [MaybeUninit<u8>]) -> &mut UninitSlice

Creates a &mut UninitSlice wrapping a slice of uninitialised memory.

+
source

pub fn uninit(slice: &mut [MaybeUninit<u8>]) -> &mut UninitSlice

Creates a &mut UninitSlice wrapping a slice of uninitialised memory.

Examples
use bytes::buf::UninitSlice;
 use core::mem::MaybeUninit;
@@ -27,8 +28,8 @@ 
Examples
let mut vec = Vec::with_capacity(1024); let spare: &mut UninitSlice = vec.spare_capacity_mut().into();
source

pub unsafe fn from_raw_parts_mut<'a>( - ptr: *mut u8, - len: usize + ptr: *mut u8, + len: usize ) -> &'a mut UninitSlice

Create a &mut UninitSlice from a pointer and a length.

Safety

The caller must ensure that ptr references a valid memory region owned @@ -36,37 +37,37 @@

Safety
Examples
use bytes::buf::UninitSlice;
 
-let bytes = b"hello world".to_vec();
+let bytes = b"hello world".to_vec();
 let ptr = bytes.as_ptr() as *mut _;
 let len = bytes.len();
 
 let slice = unsafe { UninitSlice::from_raw_parts_mut(ptr, len) };
-
source

pub fn write_byte(&mut self, index: usize, byte: u8)

Write a single byte at the specified offset.

+
source

pub fn write_byte(&mut self, index: usize, byte: u8)

Write a single byte at the specified offset.

Panics

The function panics if index is out of bounds.

Examples
use bytes::buf::UninitSlice;
 
-let mut data = [b'f', b'o', b'o'];
+let mut data = [b'f', b'o', b'o'];
 let slice = unsafe { UninitSlice::from_raw_parts_mut(data.as_mut_ptr(), 3) };
 
-slice.write_byte(0, b'b');
+slice.write_byte(0, b'b');
 
-assert_eq!(b"boo", &data[..]);
-
source

pub fn copy_from_slice(&mut self, src: &[u8])

Copies bytes from src into self.

+assert_eq!(b"boo", &data[..]);
+
source

pub fn copy_from_slice(&mut self, src: &[u8])

Copies bytes from src into self.

The length of src must be the same as self.

Panics

The function panics if src has a different length than self.

Examples
use bytes::buf::UninitSlice;
 
-let mut data = [b'f', b'o', b'o'];
+let mut data = [b'f', b'o', b'o'];
 let slice = unsafe { UninitSlice::from_raw_parts_mut(data.as_mut_ptr(), 3) };
 
-slice.copy_from_slice(b"bar");
+slice.copy_from_slice(b"bar");
 
-assert_eq!(b"bar", &data[..]);
-
source

pub fn as_mut_ptr(&mut self) -> *mut u8

Return a raw pointer to the slice’s buffer.

+assert_eq!(b"bar", &data[..]);
+
source

pub fn as_mut_ptr(&mut self) -> *mut u8

Return a raw pointer to the slice’s buffer.

Safety

The caller must not read from the referenced memory and must not write uninitialized bytes to the slice either.

@@ -76,7 +77,7 @@
Examples
let mut data = [0, 1, 2]; let mut slice = &mut data[..]; let ptr = BufMut::chunk_mut(&mut slice).as_mut_ptr();
-
source

pub unsafe fn as_uninit_slice_mut<'a>(&'a mut self) -> &'a mut [MaybeUninit<u8>]

Return a &mut [MaybeUninit<u8>] to this slice’s buffer.

+
source

pub unsafe fn as_uninit_slice_mut<'a>(&'a mut self) -> &'a mut [MaybeUninit<u8>]

Return a &mut [MaybeUninit<u8>] to this slice’s buffer.

Safety

The caller must not read from the referenced memory and must not write uninitialized bytes to the slice either. This is because BufMut implementation @@ -91,7 +92,7 @@

Examples
unsafe { let uninit_slice = BufMut::chunk_mut(&mut slice).as_uninit_slice_mut(); };
-
source

pub fn len(&self) -> usize

Returns the number of bytes in the slice.

+
source

pub fn len(&self) -> usize

Returns the number of bytes in the slice.

Examples
use bytes::BufMut;
 
@@ -100,7 +101,7 @@ 
Examples
let len = BufMut::chunk_mut(&mut slice).len(); assert_eq!(len, 3);
-

Trait Implementations§

source§

impl Debug for UninitSlice

source§

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

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

impl<'a> From<&'a mut [MaybeUninit<u8>]> for &'a mut UninitSlice

source§

fn from(slice: &'a mut [MaybeUninit<u8>]) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a mut [u8]> for &'a mut UninitSlice

source§

fn from(slice: &'a mut [u8]) -> Self

Converts to this type from the input type.
source§

impl Index<Range<usize>> for UninitSlice

§

type Output = UninitSlice

The returned type after indexing.
source§

fn index(&self, index: Range<usize>) -> &UninitSlice

Performs the indexing (container[index]) operation. Read more
source§

impl Index<RangeFrom<usize>> for UninitSlice

§

type Output = UninitSlice

The returned type after indexing.
source§

fn index(&self, index: RangeFrom<usize>) -> &UninitSlice

Performs the indexing (container[index]) operation. Read more
source§

impl Index<RangeFull> for UninitSlice

§

type Output = UninitSlice

The returned type after indexing.
source§

fn index(&self, index: RangeFull) -> &UninitSlice

Performs the indexing (container[index]) operation. Read more
source§

impl Index<RangeInclusive<usize>> for UninitSlice

§

type Output = UninitSlice

The returned type after indexing.
source§

fn index(&self, index: RangeInclusive<usize>) -> &UninitSlice

Performs the indexing (container[index]) operation. Read more
source§

impl Index<RangeTo<usize>> for UninitSlice

§

type Output = UninitSlice

The returned type after indexing.
source§

fn index(&self, index: RangeTo<usize>) -> &UninitSlice

Performs the indexing (container[index]) operation. Read more
source§

impl Index<RangeToInclusive<usize>> for UninitSlice

§

type Output = UninitSlice

The returned type after indexing.
source§

fn index(&self, index: RangeToInclusive<usize>) -> &UninitSlice

Performs the indexing (container[index]) operation. Read more
source§

impl IndexMut<Range<usize>> for UninitSlice

source§

fn index_mut(&mut self, index: Range<usize>) -> &mut UninitSlice

Performs the mutable indexing (container[index]) operation. Read more
source§

impl IndexMut<RangeFrom<usize>> for UninitSlice

source§

fn index_mut(&mut self, index: RangeFrom<usize>) -> &mut UninitSlice

Performs the mutable indexing (container[index]) operation. Read more
source§

impl IndexMut<RangeFull> for UninitSlice

source§

fn index_mut(&mut self, index: RangeFull) -> &mut UninitSlice

Performs the mutable indexing (container[index]) operation. Read more
source§

impl IndexMut<RangeInclusive<usize>> for UninitSlice

source§

fn index_mut(&mut self, index: RangeInclusive<usize>) -> &mut UninitSlice

Performs the mutable indexing (container[index]) operation. Read more
source§

impl IndexMut<RangeTo<usize>> for UninitSlice

source§

fn index_mut(&mut self, index: RangeTo<usize>) -> &mut UninitSlice

Performs the mutable indexing (container[index]) operation. Read more
source§

impl IndexMut<RangeToInclusive<usize>> for UninitSlice

source§

fn index_mut(&mut self, index: RangeToInclusive<usize>) -> &mut UninitSlice

Performs the mutable indexing (container[index]) operation. Read more

Auto Trait Implementations§

§

impl RefUnwindSafe for UninitSlice

§

impl Send for UninitSlice

§

impl !Sized for UninitSlice

§

impl Sync for UninitSlice

§

impl Unpin for UninitSlice

§

impl UnwindSafe for UninitSlice

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
\ No newline at end of file +

Trait Implementations§

source§

impl Debug for UninitSlice

source§

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

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

impl<'a> From<&'a mut [MaybeUninit<u8>]> for &'a mut UninitSlice

source§

fn from(slice: &'a mut [MaybeUninit<u8>]) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a mut [u8]> for &'a mut UninitSlice

source§

fn from(slice: &'a mut [u8]) -> Self

Converts to this type from the input type.
source§

impl Index<Range<usize>> for UninitSlice

§

type Output = UninitSlice

The returned type after indexing.
source§

fn index(&self, index: Range<usize>) -> &UninitSlice

Performs the indexing (container[index]) operation. Read more
source§

impl Index<RangeFrom<usize>> for UninitSlice

§

type Output = UninitSlice

The returned type after indexing.
source§

fn index(&self, index: RangeFrom<usize>) -> &UninitSlice

Performs the indexing (container[index]) operation. Read more
source§

impl Index<RangeFull> for UninitSlice

§

type Output = UninitSlice

The returned type after indexing.
source§

fn index(&self, index: RangeFull) -> &UninitSlice

Performs the indexing (container[index]) operation. Read more
source§

impl Index<RangeInclusive<usize>> for UninitSlice

§

type Output = UninitSlice

The returned type after indexing.
source§

fn index(&self, index: RangeInclusive<usize>) -> &UninitSlice

Performs the indexing (container[index]) operation. Read more
source§

impl Index<RangeTo<usize>> for UninitSlice

§

type Output = UninitSlice

The returned type after indexing.
source§

fn index(&self, index: RangeTo<usize>) -> &UninitSlice

Performs the indexing (container[index]) operation. Read more
source§

impl Index<RangeToInclusive<usize>> for UninitSlice

§

type Output = UninitSlice

The returned type after indexing.
source§

fn index(&self, index: RangeToInclusive<usize>) -> &UninitSlice

Performs the indexing (container[index]) operation. Read more
source§

impl IndexMut<Range<usize>> for UninitSlice

source§

fn index_mut(&mut self, index: Range<usize>) -> &mut UninitSlice

Performs the mutable indexing (container[index]) operation. Read more
source§

impl IndexMut<RangeFrom<usize>> for UninitSlice

source§

fn index_mut(&mut self, index: RangeFrom<usize>) -> &mut UninitSlice

Performs the mutable indexing (container[index]) operation. Read more
source§

impl IndexMut<RangeFull> for UninitSlice

source§

fn index_mut(&mut self, index: RangeFull) -> &mut UninitSlice

Performs the mutable indexing (container[index]) operation. Read more
source§

impl IndexMut<RangeInclusive<usize>> for UninitSlice

source§

fn index_mut(&mut self, index: RangeInclusive<usize>) -> &mut UninitSlice

Performs the mutable indexing (container[index]) operation. Read more
source§

impl IndexMut<RangeTo<usize>> for UninitSlice

source§

fn index_mut(&mut self, index: RangeTo<usize>) -> &mut UninitSlice

Performs the mutable indexing (container[index]) operation. Read more
source§

impl IndexMut<RangeToInclusive<usize>> for UninitSlice

source§

fn index_mut(&mut self, index: RangeToInclusive<usize>) -> &mut UninitSlice

Performs the mutable indexing (container[index]) operation. Read more

Auto Trait Implementations§

§

impl RefUnwindSafe for UninitSlice

§

impl Send for UninitSlice

§

impl !Sized for UninitSlice

§

impl Sync for UninitSlice

§

impl Unpin for UninitSlice

§

impl UnwindSafe for UninitSlice

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
\ No newline at end of file diff --git a/bytes/buf/struct.Writer.html b/bytes/buf/struct.Writer.html index c7c87a37e..9e7db6302 100644 --- a/bytes/buf/struct.Writer.html +++ b/bytes/buf/struct.Writer.html @@ -1,8 +1,9 @@ -Writer in bytes::buf - Rust

Struct bytes::buf::Writer

source ·
pub struct Writer<B> { /* private fields */ }
Expand description

A BufMut adapter which implements io::Write for the inner value.

+Writer in bytes::buf - Rust +

Struct bytes::buf::Writer

source ·
pub struct Writer<B> { /* private fields */ }
Expand description

A BufMut adapter which implements io::Write for the inner value.

This struct is generally created by calling writer() on BufMut. See documentation of writer() for more details.

-

Implementations§

source§

impl<B: BufMut> Writer<B>

source

pub fn get_ref(&self) -> &B

Gets a reference to the underlying BufMut.

+

Implementations§

source§

impl<B: BufMut> Writer<B>

source

pub fn get_ref(&self) -> &B

Gets a reference to the underlying BufMut.

It is inadvisable to directly write to the underlying BufMut.

Examples
use bytes::BufMut;
@@ -10,7 +11,7 @@ 
Examples
let buf = Vec::with_capacity(1024).writer(); assert_eq!(1024, buf.get_ref().capacity());
-
source

pub fn get_mut(&mut self) -> &mut B

Gets a mutable reference to the underlying BufMut.

+
source

pub fn get_mut(&mut self) -> &mut B

Gets a mutable reference to the underlying BufMut.

It is inadvisable to directly write to the underlying BufMut.

Examples
use bytes::BufMut;
@@ -26,29 +27,29 @@ 
Examples
use std::io; let mut buf = vec![].writer(); -let mut src = &b"hello world"[..]; +let mut src = &b"hello world"[..]; io::copy(&mut src, &mut buf).unwrap(); let buf = buf.into_inner(); -assert_eq!(*buf, b"hello world"[..]);
-

Trait Implementations§

source§

impl<B: Debug> Debug for Writer<B>

source§

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

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

impl<B: BufMut + Sized> Write for Writer<B>

source§

fn write(&mut self, src: &[u8]) -> Result<usize>

Write a buffer into this writer, returning how many bytes were written. Read more
source§

fn flush(&mut self) -> Result<()>

Flush this output stream, ensuring that all intermediately buffered -contents reach their destination. Read more
1.36.0 · source§

fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Error>

Like write, except that it writes from a slice of buffers. Read more
source§

fn is_write_vectored(&self) -> bool

🔬This is a nightly-only experimental API. (can_vector)
Determines if this Writer has an efficient write_vectored -implementation. Read more
1.0.0 · source§

fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>

Attempts to write an entire buffer into this writer. Read more
source§

fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>

🔬This is a nightly-only experimental API. (write_all_vectored)
Attempts to write multiple buffers into this writer. Read more
1.0.0 · source§

fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<(), Error>

Writes a formatted string into this writer, returning any error -encountered. Read more
1.0.0 · source§

fn by_ref(&mut self) -> &mut Selfwhere - Self: Sized,

Creates a “by reference” adapter for this instance of Write. Read more

Auto Trait Implementations§

§

impl<B> RefUnwindSafe for Writer<B>where - B: RefUnwindSafe,

§

impl<B> Send for Writer<B>where - B: Send,

§

impl<B> Sync for Writer<B>where - B: Sync,

§

impl<B> Unpin for Writer<B>where - B: Unpin,

§

impl<B> UnwindSafe for Writer<B>where - B: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+assert_eq!(*buf, b"hello world"[..]);
+

Trait Implementations§

source§

impl<B: Debug> Debug for Writer<B>

source§

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

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

impl<B: BufMut + Sized> Write for Writer<B>

source§

fn write(&mut self, src: &[u8]) -> Result<usize>

Write a buffer into this writer, returning how many bytes were written. Read more
source§

fn flush(&mut self) -> Result<()>

Flush this output stream, ensuring that all intermediately buffered +contents reach their destination. Read more
1.36.0 · source§

fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Error>

Like write, except that it writes from a slice of buffers. Read more
source§

fn is_write_vectored(&self) -> bool

🔬This is a nightly-only experimental API. (can_vector)
Determines if this Writer has an efficient write_vectored +implementation. Read more
1.0.0 · source§

fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>

Attempts to write an entire buffer into this writer. Read more
source§

fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>

🔬This is a nightly-only experimental API. (write_all_vectored)
Attempts to write multiple buffers into this writer. Read more
1.0.0 · source§

fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<(), Error>

Writes a formatted string into this writer, returning any error +encountered. Read more
1.0.0 · source§

fn by_ref(&mut self) -> &mut Self
where + Self: Sized,

Creates a “by reference” adapter for this instance of Write. Read more

Auto Trait Implementations§

§

impl<B> RefUnwindSafe for Writer<B>
where + B: RefUnwindSafe,

§

impl<B> Send for Writer<B>
where + B: Send,

§

impl<B> Sync for Writer<B>
where + B: Sync,

§

impl<B> Unpin for Writer<B>
where + B: Unpin,

§

impl<B> UnwindSafe for Writer<B>
where + B: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/bytes/buf/trait.Buf.html b/bytes/buf/trait.Buf.html index 052491550..f4ab32860 100644 --- a/bytes/buf/trait.Buf.html +++ b/bytes/buf/trait.Buf.html @@ -1,58 +1,59 @@ -Buf in bytes::buf - Rust

Trait bytes::buf::Buf

source ·
pub trait Buf {
+Buf in bytes::buf - Rust
+    

Trait bytes::buf::Buf

source ·
pub trait Buf {
 
Show 48 methods // Required methods - fn remaining(&self) -> usize; - fn chunk(&self) -> &[u8] ; - fn advance(&mut self, cnt: usize); + fn remaining(&self) -> usize; + fn chunk(&self) -> &[u8] ; + fn advance(&mut self, cnt: usize); // Provided methods - fn chunks_vectored<'a>(&'a self, dst: &mut [IoSlice<'a>]) -> usize { ... } - fn has_remaining(&self) -> bool { ... } - fn copy_to_slice(&mut self, dst: &mut [u8]) { ... } - fn get_u8(&mut self) -> u8 { ... } - fn get_i8(&mut self) -> i8 { ... } - fn get_u16(&mut self) -> u16 { ... } - fn get_u16_le(&mut self) -> u16 { ... } - fn get_u16_ne(&mut self) -> u16 { ... } - fn get_i16(&mut self) -> i16 { ... } - fn get_i16_le(&mut self) -> i16 { ... } - fn get_i16_ne(&mut self) -> i16 { ... } - fn get_u32(&mut self) -> u32 { ... } - fn get_u32_le(&mut self) -> u32 { ... } - fn get_u32_ne(&mut self) -> u32 { ... } - fn get_i32(&mut self) -> i32 { ... } - fn get_i32_le(&mut self) -> i32 { ... } - fn get_i32_ne(&mut self) -> i32 { ... } - fn get_u64(&mut self) -> u64 { ... } - fn get_u64_le(&mut self) -> u64 { ... } - fn get_u64_ne(&mut self) -> u64 { ... } - fn get_i64(&mut self) -> i64 { ... } - fn get_i64_le(&mut self) -> i64 { ... } - fn get_i64_ne(&mut self) -> i64 { ... } - fn get_u128(&mut self) -> u128 { ... } - fn get_u128_le(&mut self) -> u128 { ... } - fn get_u128_ne(&mut self) -> u128 { ... } - fn get_i128(&mut self) -> i128 { ... } - fn get_i128_le(&mut self) -> i128 { ... } - fn get_i128_ne(&mut self) -> i128 { ... } - fn get_uint(&mut self, nbytes: usize) -> u64 { ... } - fn get_uint_le(&mut self, nbytes: usize) -> u64 { ... } - fn get_uint_ne(&mut self, nbytes: usize) -> u64 { ... } - fn get_int(&mut self, nbytes: usize) -> i64 { ... } - fn get_int_le(&mut self, nbytes: usize) -> i64 { ... } - fn get_int_ne(&mut self, nbytes: usize) -> i64 { ... } - fn get_f32(&mut self) -> f32 { ... } - fn get_f32_le(&mut self) -> f32 { ... } - fn get_f32_ne(&mut self) -> f32 { ... } - fn get_f64(&mut self) -> f64 { ... } - fn get_f64_le(&mut self) -> f64 { ... } - fn get_f64_ne(&mut self) -> f64 { ... } - fn copy_to_bytes(&mut self, len: usize) -> Bytes { ... } - fn take(self, limit: usize) -> Take<Self> - where Self: Sized { ... } + fn chunks_vectored<'a>(&'a self, dst: &mut [IoSlice<'a>]) -> usize { ... } + fn has_remaining(&self) -> bool { ... } + fn copy_to_slice(&mut self, dst: &mut [u8]) { ... } + fn get_u8(&mut self) -> u8 { ... } + fn get_i8(&mut self) -> i8 { ... } + fn get_u16(&mut self) -> u16 { ... } + fn get_u16_le(&mut self) -> u16 { ... } + fn get_u16_ne(&mut self) -> u16 { ... } + fn get_i16(&mut self) -> i16 { ... } + fn get_i16_le(&mut self) -> i16 { ... } + fn get_i16_ne(&mut self) -> i16 { ... } + fn get_u32(&mut self) -> u32 { ... } + fn get_u32_le(&mut self) -> u32 { ... } + fn get_u32_ne(&mut self) -> u32 { ... } + fn get_i32(&mut self) -> i32 { ... } + fn get_i32_le(&mut self) -> i32 { ... } + fn get_i32_ne(&mut self) -> i32 { ... } + fn get_u64(&mut self) -> u64 { ... } + fn get_u64_le(&mut self) -> u64 { ... } + fn get_u64_ne(&mut self) -> u64 { ... } + fn get_i64(&mut self) -> i64 { ... } + fn get_i64_le(&mut self) -> i64 { ... } + fn get_i64_ne(&mut self) -> i64 { ... } + fn get_u128(&mut self) -> u128 { ... } + fn get_u128_le(&mut self) -> u128 { ... } + fn get_u128_ne(&mut self) -> u128 { ... } + fn get_i128(&mut self) -> i128 { ... } + fn get_i128_le(&mut self) -> i128 { ... } + fn get_i128_ne(&mut self) -> i128 { ... } + fn get_uint(&mut self, nbytes: usize) -> u64 { ... } + fn get_uint_le(&mut self, nbytes: usize) -> u64 { ... } + fn get_uint_ne(&mut self, nbytes: usize) -> u64 { ... } + fn get_int(&mut self, nbytes: usize) -> i64 { ... } + fn get_int_le(&mut self, nbytes: usize) -> i64 { ... } + fn get_int_ne(&mut self, nbytes: usize) -> i64 { ... } + fn get_f32(&mut self) -> f32 { ... } + fn get_f32_le(&mut self) -> f32 { ... } + fn get_f32_ne(&mut self) -> f32 { ... } + fn get_f64(&mut self) -> f64 { ... } + fn get_f64_le(&mut self) -> f64 { ... } + fn get_f64_ne(&mut self) -> f64 { ... } + fn copy_to_bytes(&mut self, len: usize) -> Bytes { ... } + fn take(self, limit: usize) -> Take<Self> + where Self: Sized { ... } fn chain<U: Buf>(self, next: U) -> Chain<Self, U> - where Self: Sized { ... } + where Self: Sized { ... } fn reader(self) -> Reader<Self> - where Self: Sized { ... } + where Self: Sized { ... }
}
Expand description

Read bytes from a buffer.

A buffer stores bytes in memory such that read operations are infallible. The underlying storage may or may not be in contiguous memory. A Buf value @@ -63,24 +64,24 @@

use bytes::Buf;
 
-let mut buf = &b"hello world"[..];
+let mut buf = &b"hello world"[..];
 
-assert_eq!(b'h', buf.get_u8());
-assert_eq!(b'e', buf.get_u8());
-assert_eq!(b'l', buf.get_u8());
+assert_eq!(b'h', buf.get_u8());
+assert_eq!(b'e', buf.get_u8());
+assert_eq!(b'l', buf.get_u8());
 
 let mut rest = [0; 8];
 buf.copy_to_slice(&mut rest);
 
-assert_eq!(&rest[..], &b"lo world"[..]);
-

Required Methods§

source

fn remaining(&self) -> usize

Returns the number of bytes between the current position and the end of +assert_eq!(&rest[..], &b"lo world"[..]);

+

Required Methods§

source

fn remaining(&self) -> usize

Returns the number of bytes between the current position and the end of the buffer.

This value is greater than or equal to the length of the slice returned by chunk().

Examples
use bytes::Buf;
 
-let mut buf = &b"hello world"[..];
+let mut buf = &b"hello world"[..];
 
 assert_eq!(buf.remaining(), 11);
 
@@ -91,7 +92,7 @@ 
Implementer notesImplementations of remaining should ensure that the return value does not change unless a call is made to advance or any other function that is documented to change the Buf’s current position.

-
source

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

Returns a slice starting at the current position and of length between 0 +

source

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

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

This is a lower level function. Most operations are done with other @@ -99,37 +100,37 @@

Implementer notesExamples
use bytes::Buf;
 
-let mut buf = &b"hello world"[..];
+let mut buf = &b"hello world"[..];
 
-assert_eq!(buf.chunk(), &b"hello world"[..]);
+assert_eq!(buf.chunk(), &b"hello world"[..]);
 
 buf.advance(6);
 
-assert_eq!(buf.chunk(), &b"world"[..]);
+assert_eq!(buf.chunk(), &b"world"[..]);
Implementer notes

This function should never panic. Once the end of the buffer is reached, i.e., Buf::remaining returns 0, calls to chunk() should return an empty slice.

-
source

fn advance(&mut self, cnt: usize)

Advance the internal cursor of the Buf

+
source

fn advance(&mut self, cnt: usize)

Advance the internal cursor of the Buf

The next call to chunk() will return a slice starting cnt bytes further into the underlying buffer.

Examples
use bytes::Buf;
 
-let mut buf = &b"hello world"[..];
+let mut buf = &b"hello world"[..];
 
-assert_eq!(buf.chunk(), &b"hello world"[..]);
+assert_eq!(buf.chunk(), &b"hello world"[..]);
 
 buf.advance(6);
 
-assert_eq!(buf.chunk(), &b"world"[..]);
+assert_eq!(buf.chunk(), &b"world"[..]);
Panics

This function may panic if cnt > self.remaining().

Implementer notes

It is recommended for implementations of advance to panic if cnt > self.remaining(). If the implementation does not panic, the call must behave as if cnt == self.remaining().

A call with cnt == 0 should never panic and be a no-op.

-

Provided Methods§

source

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

Fills dst with potentially multiple slices starting at self’s +

Provided Methods§

source

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

Fills dst with potentially multiple slices starting at self’s current position.

If the Buf is backed by disjoint slices of bytes, chunk_vectored enables fetching more than one slice at once. dst is a slice of IoSlice @@ -148,417 +149,417 @@

Implementer notesdst.

Implementations should also take care to properly handle being called with dst being a zero length slice.

-
source

fn has_remaining(&self) -> bool

Returns true if there are any more bytes to consume

+
source

fn has_remaining(&self) -> bool

Returns true if there are any more bytes to consume

This is equivalent to self.remaining() != 0.

Examples
use bytes::Buf;
 
-let mut buf = &b"a"[..];
+let mut buf = &b"a"[..];
 
 assert!(buf.has_remaining());
 
 buf.get_u8();
 
 assert!(!buf.has_remaining());
-
source

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

Copies bytes from self into dst.

+
source

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

Copies bytes from self into dst.

The cursor is advanced by the number of bytes copied. self must have enough remaining bytes to fill dst.

Examples
use bytes::Buf;
 
-let mut buf = &b"hello world"[..];
+let mut buf = &b"hello world"[..];
 let mut dst = [0; 5];
 
 buf.copy_to_slice(&mut dst);
-assert_eq!(&b"hello"[..], &dst);
+assert_eq!(&b"hello"[..], &dst);
 assert_eq!(6, buf.remaining());
Panics

This function panics if self.remaining() < dst.len()

-
source

fn get_u8(&mut self) -> u8

Gets an unsigned 8 bit integer from self.

+
source

fn get_u8(&mut self) -> u8

Gets an unsigned 8 bit integer from self.

The current position is advanced by 1.

Examples
use bytes::Buf;
 
-let mut buf = &b"\x08 hello"[..];
+let mut buf = &b"\x08 hello"[..];
 assert_eq!(8, buf.get_u8());
Panics

This function panics if there is no more remaining data in self.

-
source

fn get_i8(&mut self) -> i8

Gets a signed 8 bit integer from self.

+
source

fn get_i8(&mut self) -> i8

Gets a signed 8 bit integer from self.

The current position is advanced by 1.

Examples
use bytes::Buf;
 
-let mut buf = &b"\x08 hello"[..];
+let mut buf = &b"\x08 hello"[..];
 assert_eq!(8, buf.get_i8());
Panics

This function panics if there is no more remaining data in self.

-
source

fn get_u16(&mut self) -> u16

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

+
source

fn get_u16(&mut self) -> u16

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

The current position is advanced by 2.

Examples
use bytes::Buf;
 
-let mut buf = &b"\x08\x09 hello"[..];
+let mut buf = &b"\x08\x09 hello"[..];
 assert_eq!(0x0809, buf.get_u16());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_u16_le(&mut self) -> u16

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

+
source

fn get_u16_le(&mut self) -> u16

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

The current position is advanced by 2.

Examples
use bytes::Buf;
 
-let mut buf = &b"\x09\x08 hello"[..];
+let mut buf = &b"\x09\x08 hello"[..];
 assert_eq!(0x0809, buf.get_u16_le());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_u16_ne(&mut self) -> u16

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

+
source

fn get_u16_ne(&mut self) -> u16

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

The current position is advanced by 2.

Examples
use bytes::Buf;
 
-let mut buf: &[u8] = match cfg!(target_endian = "big") {
-    true => b"\x08\x09 hello",
-    false => b"\x09\x08 hello",
+let mut buf: &[u8] = match cfg!(target_endian = "big") {
+    true => b"\x08\x09 hello",
+    false => b"\x09\x08 hello",
 };
 assert_eq!(0x0809, buf.get_u16_ne());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_i16(&mut self) -> i16

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

+
source

fn get_i16(&mut self) -> i16

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

The current position is advanced by 2.

Examples
use bytes::Buf;
 
-let mut buf = &b"\x08\x09 hello"[..];
+let mut buf = &b"\x08\x09 hello"[..];
 assert_eq!(0x0809, buf.get_i16());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_i16_le(&mut self) -> i16

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

+
source

fn get_i16_le(&mut self) -> i16

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

The current position is advanced by 2.

Examples
use bytes::Buf;
 
-let mut buf = &b"\x09\x08 hello"[..];
+let mut buf = &b"\x09\x08 hello"[..];
 assert_eq!(0x0809, buf.get_i16_le());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_i16_ne(&mut self) -> i16

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

+
source

fn get_i16_ne(&mut self) -> i16

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

The current position is advanced by 2.

Examples
use bytes::Buf;
 
-let mut buf: &[u8] = match cfg!(target_endian = "big") {
-    true => b"\x08\x09 hello",
-    false => b"\x09\x08 hello",
+let mut buf: &[u8] = match cfg!(target_endian = "big") {
+    true => b"\x08\x09 hello",
+    false => b"\x09\x08 hello",
 };
 assert_eq!(0x0809, buf.get_i16_ne());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_u32(&mut self) -> u32

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

+
source

fn get_u32(&mut self) -> u32

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

The current position is advanced by 4.

Examples
use bytes::Buf;
 
-let mut buf = &b"\x08\x09\xA0\xA1 hello"[..];
+let mut buf = &b"\x08\x09\xA0\xA1 hello"[..];
 assert_eq!(0x0809A0A1, buf.get_u32());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_u32_le(&mut self) -> u32

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

+
source

fn get_u32_le(&mut self) -> u32

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

The current position is advanced by 4.

Examples
use bytes::Buf;
 
-let mut buf = &b"\xA1\xA0\x09\x08 hello"[..];
+let mut buf = &b"\xA1\xA0\x09\x08 hello"[..];
 assert_eq!(0x0809A0A1, buf.get_u32_le());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_u32_ne(&mut self) -> u32

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

+
source

fn get_u32_ne(&mut self) -> u32

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

The current position is advanced by 4.

Examples
use bytes::Buf;
 
-let mut buf: &[u8] = match cfg!(target_endian = "big") {
-    true => b"\x08\x09\xA0\xA1 hello",
-    false => b"\xA1\xA0\x09\x08 hello",
+let mut buf: &[u8] = match cfg!(target_endian = "big") {
+    true => b"\x08\x09\xA0\xA1 hello",
+    false => b"\xA1\xA0\x09\x08 hello",
 };
 assert_eq!(0x0809A0A1, buf.get_u32_ne());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_i32(&mut self) -> i32

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

+
source

fn get_i32(&mut self) -> i32

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

The current position is advanced by 4.

Examples
use bytes::Buf;
 
-let mut buf = &b"\x08\x09\xA0\xA1 hello"[..];
+let mut buf = &b"\x08\x09\xA0\xA1 hello"[..];
 assert_eq!(0x0809A0A1, buf.get_i32());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_i32_le(&mut self) -> i32

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

+
source

fn get_i32_le(&mut self) -> i32

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

The current position is advanced by 4.

Examples
use bytes::Buf;
 
-let mut buf = &b"\xA1\xA0\x09\x08 hello"[..];
+let mut buf = &b"\xA1\xA0\x09\x08 hello"[..];
 assert_eq!(0x0809A0A1, buf.get_i32_le());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_i32_ne(&mut self) -> i32

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

+
source

fn get_i32_ne(&mut self) -> i32

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

The current position is advanced by 4.

Examples
use bytes::Buf;
 
-let mut buf: &[u8] = match cfg!(target_endian = "big") {
-    true => b"\x08\x09\xA0\xA1 hello",
-    false => b"\xA1\xA0\x09\x08 hello",
+let mut buf: &[u8] = match cfg!(target_endian = "big") {
+    true => b"\x08\x09\xA0\xA1 hello",
+    false => b"\xA1\xA0\x09\x08 hello",
 };
 assert_eq!(0x0809A0A1, buf.get_i32_ne());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_u64(&mut self) -> u64

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

+
source

fn get_u64(&mut self) -> u64

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

The current position is advanced by 8.

Examples
use bytes::Buf;
 
-let mut buf = &b"\x01\x02\x03\x04\x05\x06\x07\x08 hello"[..];
+let mut buf = &b"\x01\x02\x03\x04\x05\x06\x07\x08 hello"[..];
 assert_eq!(0x0102030405060708, buf.get_u64());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_u64_le(&mut self) -> u64

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

+
source

fn get_u64_le(&mut self) -> u64

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

The current position is advanced by 8.

Examples
use bytes::Buf;
 
-let mut buf = &b"\x08\x07\x06\x05\x04\x03\x02\x01 hello"[..];
+let mut buf = &b"\x08\x07\x06\x05\x04\x03\x02\x01 hello"[..];
 assert_eq!(0x0102030405060708, buf.get_u64_le());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_u64_ne(&mut self) -> u64

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

+
source

fn get_u64_ne(&mut self) -> u64

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

The current position is advanced by 8.

Examples
use bytes::Buf;
 
-let mut buf: &[u8] = match cfg!(target_endian = "big") {
-    true => b"\x01\x02\x03\x04\x05\x06\x07\x08 hello",
-    false => b"\x08\x07\x06\x05\x04\x03\x02\x01 hello",
+let mut buf: &[u8] = match cfg!(target_endian = "big") {
+    true => b"\x01\x02\x03\x04\x05\x06\x07\x08 hello",
+    false => b"\x08\x07\x06\x05\x04\x03\x02\x01 hello",
 };
 assert_eq!(0x0102030405060708, buf.get_u64_ne());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_i64(&mut self) -> i64

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

+
source

fn get_i64(&mut self) -> i64

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

The current position is advanced by 8.

Examples
use bytes::Buf;
 
-let mut buf = &b"\x01\x02\x03\x04\x05\x06\x07\x08 hello"[..];
+let mut buf = &b"\x01\x02\x03\x04\x05\x06\x07\x08 hello"[..];
 assert_eq!(0x0102030405060708, buf.get_i64());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_i64_le(&mut self) -> i64

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

+
source

fn get_i64_le(&mut self) -> i64

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

The current position is advanced by 8.

Examples
use bytes::Buf;
 
-let mut buf = &b"\x08\x07\x06\x05\x04\x03\x02\x01 hello"[..];
+let mut buf = &b"\x08\x07\x06\x05\x04\x03\x02\x01 hello"[..];
 assert_eq!(0x0102030405060708, buf.get_i64_le());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_i64_ne(&mut self) -> i64

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

+
source

fn get_i64_ne(&mut self) -> i64

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

The current position is advanced by 8.

Examples
use bytes::Buf;
 
-let mut buf: &[u8] = match cfg!(target_endian = "big") {
-    true => b"\x01\x02\x03\x04\x05\x06\x07\x08 hello",
-    false => b"\x08\x07\x06\x05\x04\x03\x02\x01 hello",
+let mut buf: &[u8] = match cfg!(target_endian = "big") {
+    true => b"\x01\x02\x03\x04\x05\x06\x07\x08 hello",
+    false => b"\x08\x07\x06\x05\x04\x03\x02\x01 hello",
 };
 assert_eq!(0x0102030405060708, buf.get_i64_ne());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_u128(&mut self) -> u128

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

+
source

fn get_u128(&mut self) -> u128

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

The current position is advanced by 16.

Examples
use bytes::Buf;
 
-let mut buf = &b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello"[..];
+let mut buf = &b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello"[..];
 assert_eq!(0x01020304050607080910111213141516, buf.get_u128());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_u128_le(&mut self) -> u128

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

+
source

fn get_u128_le(&mut self) -> u128

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

The current position is advanced by 16.

Examples
use bytes::Buf;
 
-let mut buf = &b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello"[..];
+let mut buf = &b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello"[..];
 assert_eq!(0x01020304050607080910111213141516, buf.get_u128_le());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_u128_ne(&mut self) -> u128

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

+
source

fn get_u128_ne(&mut self) -> u128

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

The current position is advanced by 16.

Examples
use bytes::Buf;
 
-let mut buf: &[u8] = match cfg!(target_endian = "big") {
-    true => b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello",
-    false => b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello",
+let mut buf: &[u8] = match cfg!(target_endian = "big") {
+    true => b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello",
+    false => b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello",
 };
 assert_eq!(0x01020304050607080910111213141516, buf.get_u128_ne());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_i128(&mut self) -> i128

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

+
source

fn get_i128(&mut self) -> i128

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

The current position is advanced by 16.

Examples
use bytes::Buf;
 
-let mut buf = &b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello"[..];
+let mut buf = &b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello"[..];
 assert_eq!(0x01020304050607080910111213141516, buf.get_i128());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_i128_le(&mut self) -> i128

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

+
source

fn get_i128_le(&mut self) -> i128

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

The current position is advanced by 16.

Examples
use bytes::Buf;
 
-let mut buf = &b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello"[..];
+let mut buf = &b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello"[..];
 assert_eq!(0x01020304050607080910111213141516, buf.get_i128_le());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_i128_ne(&mut self) -> i128

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

+
source

fn get_i128_ne(&mut self) -> i128

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

The current position is advanced by 16.

Examples
use bytes::Buf;
 
-let mut buf: &[u8] = match cfg!(target_endian = "big") {
-    true => b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello",
-    false => b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello",
+let mut buf: &[u8] = match cfg!(target_endian = "big") {
+    true => b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello",
+    false => b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello",
 };
 assert_eq!(0x01020304050607080910111213141516, buf.get_i128_ne());
Panics

This function panics if there is not enough remaining data in self.

-
source

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

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

+
source

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

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

The current position is advanced by nbytes.

Examples
use bytes::Buf;
 
-let mut buf = &b"\x01\x02\x03 hello"[..];
+let mut buf = &b"\x01\x02\x03 hello"[..];
 assert_eq!(0x010203, buf.get_uint(3));
Panics

This function panics if there is not enough remaining data in self.

-
source

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

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

+
source

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

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

The current position is advanced by nbytes.

Examples
use bytes::Buf;
 
-let mut buf = &b"\x03\x02\x01 hello"[..];
+let mut buf = &b"\x03\x02\x01 hello"[..];
 assert_eq!(0x010203, buf.get_uint_le(3));
Panics

This function panics if there is not enough remaining data in self.

-
source

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

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

+
source

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

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

The current position is advanced by nbytes.

Examples
use bytes::Buf;
 
-let mut buf: &[u8] = match cfg!(target_endian = "big") {
-    true => b"\x01\x02\x03 hello",
-    false => b"\x03\x02\x01 hello",
+let mut buf: &[u8] = match cfg!(target_endian = "big") {
+    true => b"\x01\x02\x03 hello",
+    false => b"\x03\x02\x01 hello",
 };
 assert_eq!(0x010203, buf.get_uint_ne(3));
Panics

This function panics if there is not enough remaining data in self.

-
source

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

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

+
source

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

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

The current position is advanced by nbytes.

Examples
use bytes::Buf;
 
-let mut buf = &b"\x01\x02\x03 hello"[..];
+let mut buf = &b"\x01\x02\x03 hello"[..];
 assert_eq!(0x010203, buf.get_int(3));
Panics

This function panics if there is not enough remaining data in self.

-
source

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

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

+
source

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

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

The current position is advanced by nbytes.

Examples
use bytes::Buf;
 
-let mut buf = &b"\x03\x02\x01 hello"[..];
+let mut buf = &b"\x03\x02\x01 hello"[..];
 assert_eq!(0x010203, buf.get_int_le(3));
Panics

This function panics if there is not enough remaining data in self.

-
source

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

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

+
source

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

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

The current position is advanced by nbytes.

Examples
use bytes::Buf;
 
-let mut buf: &[u8] = match cfg!(target_endian = "big") {
-    true => b"\x01\x02\x03 hello",
-    false => b"\x03\x02\x01 hello",
+let mut buf: &[u8] = match cfg!(target_endian = "big") {
+    true => b"\x01\x02\x03 hello",
+    false => b"\x03\x02\x01 hello",
 };
 assert_eq!(0x010203, buf.get_int_ne(3));
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_f32(&mut self) -> f32

Gets an IEEE754 single-precision (4 bytes) floating point number from +

source

fn get_f32(&mut self) -> f32

Gets an IEEE754 single-precision (4 bytes) floating point number from self in big-endian byte order.

The current position is advanced by 4.

Examples
use bytes::Buf;
 
-let mut buf = &b"\x3F\x99\x99\x9A hello"[..];
+let mut buf = &b"\x3F\x99\x99\x9A hello"[..];
 assert_eq!(1.2f32, buf.get_f32());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_f32_le(&mut self) -> f32

Gets an IEEE754 single-precision (4 bytes) floating point number from +

source

fn get_f32_le(&mut self) -> f32

Gets an IEEE754 single-precision (4 bytes) floating point number from self in little-endian byte order.

The current position is advanced by 4.

Examples
use bytes::Buf;
 
-let mut buf = &b"\x9A\x99\x99\x3F hello"[..];
+let mut buf = &b"\x9A\x99\x99\x3F hello"[..];
 assert_eq!(1.2f32, buf.get_f32_le());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_f32_ne(&mut self) -> f32

Gets an IEEE754 single-precision (4 bytes) floating point number from +

source

fn get_f32_ne(&mut self) -> f32

Gets an IEEE754 single-precision (4 bytes) floating point number from self in native-endian byte order.

The current position is advanced by 4.

Examples
use bytes::Buf;
 
-let mut buf: &[u8] = match cfg!(target_endian = "big") {
-    true => b"\x3F\x99\x99\x9A hello",
-    false => b"\x9A\x99\x99\x3F hello",
+let mut buf: &[u8] = match cfg!(target_endian = "big") {
+    true => b"\x3F\x99\x99\x9A hello",
+    false => b"\x9A\x99\x99\x3F hello",
 };
 assert_eq!(1.2f32, buf.get_f32_ne());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_f64(&mut self) -> f64

Gets an IEEE754 double-precision (8 bytes) floating point number from +

source

fn get_f64(&mut self) -> f64

Gets an IEEE754 double-precision (8 bytes) floating point number from self in big-endian byte order.

The current position is advanced by 8.

Examples
use bytes::Buf;
 
-let mut buf = &b"\x3F\xF3\x33\x33\x33\x33\x33\x33 hello"[..];
+let mut buf = &b"\x3F\xF3\x33\x33\x33\x33\x33\x33 hello"[..];
 assert_eq!(1.2f64, buf.get_f64());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_f64_le(&mut self) -> f64

Gets an IEEE754 double-precision (8 bytes) floating point number from +

source

fn get_f64_le(&mut self) -> f64

Gets an IEEE754 double-precision (8 bytes) floating point number from self in little-endian byte order.

The current position is advanced by 8.

Examples
use bytes::Buf;
 
-let mut buf = &b"\x33\x33\x33\x33\x33\x33\xF3\x3F hello"[..];
+let mut buf = &b"\x33\x33\x33\x33\x33\x33\xF3\x3F hello"[..];
 assert_eq!(1.2f64, buf.get_f64_le());
Panics

This function panics if there is not enough remaining data in self.

-
source

fn get_f64_ne(&mut self) -> f64

Gets an IEEE754 double-precision (8 bytes) floating point number from +

source

fn get_f64_ne(&mut self) -> f64

Gets an IEEE754 double-precision (8 bytes) floating point number from self in native-endian byte order.

The current position is advanced by 8.

Examples
use bytes::Buf;
 
-let mut buf: &[u8] = match cfg!(target_endian = "big") {
-    true => b"\x3F\xF3\x33\x33\x33\x33\x33\x33 hello",
-    false => b"\x33\x33\x33\x33\x33\x33\xF3\x3F hello",
+let mut buf: &[u8] = match cfg!(target_endian = "big") {
+    true => b"\x3F\xF3\x33\x33\x33\x33\x33\x33 hello",
+    false => b"\x33\x33\x33\x33\x33\x33\xF3\x3F hello",
 };
 assert_eq!(1.2f64, buf.get_f64_ne());
Panics

This function panics if there is not enough remaining data in self.

-
source

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

Consumes len bytes inside self and returns new instance of Bytes +

source

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

Consumes len bytes inside self and returns new instance of Bytes with this data.

This function may be optimized by the underlying type to avoid actual copies. For example, Bytes implementation will do a shallow copy @@ -566,38 +567,38 @@

Panics
Examples
use bytes::Buf;
 
-let bytes = (&b"hello world"[..]).copy_to_bytes(5);
-assert_eq!(&bytes[..], &b"hello"[..]);
-
source

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

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

+let bytes = (&b"hello world"[..]).copy_to_bytes(5); +assert_eq!(&bytes[..], &b"hello"[..]);
+
source

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

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

This function returns a new instance of Buf which will read at most limit bytes.

Examples
use bytes::{Buf, BufMut};
 
-let mut buf = b"hello world"[..].take(5);
+let mut buf = b"hello world"[..].take(5);
 let mut dst = vec![];
 
 dst.put(&mut buf);
-assert_eq!(dst, b"hello");
+assert_eq!(dst, b"hello");
 
 let mut buf = buf.into_inner();
 dst.clear();
 dst.put(&mut buf);
-assert_eq!(dst, b" world");
-
source

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

Creates an adaptor which will chain this buffer with another.

+assert_eq!(dst, b" world");
+
source

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

Creates an adaptor which will chain this buffer with another.

The returned Buf instance will first consume all bytes from self. Afterwards the output is equivalent to the output of next.

Examples
use bytes::Buf;
 
-let mut chain = b"hello "[..].chain(&b"world"[..]);
+let mut chain = b"hello "[..].chain(&b"world"[..]);
 
 let full = chain.copy_to_bytes(11);
-assert_eq!(full.chunk(), b"hello world");
-
source

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

Creates an adaptor which implements the Read trait for self.

+assert_eq!(full.chunk(), b"hello world");
+
source

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

Creates an adaptor which implements the Read trait for self.

This function returns a new value which implements Read by adapting the Read trait functions to the Buf trait functions. Given that Buf operations are infallible, none of the Read functions will @@ -606,7 +607,7 @@

Examples
use bytes::{Bytes, Buf};
 use std::io::Read;
 
-let buf = Bytes::from("hello world");
+let buf = Bytes::from("hello world");
 
 let mut reader = buf.reader();
 let mut dst = [0; 1024];
@@ -614,7 +615,7 @@ 
Examples
let num = reader.read(&mut dst).unwrap(); assert_eq!(11, num); -assert_eq!(&dst[..11], &b"hello world"[..]);
-

Implementations on Foreign Types§

source§

impl Buf for &[u8]

source§

fn remaining(&self) -> usize

source§

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

source§

fn advance(&mut self, cnt: usize)

source§

impl Buf for VecDeque<u8>

source§

fn remaining(&self) -> usize

source§

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

source§

fn advance(&mut self, cnt: usize)

source§

impl<T: AsRef<[u8]>> Buf for Cursor<T>

source§

fn remaining(&self) -> usize

source§

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

source§

fn advance(&mut self, cnt: usize)

source§

impl<T: Buf + ?Sized> Buf for &mut T

source§

fn remaining(&self) -> usize

source§

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

source§

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

source§

fn advance(&mut self, cnt: usize)

source§

fn has_remaining(&self) -> bool

source§

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

source§

fn get_u8(&mut self) -> u8

source§

fn get_i8(&mut self) -> i8

source§

fn get_u16(&mut self) -> u16

source§

fn get_u16_le(&mut self) -> u16

source§

fn get_u16_ne(&mut self) -> u16

source§

fn get_i16(&mut self) -> i16

source§

fn get_i16_le(&mut self) -> i16

source§

fn get_i16_ne(&mut self) -> i16

source§

fn get_u32(&mut self) -> u32

source§

fn get_u32_le(&mut self) -> u32

source§

fn get_u32_ne(&mut self) -> u32

source§

fn get_i32(&mut self) -> i32

source§

fn get_i32_le(&mut self) -> i32

source§

fn get_i32_ne(&mut self) -> i32

source§

fn get_u64(&mut self) -> u64

source§

fn get_u64_le(&mut self) -> u64

source§

fn get_u64_ne(&mut self) -> u64

source§

fn get_i64(&mut self) -> i64

source§

fn get_i64_le(&mut self) -> i64

source§

fn get_i64_ne(&mut self) -> i64

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<T: Buf + ?Sized> Buf for Box<T>

source§

fn remaining(&self) -> usize

source§

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

source§

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

source§

fn advance(&mut self, cnt: usize)

source§

fn has_remaining(&self) -> bool

source§

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

source§

fn get_u8(&mut self) -> u8

source§

fn get_i8(&mut self) -> i8

source§

fn get_u16(&mut self) -> u16

source§

fn get_u16_le(&mut self) -> u16

source§

fn get_u16_ne(&mut self) -> u16

source§

fn get_i16(&mut self) -> i16

source§

fn get_i16_le(&mut self) -> i16

source§

fn get_i16_ne(&mut self) -> i16

source§

fn get_u32(&mut self) -> u32

source§

fn get_u32_le(&mut self) -> u32

source§

fn get_u32_ne(&mut self) -> u32

source§

fn get_i32(&mut self) -> i32

source§

fn get_i32_le(&mut self) -> i32

source§

fn get_i32_ne(&mut self) -> i32

source§

fn get_u64(&mut self) -> u64

source§

fn get_u64_le(&mut self) -> u64

source§

fn get_u64_ne(&mut self) -> u64

source§

fn get_i64(&mut self) -> i64

source§

fn get_i64_le(&mut self) -> i64

source§

fn get_i64_ne(&mut self) -> i64

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

Implementors§

source§

impl Buf for Bytes

source§

impl Buf for BytesMut

source§

impl<T, U> Buf for Chain<T, U>where +assert_eq!(&dst[..11], &b"hello world"[..]);

+

Implementations on Foreign Types§

source§

impl Buf for &[u8]

source§

fn remaining(&self) -> usize

source§

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

source§

fn advance(&mut self, cnt: usize)

source§

impl Buf for VecDeque<u8>

source§

fn remaining(&self) -> usize

source§

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

source§

fn advance(&mut self, cnt: usize)

source§

impl<T: AsRef<[u8]>> Buf for Cursor<T>

source§

fn remaining(&self) -> usize

source§

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

source§

fn advance(&mut self, cnt: usize)

source§

impl<T: Buf + ?Sized> Buf for &mut T

source§

fn remaining(&self) -> usize

source§

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

source§

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

source§

fn advance(&mut self, cnt: usize)

source§

fn has_remaining(&self) -> bool

source§

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

source§

fn get_u8(&mut self) -> u8

source§

fn get_i8(&mut self) -> i8

source§

fn get_u16(&mut self) -> u16

source§

fn get_u16_le(&mut self) -> u16

source§

fn get_u16_ne(&mut self) -> u16

source§

fn get_i16(&mut self) -> i16

source§

fn get_i16_le(&mut self) -> i16

source§

fn get_i16_ne(&mut self) -> i16

source§

fn get_u32(&mut self) -> u32

source§

fn get_u32_le(&mut self) -> u32

source§

fn get_u32_ne(&mut self) -> u32

source§

fn get_i32(&mut self) -> i32

source§

fn get_i32_le(&mut self) -> i32

source§

fn get_i32_ne(&mut self) -> i32

source§

fn get_u64(&mut self) -> u64

source§

fn get_u64_le(&mut self) -> u64

source§

fn get_u64_ne(&mut self) -> u64

source§

fn get_i64(&mut self) -> i64

source§

fn get_i64_le(&mut self) -> i64

source§

fn get_i64_ne(&mut self) -> i64

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<T: Buf + ?Sized> Buf for Box<T>

source§

fn remaining(&self) -> usize

source§

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

source§

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

source§

fn advance(&mut self, cnt: usize)

source§

fn has_remaining(&self) -> bool

source§

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

source§

fn get_u8(&mut self) -> u8

source§

fn get_i8(&mut self) -> i8

source§

fn get_u16(&mut self) -> u16

source§

fn get_u16_le(&mut self) -> u16

source§

fn get_u16_ne(&mut self) -> u16

source§

fn get_i16(&mut self) -> i16

source§

fn get_i16_le(&mut self) -> i16

source§

fn get_i16_ne(&mut self) -> i16

source§

fn get_u32(&mut self) -> u32

source§

fn get_u32_le(&mut self) -> u32

source§

fn get_u32_ne(&mut self) -> u32

source§

fn get_i32(&mut self) -> i32

source§

fn get_i32_le(&mut self) -> i32

source§

fn get_i32_ne(&mut self) -> i32

source§

fn get_u64(&mut self) -> u64

source§

fn get_u64_le(&mut self) -> u64

source§

fn get_u64_ne(&mut self) -> u64

source§

fn get_i64(&mut self) -> i64

source§

fn get_i64_le(&mut self) -> i64

source§

fn get_i64_ne(&mut self) -> i64

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

Implementors§

source§

impl Buf for Bytes

source§

impl Buf for BytesMut

source§

impl<T, U> Buf for Chain<T, U>
where T: Buf, - U: Buf,

source§

impl<T: Buf> Buf for Take<T>

\ No newline at end of file + U: Buf,
source§

impl<T: Buf> Buf for Take<T>

\ No newline at end of file diff --git a/bytes/buf/trait.BufMut.html b/bytes/buf/trait.BufMut.html index 60f224f3c..c6e517993 100644 --- a/bytes/buf/trait.BufMut.html +++ b/bytes/buf/trait.BufMut.html @@ -1,59 +1,60 @@ -BufMut in bytes::buf - Rust

Trait bytes::buf::BufMut

source ·
pub unsafe trait BufMut {
+BufMut in bytes::buf - Rust
+    

Trait bytes::buf::BufMut

source ·
pub unsafe trait BufMut {
 
Show 48 methods // Required methods - fn remaining_mut(&self) -> usize; - unsafe fn advance_mut(&mut self, cnt: usize); + fn remaining_mut(&self) -> usize; + unsafe fn advance_mut(&mut self, cnt: usize); fn chunk_mut(&mut self) -> &mut UninitSlice; // Provided methods - fn has_remaining_mut(&self) -> bool { ... } + fn has_remaining_mut(&self) -> bool { ... } fn put<T: Buf>(&mut self, src: T) - where Self: Sized { ... } - fn put_slice(&mut self, src: &[u8]) { ... } - fn put_bytes(&mut self, val: u8, cnt: usize) { ... } - fn put_u8(&mut self, n: u8) { ... } - fn put_i8(&mut self, n: i8) { ... } - fn put_u16(&mut self, n: u16) { ... } - fn put_u16_le(&mut self, n: u16) { ... } - fn put_u16_ne(&mut self, n: u16) { ... } - fn put_i16(&mut self, n: i16) { ... } - fn put_i16_le(&mut self, n: i16) { ... } - fn put_i16_ne(&mut self, n: i16) { ... } - fn put_u32(&mut self, n: u32) { ... } - fn put_u32_le(&mut self, n: u32) { ... } - fn put_u32_ne(&mut self, n: u32) { ... } - fn put_i32(&mut self, n: i32) { ... } - fn put_i32_le(&mut self, n: i32) { ... } - fn put_i32_ne(&mut self, n: i32) { ... } - fn put_u64(&mut self, n: u64) { ... } - fn put_u64_le(&mut self, n: u64) { ... } - fn put_u64_ne(&mut self, n: u64) { ... } - fn put_i64(&mut self, n: i64) { ... } - fn put_i64_le(&mut self, n: i64) { ... } - fn put_i64_ne(&mut self, n: i64) { ... } - fn put_u128(&mut self, n: u128) { ... } - fn put_u128_le(&mut self, n: u128) { ... } - fn put_u128_ne(&mut self, n: u128) { ... } - fn put_i128(&mut self, n: i128) { ... } - fn put_i128_le(&mut self, n: i128) { ... } - fn put_i128_ne(&mut self, n: i128) { ... } - fn put_uint(&mut self, n: u64, nbytes: usize) { ... } - fn put_uint_le(&mut self, n: u64, nbytes: usize) { ... } - fn put_uint_ne(&mut self, n: u64, nbytes: usize) { ... } - fn put_int(&mut self, n: i64, nbytes: usize) { ... } - fn put_int_le(&mut self, n: i64, nbytes: usize) { ... } - fn put_int_ne(&mut self, n: i64, nbytes: usize) { ... } - fn put_f32(&mut self, n: f32) { ... } - fn put_f32_le(&mut self, n: f32) { ... } - fn put_f32_ne(&mut self, n: f32) { ... } - fn put_f64(&mut self, n: f64) { ... } - fn put_f64_le(&mut self, n: f64) { ... } - fn put_f64_ne(&mut self, n: f64) { ... } - fn limit(self, limit: usize) -> Limit<Self> - where Self: Sized { ... } + where Self: Sized { ... } + fn put_slice(&mut self, src: &[u8]) { ... } + fn put_bytes(&mut self, val: u8, cnt: usize) { ... } + fn put_u8(&mut self, n: u8) { ... } + fn put_i8(&mut self, n: i8) { ... } + fn put_u16(&mut self, n: u16) { ... } + fn put_u16_le(&mut self, n: u16) { ... } + fn put_u16_ne(&mut self, n: u16) { ... } + fn put_i16(&mut self, n: i16) { ... } + fn put_i16_le(&mut self, n: i16) { ... } + fn put_i16_ne(&mut self, n: i16) { ... } + fn put_u32(&mut self, n: u32) { ... } + fn put_u32_le(&mut self, n: u32) { ... } + fn put_u32_ne(&mut self, n: u32) { ... } + fn put_i32(&mut self, n: i32) { ... } + fn put_i32_le(&mut self, n: i32) { ... } + fn put_i32_ne(&mut self, n: i32) { ... } + fn put_u64(&mut self, n: u64) { ... } + fn put_u64_le(&mut self, n: u64) { ... } + fn put_u64_ne(&mut self, n: u64) { ... } + fn put_i64(&mut self, n: i64) { ... } + fn put_i64_le(&mut self, n: i64) { ... } + fn put_i64_ne(&mut self, n: i64) { ... } + fn put_u128(&mut self, n: u128) { ... } + fn put_u128_le(&mut self, n: u128) { ... } + fn put_u128_ne(&mut self, n: u128) { ... } + fn put_i128(&mut self, n: i128) { ... } + fn put_i128_le(&mut self, n: i128) { ... } + fn put_i128_ne(&mut self, n: i128) { ... } + fn put_uint(&mut self, n: u64, nbytes: usize) { ... } + fn put_uint_le(&mut self, n: u64, nbytes: usize) { ... } + fn put_uint_ne(&mut self, n: u64, nbytes: usize) { ... } + fn put_int(&mut self, n: i64, nbytes: usize) { ... } + fn put_int_le(&mut self, n: i64, nbytes: usize) { ... } + fn put_int_ne(&mut self, n: i64, nbytes: usize) { ... } + fn put_f32(&mut self, n: f32) { ... } + fn put_f32_le(&mut self, n: f32) { ... } + fn put_f32_ne(&mut self, n: f32) { ... } + fn put_f64(&mut self, n: f64) { ... } + fn put_f64_le(&mut self, n: f64) { ... } + fn put_f64_ne(&mut self, n: f64) { ... } + fn limit(self, limit: usize) -> Limit<Self> + where Self: Sized { ... } fn writer(self) -> Writer<Self> - where Self: Sized { ... } + where Self: Sized { ... } fn chain_mut<U: BufMut>(self, next: U) -> Chain<Self, U> - where Self: Sized { ... } + where Self: Sized { ... }
}
Expand description

A trait for values that provide sequential write access to bytes.

Write bytes to a buffer

A buffer stores bytes in memory such that write operations are infallible. @@ -66,10 +67,10 @@ let mut buf = vec![]; -buf.put(&b"hello world"[..]); +buf.put(&b"hello world"[..]); -assert_eq!(buf, b"hello world");

-

Required Methods§

source

fn remaining_mut(&self) -> usize

Returns the number of bytes that can be written from the current +assert_eq!(buf, b"hello world");

+

Required Methods§

source

fn remaining_mut(&self) -> usize

Returns the number of bytes that can be written from the current position until the end of the buffer is reached.

This value is greater than or equal to the length of the slice returned by chunk_mut().

@@ -83,7 +84,7 @@
Examples
let mut buf = &mut dst[..]; let original_remaining = buf.remaining_mut(); -buf.put(&b"hello"[..]); +buf.put(&b"hello"[..]); assert_eq!(original_remaining - 5, buf.remaining_mut());
Implementer notes
@@ -92,7 +93,7 @@
Implementer notesBufMut’s current position.

Note

remaining_mut may return value smaller than actual available space.

-
source

unsafe fn advance_mut(&mut self, cnt: usize)

Advance the internal cursor of the BufMut

+
source

unsafe fn advance_mut(&mut self, cnt: usize)

Advance the internal cursor of the BufMut

The next call to chunk_mut will return a slice starting cnt bytes further into the underlying buffer.

This function is unsafe because there is no guarantee that the bytes @@ -103,16 +104,16 @@

Examples
let mut buf = Vec::with_capacity(16); // Write some data -buf.chunk_mut()[0..2].copy_from_slice(b"he"); +buf.chunk_mut()[0..2].copy_from_slice(b"he"); unsafe { buf.advance_mut(2) }; // write more bytes -buf.chunk_mut()[0..3].copy_from_slice(b"llo"); +buf.chunk_mut()[0..3].copy_from_slice(b"llo"); unsafe { buf.advance_mut(3); } assert_eq!(5, buf.len()); -assert_eq!(buf, b"hello");
+assert_eq!(buf, b"hello");
Panics

This function may panic if cnt > self.remaining_mut().

Implementer notes
@@ -133,20 +134,20 @@
Examples
unsafe { // MaybeUninit::as_mut_ptr - buf.chunk_mut()[0..].as_mut_ptr().write(b'h'); - buf.chunk_mut()[1..].as_mut_ptr().write(b'e'); + buf.chunk_mut()[0..].as_mut_ptr().write(b'h'); + buf.chunk_mut()[1..].as_mut_ptr().write(b'e'); buf.advance_mut(2); - buf.chunk_mut()[0..].as_mut_ptr().write(b'l'); - buf.chunk_mut()[1..].as_mut_ptr().write(b'l'); - buf.chunk_mut()[2..].as_mut_ptr().write(b'o'); + buf.chunk_mut()[0..].as_mut_ptr().write(b'l'); + buf.chunk_mut()[1..].as_mut_ptr().write(b'l'); + buf.chunk_mut()[2..].as_mut_ptr().write(b'o'); buf.advance_mut(3); } assert_eq!(5, buf.len()); -assert_eq!(buf, b"hello"); +assert_eq!(buf, b"hello");
Implementer notes

This function should never panic. chunk_mut should return an empty slice if and only if remaining_mut() returns 0. In other words, @@ -155,7 +156,7 @@

Implementer notes

This function may trigger an out-of-memory abort if it tries to allocate memory and fails to do so.

-

Provided Methods§

source

fn has_remaining_mut(&self) -> bool

Returns true if there is space in self for more bytes.

+

Provided Methods§

source

fn has_remaining_mut(&self) -> bool

Returns true if there is space in self for more bytes.

This is equivalent to self.remaining_mut() != 0.

Examples
use bytes::BufMut;
@@ -165,25 +166,25 @@ 
Examples
assert!(buf.has_remaining_mut()); -buf.put(&b"hello"[..]); +buf.put(&b"hello"[..]); assert!(!buf.has_remaining_mut());
-
source

fn put<T: Buf>(&mut self, src: T)where - Self: Sized,

Transfer bytes into self from src and advance the cursor by the +

source

fn put<T: Buf>(&mut self, src: T)
where + Self: Sized,

Transfer bytes into self from src and advance the cursor by the number of bytes written.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 
-buf.put_u8(b'h');
-buf.put(&b"ello"[..]);
-buf.put(&b" world"[..]);
+buf.put_u8(b'h');
+buf.put(&b"ello"[..]);
+buf.put(&b" world"[..]);
 
-assert_eq!(buf, b"hello world");
+assert_eq!(buf, b"hello world");
Panics

Panics if self does not have enough capacity to contain src.

-
source

fn put_slice(&mut self, src: &[u8])

Transfer bytes into self from src and advance the cursor by the +

source

fn put_slice(&mut self, src: &[u8])

Transfer bytes into self from src and advance the cursor by the number of bytes written.

self must have enough remaining capacity to contain all of src.

@@ -193,13 +194,13 @@
Panics
{ let mut buf = &mut dst[..]; - buf.put_slice(b"hello"); + buf.put_slice(b"hello"); assert_eq!(1, buf.remaining_mut()); } -assert_eq!(b"hello\0", &dst);
-
source

fn put_bytes(&mut self, val: u8, cnt: usize)

Put cnt bytes val into self.

+assert_eq!(b"hello\0", &dst);
+
source

fn put_bytes(&mut self, val: u8, cnt: usize)

Put cnt bytes val into self.

Logically equivalent to calling self.put_u8(val) cnt times, but may work faster.

self must have at least cnt remaining capacity.

@@ -209,408 +210,408 @@
Panics
{ let mut buf = &mut dst[..]; - buf.put_bytes(b'a', 4); + buf.put_bytes(b'a', 4); assert_eq!(2, buf.remaining_mut()); } -assert_eq!(b"aaaa\0\0", &dst);
+assert_eq!(b"aaaa\0\0", &dst);
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_u8(&mut self, n: u8)

Writes an unsigned 8 bit integer to self.

+
source

fn put_u8(&mut self, n: u8)

Writes an unsigned 8 bit integer to self.

The current position is advanced by 1.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_u8(0x01);
-assert_eq!(buf, b"\x01");
+assert_eq!(buf, b"\x01");
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_i8(&mut self, n: i8)

Writes a signed 8 bit integer to self.

+
source

fn put_i8(&mut self, n: i8)

Writes a signed 8 bit integer to self.

The current position is advanced by 1.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_i8(0x01);
-assert_eq!(buf, b"\x01");
+assert_eq!(buf, b"\x01");
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_u16(&mut self, n: u16)

Writes an unsigned 16 bit integer to self in big-endian byte order.

+
source

fn put_u16(&mut self, n: u16)

Writes an unsigned 16 bit integer to self in big-endian byte order.

The current position is advanced by 2.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_u16(0x0809);
-assert_eq!(buf, b"\x08\x09");
+assert_eq!(buf, b"\x08\x09");
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_u16_le(&mut self, n: u16)

Writes an unsigned 16 bit integer to self in little-endian byte order.

+
source

fn put_u16_le(&mut self, n: u16)

Writes an unsigned 16 bit integer to self in little-endian byte order.

The current position is advanced by 2.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_u16_le(0x0809);
-assert_eq!(buf, b"\x09\x08");
+assert_eq!(buf, b"\x09\x08");
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_u16_ne(&mut self, n: u16)

Writes an unsigned 16 bit integer to self in native-endian byte order.

+
source

fn put_u16_ne(&mut self, n: u16)

Writes an unsigned 16 bit integer to self in native-endian byte order.

The current position is advanced by 2.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_u16_ne(0x0809);
-if cfg!(target_endian = "big") {
-    assert_eq!(buf, b"\x08\x09");
+if cfg!(target_endian = "big") {
+    assert_eq!(buf, b"\x08\x09");
 } else {
-    assert_eq!(buf, b"\x09\x08");
+    assert_eq!(buf, b"\x09\x08");
 }
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_i16(&mut self, n: i16)

Writes a signed 16 bit integer to self in big-endian byte order.

+
source

fn put_i16(&mut self, n: i16)

Writes a signed 16 bit integer to self in big-endian byte order.

The current position is advanced by 2.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_i16(0x0809);
-assert_eq!(buf, b"\x08\x09");
+assert_eq!(buf, b"\x08\x09");
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_i16_le(&mut self, n: i16)

Writes a signed 16 bit integer to self in little-endian byte order.

+
source

fn put_i16_le(&mut self, n: i16)

Writes a signed 16 bit integer to self in little-endian byte order.

The current position is advanced by 2.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_i16_le(0x0809);
-assert_eq!(buf, b"\x09\x08");
+assert_eq!(buf, b"\x09\x08");
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_i16_ne(&mut self, n: i16)

Writes a signed 16 bit integer to self in native-endian byte order.

+
source

fn put_i16_ne(&mut self, n: i16)

Writes a signed 16 bit integer to self in native-endian byte order.

The current position is advanced by 2.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_i16_ne(0x0809);
-if cfg!(target_endian = "big") {
-    assert_eq!(buf, b"\x08\x09");
+if cfg!(target_endian = "big") {
+    assert_eq!(buf, b"\x08\x09");
 } else {
-    assert_eq!(buf, b"\x09\x08");
+    assert_eq!(buf, b"\x09\x08");
 }
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_u32(&mut self, n: u32)

Writes an unsigned 32 bit integer to self in big-endian byte order.

+
source

fn put_u32(&mut self, n: u32)

Writes an unsigned 32 bit integer to self in big-endian byte order.

The current position is advanced by 4.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_u32(0x0809A0A1);
-assert_eq!(buf, b"\x08\x09\xA0\xA1");
+assert_eq!(buf, b"\x08\x09\xA0\xA1");
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_u32_le(&mut self, n: u32)

Writes an unsigned 32 bit integer to self in little-endian byte order.

+
source

fn put_u32_le(&mut self, n: u32)

Writes an unsigned 32 bit integer to self in little-endian byte order.

The current position is advanced by 4.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_u32_le(0x0809A0A1);
-assert_eq!(buf, b"\xA1\xA0\x09\x08");
+assert_eq!(buf, b"\xA1\xA0\x09\x08");
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_u32_ne(&mut self, n: u32)

Writes an unsigned 32 bit integer to self in native-endian byte order.

+
source

fn put_u32_ne(&mut self, n: u32)

Writes an unsigned 32 bit integer to self in native-endian byte order.

The current position is advanced by 4.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_u32_ne(0x0809A0A1);
-if cfg!(target_endian = "big") {
-    assert_eq!(buf, b"\x08\x09\xA0\xA1");
+if cfg!(target_endian = "big") {
+    assert_eq!(buf, b"\x08\x09\xA0\xA1");
 } else {
-    assert_eq!(buf, b"\xA1\xA0\x09\x08");
+    assert_eq!(buf, b"\xA1\xA0\x09\x08");
 }
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_i32(&mut self, n: i32)

Writes a signed 32 bit integer to self in big-endian byte order.

+
source

fn put_i32(&mut self, n: i32)

Writes a signed 32 bit integer to self in big-endian byte order.

The current position is advanced by 4.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_i32(0x0809A0A1);
-assert_eq!(buf, b"\x08\x09\xA0\xA1");
+assert_eq!(buf, b"\x08\x09\xA0\xA1");
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_i32_le(&mut self, n: i32)

Writes a signed 32 bit integer to self in little-endian byte order.

+
source

fn put_i32_le(&mut self, n: i32)

Writes a signed 32 bit integer to self in little-endian byte order.

The current position is advanced by 4.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_i32_le(0x0809A0A1);
-assert_eq!(buf, b"\xA1\xA0\x09\x08");
+assert_eq!(buf, b"\xA1\xA0\x09\x08");
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_i32_ne(&mut self, n: i32)

Writes a signed 32 bit integer to self in native-endian byte order.

+
source

fn put_i32_ne(&mut self, n: i32)

Writes a signed 32 bit integer to self in native-endian byte order.

The current position is advanced by 4.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_i32_ne(0x0809A0A1);
-if cfg!(target_endian = "big") {
-    assert_eq!(buf, b"\x08\x09\xA0\xA1");
+if cfg!(target_endian = "big") {
+    assert_eq!(buf, b"\x08\x09\xA0\xA1");
 } else {
-    assert_eq!(buf, b"\xA1\xA0\x09\x08");
+    assert_eq!(buf, b"\xA1\xA0\x09\x08");
 }
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_u64(&mut self, n: u64)

Writes an unsigned 64 bit integer to self in the big-endian byte order.

+
source

fn put_u64(&mut self, n: u64)

Writes an unsigned 64 bit integer to self in the big-endian byte order.

The current position is advanced by 8.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_u64(0x0102030405060708);
-assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08");
+assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08");
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_u64_le(&mut self, n: u64)

Writes an unsigned 64 bit integer to self in little-endian byte order.

+
source

fn put_u64_le(&mut self, n: u64)

Writes an unsigned 64 bit integer to self in little-endian byte order.

The current position is advanced by 8.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_u64_le(0x0102030405060708);
-assert_eq!(buf, b"\x08\x07\x06\x05\x04\x03\x02\x01");
+assert_eq!(buf, b"\x08\x07\x06\x05\x04\x03\x02\x01");
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_u64_ne(&mut self, n: u64)

Writes an unsigned 64 bit integer to self in native-endian byte order.

+
source

fn put_u64_ne(&mut self, n: u64)

Writes an unsigned 64 bit integer to self in native-endian byte order.

The current position is advanced by 8.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_u64_ne(0x0102030405060708);
-if cfg!(target_endian = "big") {
-    assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08");
+if cfg!(target_endian = "big") {
+    assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08");
 } else {
-    assert_eq!(buf, b"\x08\x07\x06\x05\x04\x03\x02\x01");
+    assert_eq!(buf, b"\x08\x07\x06\x05\x04\x03\x02\x01");
 }
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_i64(&mut self, n: i64)

Writes a signed 64 bit integer to self in the big-endian byte order.

+
source

fn put_i64(&mut self, n: i64)

Writes a signed 64 bit integer to self in the big-endian byte order.

The current position is advanced by 8.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_i64(0x0102030405060708);
-assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08");
+assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08");
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_i64_le(&mut self, n: i64)

Writes a signed 64 bit integer to self in little-endian byte order.

+
source

fn put_i64_le(&mut self, n: i64)

Writes a signed 64 bit integer to self in little-endian byte order.

The current position is advanced by 8.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_i64_le(0x0102030405060708);
-assert_eq!(buf, b"\x08\x07\x06\x05\x04\x03\x02\x01");
+assert_eq!(buf, b"\x08\x07\x06\x05\x04\x03\x02\x01");
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_i64_ne(&mut self, n: i64)

Writes a signed 64 bit integer to self in native-endian byte order.

+
source

fn put_i64_ne(&mut self, n: i64)

Writes a signed 64 bit integer to self in native-endian byte order.

The current position is advanced by 8.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_i64_ne(0x0102030405060708);
-if cfg!(target_endian = "big") {
-    assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08");
+if cfg!(target_endian = "big") {
+    assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08");
 } else {
-    assert_eq!(buf, b"\x08\x07\x06\x05\x04\x03\x02\x01");
+    assert_eq!(buf, b"\x08\x07\x06\x05\x04\x03\x02\x01");
 }
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_u128(&mut self, n: u128)

Writes an unsigned 128 bit integer to self in the big-endian byte order.

+
source

fn put_u128(&mut self, n: u128)

Writes an unsigned 128 bit integer to self in the big-endian byte order.

The current position is advanced by 16.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_u128(0x01020304050607080910111213141516);
-assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16");
+assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16");
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_u128_le(&mut self, n: u128)

Writes an unsigned 128 bit integer to self in little-endian byte order.

+
source

fn put_u128_le(&mut self, n: u128)

Writes an unsigned 128 bit integer to self in little-endian byte order.

The current position is advanced by 16.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_u128_le(0x01020304050607080910111213141516);
-assert_eq!(buf, b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01");
+assert_eq!(buf, b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01");
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_u128_ne(&mut self, n: u128)

Writes an unsigned 128 bit integer to self in native-endian byte order.

+
source

fn put_u128_ne(&mut self, n: u128)

Writes an unsigned 128 bit integer to self in native-endian byte order.

The current position is advanced by 16.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_u128_ne(0x01020304050607080910111213141516);
-if cfg!(target_endian = "big") {
-    assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16");
+if cfg!(target_endian = "big") {
+    assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16");
 } else {
-    assert_eq!(buf, b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01");
+    assert_eq!(buf, b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01");
 }
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_i128(&mut self, n: i128)

Writes a signed 128 bit integer to self in the big-endian byte order.

+
source

fn put_i128(&mut self, n: i128)

Writes a signed 128 bit integer to self in the big-endian byte order.

The current position is advanced by 16.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_i128(0x01020304050607080910111213141516);
-assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16");
+assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16");
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_i128_le(&mut self, n: i128)

Writes a signed 128 bit integer to self in little-endian byte order.

+
source

fn put_i128_le(&mut self, n: i128)

Writes a signed 128 bit integer to self in little-endian byte order.

The current position is advanced by 16.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_i128_le(0x01020304050607080910111213141516);
-assert_eq!(buf, b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01");
+assert_eq!(buf, b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01");
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_i128_ne(&mut self, n: i128)

Writes a signed 128 bit integer to self in native-endian byte order.

+
source

fn put_i128_ne(&mut self, n: i128)

Writes a signed 128 bit integer to self in native-endian byte order.

The current position is advanced by 16.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_i128_ne(0x01020304050607080910111213141516);
-if cfg!(target_endian = "big") {
-    assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16");
+if cfg!(target_endian = "big") {
+    assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16");
 } else {
-    assert_eq!(buf, b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01");
+    assert_eq!(buf, b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01");
 }
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_uint(&mut self, n: u64, nbytes: usize)

Writes an unsigned n-byte integer to self in big-endian byte order.

+
source

fn put_uint(&mut self, n: u64, nbytes: usize)

Writes an unsigned n-byte integer to self in big-endian byte order.

The current position is advanced by nbytes.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_uint(0x010203, 3);
-assert_eq!(buf, b"\x01\x02\x03");
+assert_eq!(buf, b"\x01\x02\x03");
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_uint_le(&mut self, n: u64, nbytes: usize)

Writes an unsigned n-byte integer to self in the little-endian byte order.

+
source

fn put_uint_le(&mut self, n: u64, nbytes: usize)

Writes an unsigned n-byte integer to self in the little-endian byte order.

The current position is advanced by nbytes.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_uint_le(0x010203, 3);
-assert_eq!(buf, b"\x03\x02\x01");
+assert_eq!(buf, b"\x03\x02\x01");
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_uint_ne(&mut self, n: u64, nbytes: usize)

Writes an unsigned n-byte integer to self in the native-endian byte order.

+
source

fn put_uint_ne(&mut self, n: u64, nbytes: usize)

Writes an unsigned n-byte integer to self in the native-endian byte order.

The current position is advanced by nbytes.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_uint_ne(0x010203, 3);
-if cfg!(target_endian = "big") {
-    assert_eq!(buf, b"\x01\x02\x03");
+if cfg!(target_endian = "big") {
+    assert_eq!(buf, b"\x01\x02\x03");
 } else {
-    assert_eq!(buf, b"\x03\x02\x01");
+    assert_eq!(buf, b"\x03\x02\x01");
 }
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_int(&mut self, n: i64, nbytes: usize)

Writes low nbytes of a signed integer to self in big-endian byte order.

+
source

fn put_int(&mut self, n: i64, nbytes: usize)

Writes low nbytes of a signed integer to self in big-endian byte order.

The current position is advanced by nbytes.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_int(0x0504010203, 3);
-assert_eq!(buf, b"\x01\x02\x03");
+assert_eq!(buf, b"\x01\x02\x03");
Panics

This function panics if there is not enough remaining capacity in self or if nbytes is greater than 8.

-
source

fn put_int_le(&mut self, n: i64, nbytes: usize)

Writes low nbytes of a signed integer to self in little-endian byte order.

+
source

fn put_int_le(&mut self, n: i64, nbytes: usize)

Writes low nbytes of a signed integer to self in little-endian byte order.

The current position is advanced by nbytes.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_int_le(0x0504010203, 3);
-assert_eq!(buf, b"\x03\x02\x01");
+assert_eq!(buf, b"\x03\x02\x01");
Panics

This function panics if there is not enough remaining capacity in self or if nbytes is greater than 8.

-
source

fn put_int_ne(&mut self, n: i64, nbytes: usize)

Writes low nbytes of a signed integer to self in native-endian byte order.

+
source

fn put_int_ne(&mut self, n: i64, nbytes: usize)

Writes low nbytes of a signed integer to self in native-endian byte order.

The current position is advanced by nbytes.

Examples
use bytes::BufMut;
 
 let mut buf = vec![];
 buf.put_int_ne(0x010203, 3);
-if cfg!(target_endian = "big") {
-    assert_eq!(buf, b"\x01\x02\x03");
+if cfg!(target_endian = "big") {
+    assert_eq!(buf, b"\x01\x02\x03");
 } else {
-    assert_eq!(buf, b"\x03\x02\x01");
+    assert_eq!(buf, b"\x03\x02\x01");
 }
Panics

This function panics if there is not enough remaining capacity in self or if nbytes is greater than 8.

-
source

fn put_f32(&mut self, n: f32)

Writes an IEEE754 single-precision (4 bytes) floating point number to +

source

fn put_f32(&mut self, n: f32)

Writes an IEEE754 single-precision (4 bytes) floating point number to self in big-endian byte order.

The current position is advanced by 4.

Examples
@@ -618,11 +619,11 @@
Examples
let mut buf = vec![]; buf.put_f32(1.2f32); -assert_eq!(buf, b"\x3F\x99\x99\x9A");
+assert_eq!(buf, b"\x3F\x99\x99\x9A");
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_f32_le(&mut self, n: f32)

Writes an IEEE754 single-precision (4 bytes) floating point number to +

source

fn put_f32_le(&mut self, n: f32)

Writes an IEEE754 single-precision (4 bytes) floating point number to self in little-endian byte order.

The current position is advanced by 4.

Examples
@@ -630,11 +631,11 @@
Examples
let mut buf = vec![]; buf.put_f32_le(1.2f32); -assert_eq!(buf, b"\x9A\x99\x99\x3F");
+assert_eq!(buf, b"\x9A\x99\x99\x3F");
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_f32_ne(&mut self, n: f32)

Writes an IEEE754 single-precision (4 bytes) floating point number to +

source

fn put_f32_ne(&mut self, n: f32)

Writes an IEEE754 single-precision (4 bytes) floating point number to self in native-endian byte order.

The current position is advanced by 4.

Examples
@@ -642,15 +643,15 @@
Examples
let mut buf = vec![]; buf.put_f32_ne(1.2f32); -if cfg!(target_endian = "big") { - assert_eq!(buf, b"\x3F\x99\x99\x9A"); +if cfg!(target_endian = "big") { + assert_eq!(buf, b"\x3F\x99\x99\x9A"); } else { - assert_eq!(buf, b"\x9A\x99\x99\x3F"); + assert_eq!(buf, b"\x9A\x99\x99\x3F"); }
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_f64(&mut self, n: f64)

Writes an IEEE754 double-precision (8 bytes) floating point number to +

source

fn put_f64(&mut self, n: f64)

Writes an IEEE754 double-precision (8 bytes) floating point number to self in big-endian byte order.

The current position is advanced by 8.

Examples
@@ -658,11 +659,11 @@
Examples
let mut buf = vec![]; buf.put_f64(1.2f64); -assert_eq!(buf, b"\x3F\xF3\x33\x33\x33\x33\x33\x33");
+assert_eq!(buf, b"\x3F\xF3\x33\x33\x33\x33\x33\x33");
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_f64_le(&mut self, n: f64)

Writes an IEEE754 double-precision (8 bytes) floating point number to +

source

fn put_f64_le(&mut self, n: f64)

Writes an IEEE754 double-precision (8 bytes) floating point number to self in little-endian byte order.

The current position is advanced by 8.

Examples
@@ -670,11 +671,11 @@
Examples
let mut buf = vec![]; buf.put_f64_le(1.2f64); -assert_eq!(buf, b"\x33\x33\x33\x33\x33\x33\xF3\x3F");
+assert_eq!(buf, b"\x33\x33\x33\x33\x33\x33\xF3\x3F");
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn put_f64_ne(&mut self, n: f64)

Writes an IEEE754 double-precision (8 bytes) floating point number to +

source

fn put_f64_ne(&mut self, n: f64)

Writes an IEEE754 double-precision (8 bytes) floating point number to self in native-endian byte order.

The current position is advanced by 8.

Examples
@@ -682,16 +683,16 @@
Examples
let mut buf = vec![]; buf.put_f64_ne(1.2f64); -if cfg!(target_endian = "big") { - assert_eq!(buf, b"\x3F\xF3\x33\x33\x33\x33\x33\x33"); +if cfg!(target_endian = "big") { + assert_eq!(buf, b"\x3F\xF3\x33\x33\x33\x33\x33\x33"); } else { - assert_eq!(buf, b"\x33\x33\x33\x33\x33\x33\xF3\x3F"); + assert_eq!(buf, b"\x33\x33\x33\x33\x33\x33\xF3\x3F"); }
Panics

This function panics if there is not enough remaining capacity in self.

-
source

fn limit(self, limit: usize) -> Limit<Self>where - Self: Sized,

Creates an adaptor which can write at most limit bytes to self.

+
source

fn limit(self, limit: usize) -> Limit<Self>
where + Self: Sized,

Creates an adaptor which can write at most limit bytes to self.

Examples
use bytes::BufMut;
 
@@ -700,8 +701,8 @@ 
Examples
let dst = arr.limit(10); assert_eq!(dst.remaining_mut(), 10);
-
source

fn writer(self) -> Writer<Self> where - Self: Sized,

Creates an adaptor which implements the Write trait for self.

+
source

fn writer(self) -> Writer<Self>
where + Self: Sized,

Creates an adaptor which implements the Write trait for self.

This function returns a new value which implements Write by adapting the Write trait functions to the BufMut trait functions. Given that BufMut operations are infallible, none of the Write functions will @@ -712,14 +713,14 @@

Examples
let mut buf = vec![].writer(); -let num = buf.write(&b"hello world"[..]).unwrap(); +let num = buf.write(&b"hello world"[..]).unwrap(); assert_eq!(11, num); let buf = buf.into_inner(); -assert_eq!(*buf, b"hello world"[..]);
-
source

fn chain_mut<U: BufMut>(self, next: U) -> Chain<Self, U>where - Self: Sized,

Creates an adapter which will chain this buffer with another.

+assert_eq!(*buf, b"hello world"[..]);
+
source

fn chain_mut<U: BufMut>(self, next: U) -> Chain<Self, U>
where + Self: Sized,

Creates an adapter which will chain this buffer with another.

The returned BufMut instance will first write to all bytes from self. Afterwards, it will write to next.

Examples
@@ -730,11 +731,11 @@
Examples
let mut chain = (&mut a[..]).chain_mut(&mut b[..]); -chain.put_slice(b"hello world"); +chain.put_slice(b"hello world"); -assert_eq!(&a[..], b"hello"); -assert_eq!(&b[..], b" world");
-

Implementations on Foreign Types§

source§

impl BufMut for &mut [u8]

source§

fn remaining_mut(&self) -> usize

source§

fn chunk_mut(&mut self) -> &mut UninitSlice

source§

unsafe fn advance_mut(&mut self, cnt: usize)

source§

fn put_slice(&mut self, src: &[u8])

source§

fn put_bytes(&mut self, val: u8, cnt: usize)

source§

impl BufMut for &mut [MaybeUninit<u8>]

source§

fn remaining_mut(&self) -> usize

source§

fn chunk_mut(&mut self) -> &mut UninitSlice

source§

unsafe fn advance_mut(&mut self, cnt: usize)

source§

fn put_slice(&mut self, src: &[u8])

source§

fn put_bytes(&mut self, val: u8, cnt: usize)

source§

impl BufMut for Vec<u8>

source§

fn remaining_mut(&self) -> usize

source§

unsafe fn advance_mut(&mut self, cnt: usize)

source§

fn chunk_mut(&mut self) -> &mut UninitSlice

source§

fn put<T: Buf>(&mut self, src: T)where - Self: Sized,

source§

fn put_slice(&mut self, src: &[u8])

source§

fn put_bytes(&mut self, val: u8, cnt: usize)

source§

impl<T: BufMut + ?Sized> BufMut for &mut T

source§

fn remaining_mut(&self) -> usize

source§

fn chunk_mut(&mut self) -> &mut UninitSlice

source§

unsafe fn advance_mut(&mut self, cnt: usize)

source§

fn put_slice(&mut self, src: &[u8])

source§

fn put_u8(&mut self, n: u8)

source§

fn put_i8(&mut self, n: i8)

source§

fn put_u16(&mut self, n: u16)

source§

fn put_u16_le(&mut self, n: u16)

source§

fn put_u16_ne(&mut self, n: u16)

source§

fn put_i16(&mut self, n: i16)

source§

fn put_i16_le(&mut self, n: i16)

source§

fn put_i16_ne(&mut self, n: i16)

source§

fn put_u32(&mut self, n: u32)

source§

fn put_u32_le(&mut self, n: u32)

source§

fn put_u32_ne(&mut self, n: u32)

source§

fn put_i32(&mut self, n: i32)

source§

fn put_i32_le(&mut self, n: i32)

source§

fn put_i32_ne(&mut self, n: i32)

source§

fn put_u64(&mut self, n: u64)

source§

fn put_u64_le(&mut self, n: u64)

source§

fn put_u64_ne(&mut self, n: u64)

source§

fn put_i64(&mut self, n: i64)

source§

fn put_i64_le(&mut self, n: i64)

source§

fn put_i64_ne(&mut self, n: i64)

source§

impl<T: BufMut + ?Sized> BufMut for Box<T>

source§

fn remaining_mut(&self) -> usize

source§

fn chunk_mut(&mut self) -> &mut UninitSlice

source§

unsafe fn advance_mut(&mut self, cnt: usize)

source§

fn put_slice(&mut self, src: &[u8])

source§

fn put_u8(&mut self, n: u8)

source§

fn put_i8(&mut self, n: i8)

source§

fn put_u16(&mut self, n: u16)

source§

fn put_u16_le(&mut self, n: u16)

source§

fn put_u16_ne(&mut self, n: u16)

source§

fn put_i16(&mut self, n: i16)

source§

fn put_i16_le(&mut self, n: i16)

source§

fn put_i16_ne(&mut self, n: i16)

source§

fn put_u32(&mut self, n: u32)

source§

fn put_u32_le(&mut self, n: u32)

source§

fn put_u32_ne(&mut self, n: u32)

source§

fn put_i32(&mut self, n: i32)

source§

fn put_i32_le(&mut self, n: i32)

source§

fn put_i32_ne(&mut self, n: i32)

source§

fn put_u64(&mut self, n: u64)

source§

fn put_u64_le(&mut self, n: u64)

source§

fn put_u64_ne(&mut self, n: u64)

source§

fn put_i64(&mut self, n: i64)

source§

fn put_i64_le(&mut self, n: i64)

source§

fn put_i64_ne(&mut self, n: i64)

Implementors§

source§

impl BufMut for BytesMut

source§

impl<T, U> BufMut for Chain<T, U>where +assert_eq!(&a[..], b"hello"); +assert_eq!(&b[..], b" world");

+

Implementations on Foreign Types§

source§

impl BufMut for &mut [u8]

source§

fn remaining_mut(&self) -> usize

source§

fn chunk_mut(&mut self) -> &mut UninitSlice

source§

unsafe fn advance_mut(&mut self, cnt: usize)

source§

fn put_slice(&mut self, src: &[u8])

source§

fn put_bytes(&mut self, val: u8, cnt: usize)

source§

impl BufMut for &mut [MaybeUninit<u8>]

source§

fn remaining_mut(&self) -> usize

source§

fn chunk_mut(&mut self) -> &mut UninitSlice

source§

unsafe fn advance_mut(&mut self, cnt: usize)

source§

fn put_slice(&mut self, src: &[u8])

source§

fn put_bytes(&mut self, val: u8, cnt: usize)

source§

impl BufMut for Vec<u8>

source§

fn remaining_mut(&self) -> usize

source§

unsafe fn advance_mut(&mut self, cnt: usize)

source§

fn chunk_mut(&mut self) -> &mut UninitSlice

source§

fn put<T: Buf>(&mut self, src: T)
where + Self: Sized,

source§

fn put_slice(&mut self, src: &[u8])

source§

fn put_bytes(&mut self, val: u8, cnt: usize)

source§

impl<T: BufMut + ?Sized> BufMut for &mut T

source§

fn remaining_mut(&self) -> usize

source§

fn chunk_mut(&mut self) -> &mut UninitSlice

source§

unsafe fn advance_mut(&mut self, cnt: usize)

source§

fn put_slice(&mut self, src: &[u8])

source§

fn put_u8(&mut self, n: u8)

source§

fn put_i8(&mut self, n: i8)

source§

fn put_u16(&mut self, n: u16)

source§

fn put_u16_le(&mut self, n: u16)

source§

fn put_u16_ne(&mut self, n: u16)

source§

fn put_i16(&mut self, n: i16)

source§

fn put_i16_le(&mut self, n: i16)

source§

fn put_i16_ne(&mut self, n: i16)

source§

fn put_u32(&mut self, n: u32)

source§

fn put_u32_le(&mut self, n: u32)

source§

fn put_u32_ne(&mut self, n: u32)

source§

fn put_i32(&mut self, n: i32)

source§

fn put_i32_le(&mut self, n: i32)

source§

fn put_i32_ne(&mut self, n: i32)

source§

fn put_u64(&mut self, n: u64)

source§

fn put_u64_le(&mut self, n: u64)

source§

fn put_u64_ne(&mut self, n: u64)

source§

fn put_i64(&mut self, n: i64)

source§

fn put_i64_le(&mut self, n: i64)

source§

fn put_i64_ne(&mut self, n: i64)

source§

impl<T: BufMut + ?Sized> BufMut for Box<T>

source§

fn remaining_mut(&self) -> usize

source§

fn chunk_mut(&mut self) -> &mut UninitSlice

source§

unsafe fn advance_mut(&mut self, cnt: usize)

source§

fn put_slice(&mut self, src: &[u8])

source§

fn put_u8(&mut self, n: u8)

source§

fn put_i8(&mut self, n: i8)

source§

fn put_u16(&mut self, n: u16)

source§

fn put_u16_le(&mut self, n: u16)

source§

fn put_u16_ne(&mut self, n: u16)

source§

fn put_i16(&mut self, n: i16)

source§

fn put_i16_le(&mut self, n: i16)

source§

fn put_i16_ne(&mut self, n: i16)

source§

fn put_u32(&mut self, n: u32)

source§

fn put_u32_le(&mut self, n: u32)

source§

fn put_u32_ne(&mut self, n: u32)

source§

fn put_i32(&mut self, n: i32)

source§

fn put_i32_le(&mut self, n: i32)

source§

fn put_i32_ne(&mut self, n: i32)

source§

fn put_u64(&mut self, n: u64)

source§

fn put_u64_le(&mut self, n: u64)

source§

fn put_u64_ne(&mut self, n: u64)

source§

fn put_i64(&mut self, n: i64)

source§

fn put_i64_le(&mut self, n: i64)

source§

fn put_i64_ne(&mut self, n: i64)

Implementors§

source§

impl BufMut for BytesMut

source§

impl<T, U> BufMut for Chain<T, U>
where T: BufMut, - U: BufMut,

source§

impl<T: BufMut> BufMut for Limit<T>

\ No newline at end of file + U: BufMut,
source§

impl<T: BufMut> BufMut for Limit<T>

\ No newline at end of file diff --git a/bytes/index.html b/bytes/index.html index 903a4be4a..d4ca9b15a 100644 --- a/bytes/index.html +++ b/bytes/index.html @@ -1,5 +1,6 @@ -bytes - Rust

Crate bytes

source ·
Expand description

Provides abstractions for working with bytes.

+bytes - Rust +

Crate bytes

source ·
Expand description

Provides abstractions for working with bytes.

The bytes crate provides an efficient byte buffer structure (Bytes) and traits for working with buffer implementations (Buf, BufMut).

@@ -18,16 +19,16 @@

Bytes

use bytes::{BytesMut, BufMut};
 
 let mut buf = BytesMut::with_capacity(1024);
-buf.put(&b"hello world"[..]);
+buf.put(&b"hello world"[..]);
 buf.put_u16(1234);
 
 let a = buf.split();
-assert_eq!(a, b"hello world\x04\xD2"[..]);
+assert_eq!(a, b"hello world\x04\xD2"[..]);
 
-buf.put(&b"goodbye world"[..]);
+buf.put(&b"goodbye world"[..]);
 
 let b = buf.split();
-assert_eq!(b, b"goodbye world"[..]);
+assert_eq!(b, b"goodbye world"[..]);
 
 assert_eq!(buf.capacity(), 998);

In the above example, only a single buffer of 1024 is allocated. The handles @@ -48,4 +49,4 @@

Re argument to Read::read and Write::write. Read and Write may then perform a syscall, which has the potential of failing. Operations on Buf and BufMut are infallible.

-

Re-exports

  • pub use crate::buf::Buf;
  • pub use crate::buf::BufMut;

Modules

  • Utilities for working with buffers.

Structs

  • A cheaply cloneable and sliceable chunk of contiguous memory.
  • A unique reference to a contiguous slice of memory.
\ No newline at end of file +

Re-exports

  • pub use crate::buf::Buf;
  • pub use crate::buf::BufMut;

Modules

  • Utilities for working with buffers.

Structs

  • A cheaply cloneable and sliceable chunk of contiguous memory.
  • A unique reference to a contiguous slice of memory.
\ No newline at end of file diff --git a/bytes/struct.Bytes.html b/bytes/struct.Bytes.html index 03c47e793..c2eb4cd78 100644 --- a/bytes/struct.Bytes.html +++ b/bytes/struct.Bytes.html @@ -1,4 +1,5 @@ -Bytes in bytes - Rust

Struct bytes::Bytes

source ·
pub struct Bytes { /* private fields */ }
Expand description

A cheaply cloneable and sliceable chunk of contiguous memory.

+Bytes in bytes - Rust +

Struct bytes::Bytes

source ·
pub struct Bytes { /* private fields */ }
Expand description

A cheaply cloneable and sliceable chunk of contiguous memory.

Bytes is an efficient container for storing and operating on contiguous slices of memory. It is intended for use primarily in networking code, but could have applications elsewhere as well.

@@ -16,15 +17,15 @@
use bytes::Bytes;
 
-let mut mem = Bytes::from("Hello world");
+let mut mem = Bytes::from("Hello world");
 let a = mem.slice(0..5);
 
-assert_eq!(a, "Hello");
+assert_eq!(a, "Hello");
 
 let b = mem.split_to(6);
 
-assert_eq!(mem, "world");
-assert_eq!(b, "Hello ");
+assert_eq!(mem, "world"); +assert_eq!(b, "Hello ");

Memory layout

The Bytes struct itself is fairly small, limited to 4 usize fields used to track information about which segment of the underlying memory the @@ -63,49 +64,49 @@

Sharing

┌─────┬─────┬───────────┬───────────────┬─────┐ │ Arc │ │ │ │ │ └─────┴─────┴───────────┴───────────────┴─────┘ -

Implementations§

source§

impl Bytes

source

pub const fn new() -> Self

Creates a new empty Bytes.

+

Implementations§

source§

impl Bytes

source

pub const fn new() -> Self

Creates a new empty Bytes.

This will not allocate and the returned Bytes handle will be empty.

Examples
use bytes::Bytes;
 
 let b = Bytes::new();
-assert_eq!(&b[..], b"");
-
source

pub const fn from_static(bytes: &'static [u8]) -> Self

Creates a new Bytes from a static slice.

+assert_eq!(&b[..], b"");
+
source

pub const fn from_static(bytes: &'static [u8]) -> Self

Creates a new Bytes from a static slice.

The returned Bytes will point directly to the static slice. There is no allocating or copying.

Examples
use bytes::Bytes;
 
-let b = Bytes::from_static(b"hello");
-assert_eq!(&b[..], b"hello");
-
source

pub const fn len(&self) -> usize

Returns the number of bytes contained in this Bytes.

+let b = Bytes::from_static(b"hello"); +assert_eq!(&b[..], b"hello");
+
source

pub const fn len(&self) -> usize

Returns the number of bytes contained in this Bytes.

Examples
use bytes::Bytes;
 
-let b = Bytes::from(&b"hello"[..]);
+let b = Bytes::from(&b"hello"[..]);
 assert_eq!(b.len(), 5);
-
source

pub const fn is_empty(&self) -> bool

Returns true if the Bytes has a length of 0.

+
source

pub const fn is_empty(&self) -> bool

Returns true if the Bytes has a length of 0.

Examples
use bytes::Bytes;
 
 let b = Bytes::new();
 assert!(b.is_empty());
-
source

pub fn copy_from_slice(data: &[u8]) -> Self

Creates Bytes instance from slice, by copying it.

-
source

pub fn slice(&self, range: impl RangeBounds<usize>) -> Self

Returns a slice of self for the provided range.

+
source

pub fn copy_from_slice(data: &[u8]) -> Self

Creates Bytes instance from slice, by copying it.

+
source

pub fn slice(&self, range: impl RangeBounds<usize>) -> Self

Returns a slice of self for the provided range.

This will increment the reference count for the underlying memory and return a new Bytes handle set to the slice.

This operation is O(1).

Examples
use bytes::Bytes;
 
-let a = Bytes::from(&b"hello world"[..]);
+let a = Bytes::from(&b"hello world"[..]);
 let b = a.slice(2..5);
 
-assert_eq!(&b[..], b"llo");
+assert_eq!(&b[..], b"llo");
Panics

Requires that begin <= end and end <= self.len(), otherwise slicing will panic.

-
source

pub fn slice_ref(&self, subset: &[u8]) -> Self

Returns a slice of self that is equivalent to the given subset.

+
source

pub fn slice_ref(&self, subset: &[u8]) -> Self

Returns a slice of self that is equivalent to the given subset.

When processing a Bytes buffer with other tools, one often gets a &[u8] which is in fact a slice of the Bytes, i.e. a subset of it. This function turns that &[u8] into another Bytes, as if one had @@ -114,15 +115,15 @@

Panics
Examples
use bytes::Bytes;
 
-let bytes = Bytes::from(&b"012345678"[..]);
+let bytes = Bytes::from(&b"012345678"[..]);
 let as_slice = bytes.as_ref();
 let subset = &as_slice[2..6];
 let subslice = bytes.slice_ref(&subset);
-assert_eq!(&subslice[..], b"2345");
+assert_eq!(&subslice[..], b"2345");
Panics

Requires that the given sub slice is in fact contained within the Bytes buffer; otherwise this function will panic.

-
source

pub fn split_off(&mut self, at: usize) -> Self

Splits the bytes into two at the given index.

+
source

pub fn split_off(&mut self, at: usize) -> Self

Splits the bytes into two at the given index.

Afterwards self contains elements [0, at), and the returned Bytes contains elements [at, len).

This is an O(1) operation that just increases the reference count and @@ -130,14 +131,14 @@

Panics
Examples
use bytes::Bytes;
 
-let mut a = Bytes::from(&b"hello world"[..]);
+let mut a = Bytes::from(&b"hello world"[..]);
 let b = a.split_off(5);
 
-assert_eq!(&a[..], b"hello");
-assert_eq!(&b[..], b" world");
+assert_eq!(&a[..], b"hello"); +assert_eq!(&b[..], b" world");
Panics

Panics if at > len.

-
source

pub fn split_to(&mut self, at: usize) -> Self

Splits the bytes into two at the given index.

+
source

pub fn split_to(&mut self, at: usize) -> Self

Splits the bytes into two at the given index.

Afterwards self contains elements [at, len), and the returned Bytes contains elements [0, at).

This is an O(1) operation that just increases the reference count and @@ -145,14 +146,14 @@

Panics
Examples
use bytes::Bytes;
 
-let mut a = Bytes::from(&b"hello world"[..]);
+let mut a = Bytes::from(&b"hello world"[..]);
 let b = a.split_to(5);
 
-assert_eq!(&a[..], b" world");
-assert_eq!(&b[..], b"hello");
+assert_eq!(&a[..], b" world"); +assert_eq!(&b[..], b"hello");
Panics

Panics if at > len.

-
source

pub fn truncate(&mut self, len: usize)

Shortens the buffer, keeping the first len bytes and dropping the +

source

pub fn truncate(&mut self, len: usize)

Shortens the buffer, keeping the first len bytes and dropping the rest.

If len is greater than the buffer’s current length, this has no effect.

@@ -161,77 +162,103 @@
Panics
Examples
use bytes::Bytes;
 
-let mut buf = Bytes::from(&b"hello world"[..]);
+let mut buf = Bytes::from(&b"hello world"[..]);
 buf.truncate(5);
-assert_eq!(buf, b"hello"[..]);
+assert_eq!(buf, b"hello"[..]);
source

pub fn clear(&mut self)

Clears the buffer, removing all data.

Examples
use bytes::Bytes;
 
-let mut buf = Bytes::from(&b"hello world"[..]);
+let mut buf = Bytes::from(&b"hello world"[..]);
 buf.clear();
 assert!(buf.is_empty());
-

Methods from Deref<Target = [u8]>§

source

pub fn flatten(&self) -> &[T]

🔬This is a nightly-only experimental API. (slice_flatten)

Takes a &[[T; N]], and flattens it to a &[T].

-
Panics
-

This panics if the length of the resulting slice would overflow a usize.

-

This is only possible when flattening a slice of arrays of zero-sized -types, and thus tends to be irrelevant in practice. If -size_of::<T>() > 0, this will never panic.

+

Methods from Deref<Target = [u8]>§

source

pub fn as_str(&self) -> &str

🔬This is a nightly-only experimental API. (ascii_char)

Views this slice of ASCII characters as a UTF-8 str.

+
source

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

🔬This is a nightly-only experimental API. (ascii_char)

Views this slice of ASCII characters as a slice of u8 bytes.

+
1.23.0 · source

pub fn is_ascii(&self) -> bool

Checks if all bytes in this slice are within the ASCII range.

+
source

pub fn as_ascii(&self) -> Option<&[AsciiChar]>

🔬This is a nightly-only experimental API. (ascii_char)

If this slice is_ascii, returns it as a slice of +ASCII characters, otherwise returns None.

+
source

pub unsafe fn as_ascii_unchecked(&self) -> &[AsciiChar]

🔬This is a nightly-only experimental API. (ascii_char)

Converts this slice of bytes into a slice of ASCII characters, +without checking whether they’re valid.

+
Safety
+

Every byte in the slice must be in 0..=127, or else this is UB.

+
1.23.0 · source

pub fn eq_ignore_ascii_case(&self, other: &[u8]) -> bool

Checks that two slices are an ASCII case-insensitive match.

+

Same as to_ascii_lowercase(a) == to_ascii_lowercase(b), +but without allocating and copying temporaries.

+
1.60.0 · source

pub fn escape_ascii(&self) -> EscapeAscii<'_>

Returns an iterator that produces an escaped version of this slice, +treating it as an ASCII string.

Examples
-
#![feature(slice_flatten)]
-
-assert_eq!([[1, 2, 3], [4, 5, 6]].flatten(), &[1, 2, 3, 4, 5, 6]);
+

+let s = b"0\t\r\n'\"\\\x9d";
+let escaped = s.escape_ascii().to_string();
+assert_eq!(escaped, "0\\t\\r\\n\\'\\\"\\\\\\x9d");
+
source

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

🔬This is a nightly-only experimental API. (byte_slice_trim_ascii)

Returns a byte slice with leading ASCII whitespace bytes removed.

+

‘Whitespace’ refers to the definition used by +u8::is_ascii_whitespace.

+
Examples
+
#![feature(byte_slice_trim_ascii)]
 
-assert_eq!(
-    [[1, 2, 3], [4, 5, 6]].flatten(),
-    [[1, 2], [3, 4], [5, 6]].flatten(),
-);
+assert_eq!(b" \t hello world\n".trim_ascii_start(), b"hello world\n");
+assert_eq!(b"  ".trim_ascii_start(), b"");
+assert_eq!(b"".trim_ascii_start(), b"");
+
source

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

🔬This is a nightly-only experimental API. (byte_slice_trim_ascii)

Returns a byte slice with trailing ASCII whitespace bytes removed.

+

‘Whitespace’ refers to the definition used by +u8::is_ascii_whitespace.

+
Examples
+
#![feature(byte_slice_trim_ascii)]
 
-let slice_of_empty_arrays: &[[i32; 0]] = &[[], [], [], [], []];
-assert!(slice_of_empty_arrays.flatten().is_empty());
+assert_eq!(b"\r hello world\n ".trim_ascii_end(), b"\r hello world");
+assert_eq!(b"  ".trim_ascii_end(), b"");
+assert_eq!(b"".trim_ascii_end(), b"");
+
source

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

🔬This is a nightly-only experimental API. (byte_slice_trim_ascii)

Returns a byte slice with leading and trailing ASCII whitespace bytes +removed.

+

‘Whitespace’ refers to the definition used by +u8::is_ascii_whitespace.

+
Examples
+
#![feature(byte_slice_trim_ascii)]
 
-let empty_slice_of_arrays: &[[u32; 10]] = &[];
-assert!(empty_slice_of_arrays.flatten().is_empty());
-
1.0.0 · source

pub fn len(&self) -> usize

Returns the number of elements in the slice.

-
Examples
+assert_eq!(b"\r hello world\n ".trim_ascii(), b"hello world"); +assert_eq!(b" ".trim_ascii(), b""); +assert_eq!(b"".trim_ascii(), b"");
+
1.0.0 · source

pub fn len(&self) -> usize

Returns the number of elements in the slice.

+
Examples
let a = [1, 2, 3];
 assert_eq!(a.len(), 3);
-
1.0.0 · source

pub fn is_empty(&self) -> bool

Returns true if the slice has a length of 0.

-
Examples
+
1.0.0 · source

pub fn is_empty(&self) -> bool

Returns true if the slice has a length of 0.

+
Examples
let a = [1, 2, 3];
 assert!(!a.is_empty());
-
1.0.0 · source

pub fn first(&self) -> Option<&T>

Returns the first element of the slice, or None if it is empty.

-
Examples
+
1.0.0 · source

pub fn first(&self) -> Option<&T>

Returns the first element of the slice, or None if it is empty.

+
Examples
let v = [10, 40, 30];
 assert_eq!(Some(&10), v.first());
 
 let w: &[i32] = &[];
 assert_eq!(None, w.first());
-
1.5.0 · source

pub 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.

-
Examples
+
1.5.0 · source

pub 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.

+
Examples
let x = &[0, 1, 2];
 
 if let Some((first, elements)) = x.split_first() {
     assert_eq!(first, &0);
     assert_eq!(elements, &[1, 2]);
 }
-
1.5.0 · source

pub 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.

-
Examples
+
1.5.0 · source

pub 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.

+
Examples
let x = &[0, 1, 2];
 
 if let Some((last, elements)) = x.split_last() {
     assert_eq!(last, &2);
     assert_eq!(elements, &[0, 1]);
 }
-
1.0.0 · source

pub fn last(&self) -> Option<&T>

Returns the last element of the slice, or None if it is empty.

-
Examples
+
1.0.0 · source

pub fn last(&self) -> Option<&T>

Returns the last element of the slice, or None if it is empty.

+
Examples
let v = [10, 40, 30];
 assert_eq!(Some(&30), v.last());
 
 let w: &[i32] = &[];
 assert_eq!(None, w.last());
-
source

pub fn first_chunk<const N: usize>(&self) -> Option<&[T; N]>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns the first N elements of the slice, or None if it has fewer than N elements.

-
Examples
+
source

pub fn first_chunk<const N: usize>(&self) -> Option<&[T; N]>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns the first N elements of the slice, or None if it has fewer than N elements.

+
Examples
#![feature(slice_first_last_chunk)]
 
 let u = [10, 40, 30];
@@ -242,9 +269,9 @@ 
Examples
let w: &[i32] = &[]; assert_eq!(Some(&[]), w.first_chunk::<0>());
-
source

pub fn split_first_chunk<const N: usize>(&self) -> Option<(&[T; N], &[T])>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns the first N elements of the slice and the remainder, +

source

pub fn split_first_chunk<const N: usize>(&self) -> Option<(&[T; N], &[T])>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns the first N elements of the slice and the remainder, or None if it has fewer than N elements.

-
Examples
+
Examples
#![feature(slice_first_last_chunk)]
 
 let x = &[0, 1, 2];
@@ -253,9 +280,9 @@ 
Examples
assert_eq!(first, &[0, 1]); assert_eq!(elements, &[2]); }
-
source

pub fn split_last_chunk<const N: usize>(&self) -> Option<(&[T; N], &[T])>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns the last N elements of the slice and the remainder, +

source

pub fn split_last_chunk<const N: usize>(&self) -> Option<(&[T; N], &[T])>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns the last N elements of the slice and the remainder, or None if it has fewer than N elements.

-
Examples
+
Examples
#![feature(slice_first_last_chunk)]
 
 let x = &[0, 1, 2];
@@ -264,8 +291,8 @@ 
Examples
assert_eq!(last, &[1, 2]); assert_eq!(elements, &[0]); }
-
source

pub fn last_chunk<const N: usize>(&self) -> Option<&[T; N]>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns the last element of the slice, or None if it is empty.

-
Examples
+
source

pub fn last_chunk<const N: usize>(&self) -> Option<&[T; N]>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns the last element of the slice, or None if it is empty.

+
Examples
#![feature(slice_first_last_chunk)]
 
 let u = [10, 40, 30];
@@ -276,8 +303,8 @@ 
Examples
let w: &[i32] = &[]; assert_eq!(Some(&[]), w.last_chunk::<0>());
-
1.0.0 · source

pub fn get<I>(&self, index: I) -> Option<&<I as SliceIndex<[T]>>::Output>where - I: SliceIndex<[T]>,

Returns a reference to an element or subslice depending on the type of +

1.0.0 · source

pub fn get<I>(&self, index: I) -> Option<&<I as SliceIndex<[T]>>::Output>
where + I: SliceIndex<[T]>,

Returns a reference to an element or subslice depending on the type of index.

  • If given a position, returns a reference to the element at that @@ -285,41 +312,41 @@
    Examples
  • If given a range, returns the subslice corresponding to that range, or None if out of bounds.
-
Examples
+
Examples
let v = [10, 40, 30];
 assert_eq!(Some(&40), v.get(1));
 assert_eq!(Some(&[10, 40][..]), v.get(0..2));
 assert_eq!(None, v.get(3));
 assert_eq!(None, v.get(0..4));
-
1.0.0 · source

pub unsafe fn get_unchecked<I>( +

1.0.0 · source

pub unsafe fn get_unchecked<I>( &self, index: I -) -> &<I as SliceIndex<[T]>>::Outputwhere - I: SliceIndex<[T]>,

Returns a reference to an element or subslice, without doing bounds +) -> &<I as SliceIndex<[T]>>::Output

where + I: SliceIndex<[T]>,

Returns a reference to an element or subslice, without doing bounds checking.

-

For a safe alternative see get.

-
Safety
+

For a safe alternative see get.

+
Safety

Calling this method with an out-of-bounds index is undefined behavior even if the resulting reference is not used.

You can think of this like .get(index).unwrap_unchecked(). It’s UB to call .get_unchecked(len), even if you immediately convert to a pointer. And it’s UB to call .get_unchecked(..len + 1), .get_unchecked(..=len), or similar.

-
Examples
+
Examples
let x = &[1, 2, 4];
 
 unsafe {
     assert_eq!(x.get_unchecked(1), &2);
 }
-
1.0.0 · source

pub fn as_ptr(&self) -> *const T

Returns a raw pointer to the slice’s buffer.

+
1.0.0 · source

pub fn as_ptr(&self) -> *const T

Returns a raw pointer to the slice’s buffer.

The caller must ensure that the slice outlives the pointer this function returns, or else it will end up pointing to garbage.

The caller must also ensure that the memory the pointer (non-transitively) points to is never written to (except inside an UnsafeCell) using this pointer or any pointer -derived from it. If you need to mutate the contents of the slice, use as_mut_ptr.

+derived from it. If you need to mutate the contents of the slice, use as_mut_ptr.

Modifying the container referenced by this slice may cause its buffer to be reallocated, which would also make any pointers to it invalid.

-
Examples
+
Examples
let x = &[1, 2, 4];
 let x_ptr = x.as_ptr();
 
@@ -328,12 +355,12 @@ 
Examples
assert_eq!(x.get_unchecked(i), &*x_ptr.add(i)); } }
-
1.48.0 · source

pub fn as_ptr_range(&self) -> Range<*const T>

Returns the two raw pointers spanning the slice.

+
1.48.0 · source

pub fn as_ptr_range(&self) -> Range<*const T>

Returns the two raw pointers spanning the slice.

The returned range is half-open, which means that the end pointer points one past the last element of the slice. This way, an empty slice is represented by two equal pointers, and the difference between the two pointers represents the size of the slice.

-

See as_ptr for warnings on using these pointers. The end pointer +

See as_ptr for warnings on using these pointers. The end pointer requires extra caution, as it does not point to a valid element in the slice.

This function is useful for interacting with foreign interfaces which @@ -348,9 +375,9 @@

Examples
assert!(a.as_ptr_range().contains(&x)); assert!(!a.as_ptr_range().contains(&y));
-
1.0.0 · source

pub fn iter(&self) -> Iter<'_, T>

Returns an iterator over the slice.

+
1.0.0 · source

pub fn iter(&self) -> Iter<'_, T>

Returns an iterator over the slice.

The iterator yields all items from start to end.

-
Examples
+
Examples
let x = &[1, 2, 4];
 let mut iterator = x.iter();
 
@@ -358,152 +385,152 @@ 
Examples
assert_eq!(iterator.next(), Some(&2)); assert_eq!(iterator.next(), Some(&4)); assert_eq!(iterator.next(), None);
-
1.0.0 · source

pub fn windows(&self, size: usize) -> Windows<'_, T>

Returns an iterator over all contiguous windows of length +

1.0.0 · source

pub fn windows(&self, size: usize) -> Windows<'_, T>

Returns an iterator over all contiguous windows of length size. The windows overlap. If the slice is shorter than size, the iterator returns no values.

-
Panics
+
Panics

Panics if size is 0.

-
Examples
-
let slice = ['r', 'u', 's', 't'];
-let mut iter = slice.windows(2);
-assert_eq!(iter.next().unwrap(), &['r', 'u']);
-assert_eq!(iter.next().unwrap(), &['u', 's']);
-assert_eq!(iter.next().unwrap(), &['s', 't']);
+
Examples
+
let slice = ['l', 'o', 'r', 'e', 'm'];
+let mut iter = slice.windows(3);
+assert_eq!(iter.next().unwrap(), &['l', 'o', 'r']);
+assert_eq!(iter.next().unwrap(), &['o', 'r', 'e']);
+assert_eq!(iter.next().unwrap(), &['r', 'e', 'm']);
 assert!(iter.next().is_none());

If the slice is shorter than size:

-
let slice = ['f', 'o', 'o'];
+
let slice = ['f', 'o', 'o'];
 let mut iter = slice.windows(4);
 assert!(iter.next().is_none());

There’s no windows_mut, as that existing would let safe code violate the “only one &mut at a time to the same thing” rule. However, you can sometimes -use Cell::as_slice_of_cells in +use Cell::as_slice_of_cells in conjunction with windows to accomplish something similar:

use std::cell::Cell;
 
-let mut array = ['R', 'u', 's', 't', ' ', '2', '0', '1', '5'];
+let mut array = ['R', 'u', 's', 't', ' ', '2', '0', '1', '5'];
 let slice = &mut array[..];
 let slice_of_cells: &[Cell<char>] = Cell::from_mut(slice).as_slice_of_cells();
 for w in slice_of_cells.windows(3) {
     Cell::swap(&w[0], &w[2]);
 }
-assert_eq!(array, ['s', 't', ' ', '2', '0', '1', '5', 'u', 'R']);
-
1.0.0 · 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 +assert_eq!(array, ['s', 't', ' ', '2', '0', '1', '5', 'u', 'R']);

+
1.0.0 · 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 beginning of the slice.

The chunks are slices and do not overlap. If chunk_size does not divide the length of the slice, then the last chunk will not have length chunk_size.

-

See chunks_exact for a variant of this iterator that returns chunks of always exactly -chunk_size elements, and rchunks for the same iterator but starting at the end of the +

See chunks_exact for a variant of this iterator that returns chunks of always exactly +chunk_size elements, and rchunks for the same iterator but starting at the end of the slice.

-
Panics
+
Panics

Panics if chunk_size is 0.

-
Examples
-
let slice = ['l', 'o', 'r', 'e', 'm'];
+
Examples
+
let slice = ['l', 'o', 'r', 'e', 'm'];
 let mut iter = slice.chunks(2);
-assert_eq!(iter.next().unwrap(), &['l', 'o']);
-assert_eq!(iter.next().unwrap(), &['r', 'e']);
-assert_eq!(iter.next().unwrap(), &['m']);
+assert_eq!(iter.next().unwrap(), &['l', 'o']);
+assert_eq!(iter.next().unwrap(), &['r', 'e']);
+assert_eq!(iter.next().unwrap(), &['m']);
 assert!(iter.next().is_none());
-
1.31.0 · 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 +

1.31.0 · 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 beginning of the slice.

The chunks are slices and do not overlap. If chunk_size does not divide the length of the slice, then the last up to chunk_size-1 elements will be omitted and can be retrieved from the remainder function of the iterator.

Due to each chunk having exactly chunk_size elements, the compiler can often optimize the -resulting code better than in the case of chunks.

-

See chunks for a variant of this iterator that also returns the remainder as a smaller -chunk, and rchunks_exact for the same iterator but starting at the end of the slice.

-
Panics
+resulting code better than in the case of chunks.

+

See chunks for a variant of this iterator that also returns the remainder as a smaller +chunk, and rchunks_exact for the same iterator but starting at the end of the slice.

+
Panics

Panics if chunk_size is 0.

-
Examples
-
let slice = ['l', 'o', 'r', 'e', 'm'];
+
Examples
+
let slice = ['l', 'o', 'r', 'e', 'm'];
 let mut iter = slice.chunks_exact(2);
-assert_eq!(iter.next().unwrap(), &['l', 'o']);
-assert_eq!(iter.next().unwrap(), &['r', 'e']);
+assert_eq!(iter.next().unwrap(), &['l', 'o']);
+assert_eq!(iter.next().unwrap(), &['r', 'e']);
 assert!(iter.next().is_none());
-assert_eq!(iter.remainder(), &['m']);
-
source

pub unsafe fn as_chunks_unchecked<const N: usize>(&self) -> &[[T; N]]

🔬This is a nightly-only experimental API. (slice_as_chunks)

Splits the slice into a slice of N-element arrays, +assert_eq!(iter.remainder(), &['m']);

+
source

pub unsafe fn as_chunks_unchecked<const N: usize>(&self) -> &[[T; N]]

🔬This is a nightly-only experimental API. (slice_as_chunks)

Splits the slice into a slice of N-element arrays, assuming that there’s no remainder.

-
Safety
+
Safety

This may only be called when

  • The slice splits exactly into N-element chunks (aka self.len() % N == 0).
  • N != 0.
-
Examples
+
Examples
#![feature(slice_as_chunks)]
-let slice: &[char] = &['l', 'o', 'r', 'e', 'm', '!'];
+let slice: &[char] = &['l', 'o', 'r', 'e', 'm', '!'];
 let chunks: &[[char; 1]] =
     // SAFETY: 1-element chunks never have remainder
     unsafe { slice.as_chunks_unchecked() };
-assert_eq!(chunks, &[['l'], ['o'], ['r'], ['e'], ['m'], ['!']]);
+assert_eq!(chunks, &[['l'], ['o'], ['r'], ['e'], ['m'], ['!']]);
 let chunks: &[[char; 3]] =
     // SAFETY: The slice length (6) is a multiple of 3
     unsafe { slice.as_chunks_unchecked() };
-assert_eq!(chunks, &[['l', 'o', 'r'], ['e', 'm', '!']]);
+assert_eq!(chunks, &[['l', 'o', 'r'], ['e', 'm', '!']]);
 
 // These would be unsound:
 // let chunks: &[[_; 5]] = slice.as_chunks_unchecked() // The slice length is not a multiple of 5
 // let chunks: &[[_; 0]] = slice.as_chunks_unchecked() // Zero-length chunks are never allowed
-
source

pub fn as_chunks<const N: usize>(&self) -> (&[[T; N]], &[T])

🔬This is a nightly-only experimental API. (slice_as_chunks)

Splits the slice into a slice of N-element arrays, +

source

pub fn as_chunks<const N: usize>(&self) -> (&[[T; N]], &[T])

🔬This is a nightly-only experimental API. (slice_as_chunks)

Splits the slice into a slice of N-element arrays, starting at the beginning of the slice, and a remainder slice with length strictly less than N.

-
Panics
+
Panics

Panics if N is 0. This check will most probably get changed to a compile time error before this method gets stabilized.

-
Examples
+
Examples
#![feature(slice_as_chunks)]
-let slice = ['l', 'o', 'r', 'e', 'm'];
+let slice = ['l', 'o', 'r', 'e', 'm'];
 let (chunks, remainder) = slice.as_chunks();
-assert_eq!(chunks, &[['l', 'o'], ['r', 'e']]);
-assert_eq!(remainder, &['m']);
+assert_eq!(chunks, &[['l', 'o'], ['r', 'e']]); +assert_eq!(remainder, &['m']);

If you expect the slice to be an exact multiple, you can combine let-else with an empty slice pattern:

#![feature(slice_as_chunks)]
-let slice = ['R', 'u', 's', 't'];
+let slice = ['R', 'u', 's', 't'];
 let (chunks, []) = slice.as_chunks::<2>() else {
-    panic!("slice didn't have even length")
+    panic!("slice didn't have even length")
 };
-assert_eq!(chunks, &[['R', 'u'], ['s', 't']]);
-
source

pub fn as_rchunks<const N: usize>(&self) -> (&[T], &[[T; N]])

🔬This is a nightly-only experimental API. (slice_as_chunks)

Splits the slice into a slice of N-element arrays, +assert_eq!(chunks, &[['R', 'u'], ['s', 't']]);

+
source

pub fn as_rchunks<const N: usize>(&self) -> (&[T], &[[T; N]])

🔬This is a nightly-only experimental API. (slice_as_chunks)

Splits the slice into a slice of N-element arrays, starting at the end of the slice, and a remainder slice with length strictly less than N.

-
Panics
+
Panics

Panics if N is 0. This check will most probably get changed to a compile time error before this method gets stabilized.

-
Examples
+
Examples
#![feature(slice_as_chunks)]
-let slice = ['l', 'o', 'r', 'e', 'm'];
+let slice = ['l', 'o', 'r', 'e', 'm'];
 let (remainder, chunks) = slice.as_rchunks();
-assert_eq!(remainder, &['l']);
-assert_eq!(chunks, &[['o', 'r'], ['e', 'm']]);
-
source

pub fn array_chunks<const N: usize>(&self) -> ArrayChunks<'_, T, N>

🔬This is a nightly-only experimental API. (array_chunks)

Returns an iterator over N elements of the slice at a time, starting at the +assert_eq!(remainder, &['l']); +assert_eq!(chunks, &[['o', 'r'], ['e', 'm']]);

+
source

pub fn array_chunks<const N: usize>(&self) -> ArrayChunks<'_, T, N>

🔬This is a nightly-only experimental API. (array_chunks)

Returns an iterator over N elements of the slice at a time, starting at the beginning of the slice.

The chunks are array references and do not overlap. If N does not divide the length of the slice, then the last up to N-1 elements will be omitted and can be retrieved from the remainder function of the iterator.

-

This method is the const generic equivalent of chunks_exact.

-
Panics
+

This method is the const generic equivalent of chunks_exact.

+
Panics

Panics if N is 0. This check will most probably get changed to a compile time error before this method gets stabilized.

-
Examples
+
Examples
#![feature(array_chunks)]
-let slice = ['l', 'o', 'r', 'e', 'm'];
+let slice = ['l', 'o', 'r', 'e', 'm'];
 let mut iter = slice.array_chunks();
-assert_eq!(iter.next().unwrap(), &['l', 'o']);
-assert_eq!(iter.next().unwrap(), &['r', 'e']);
+assert_eq!(iter.next().unwrap(), &['l', 'o']);
+assert_eq!(iter.next().unwrap(), &['r', 'e']);
 assert!(iter.next().is_none());
-assert_eq!(iter.remainder(), &['m']);
-
source

pub fn array_windows<const N: usize>(&self) -> ArrayWindows<'_, T, N>

🔬This is a nightly-only experimental API. (array_windows)

Returns an iterator over overlapping windows of N elements of a slice, +assert_eq!(iter.remainder(), &['m']);

+
source

pub fn array_windows<const N: usize>(&self) -> ArrayWindows<'_, T, N>

🔬This is a nightly-only experimental API. (array_windows)

Returns an iterator over overlapping windows of N elements of a slice, starting at the beginning of the slice.

-

This is the const generic equivalent of windows.

+

This is the const generic equivalent of windows.

If N is greater than the size of the slice, it will return no windows.

-
Panics
+
Panics

Panics if N is 0. This check will most probably get changed to a compile time error before this method gets stabilized.

-
Examples
+
Examples
#![feature(array_windows)]
 let slice = [0, 1, 2, 3];
 let mut iter = slice.array_windows();
@@ -511,48 +538,48 @@ 
Examples
assert_eq!(iter.next().unwrap(), &[1, 2]); assert_eq!(iter.next().unwrap(), &[2, 3]); assert!(iter.next().is_none());
-
1.31.0 · 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 +

1.31.0 · 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 of the slice.

The chunks are slices and do not overlap. If chunk_size does not divide the length of the slice, then the last chunk will not have length chunk_size.

-

See rchunks_exact for a variant of this iterator that returns chunks of always exactly -chunk_size elements, and chunks for the same iterator but starting at the beginning +

See rchunks_exact for a variant of this iterator that returns chunks of always exactly +chunk_size elements, and chunks for the same iterator but starting at the beginning of the slice.

-
Panics
+
Panics

Panics if chunk_size is 0.

-
Examples
-
let slice = ['l', 'o', 'r', 'e', 'm'];
+
Examples
+
let slice = ['l', 'o', 'r', 'e', 'm'];
 let mut iter = slice.rchunks(2);
-assert_eq!(iter.next().unwrap(), &['e', 'm']);
-assert_eq!(iter.next().unwrap(), &['o', 'r']);
-assert_eq!(iter.next().unwrap(), &['l']);
+assert_eq!(iter.next().unwrap(), &['e', 'm']);
+assert_eq!(iter.next().unwrap(), &['o', 'r']);
+assert_eq!(iter.next().unwrap(), &['l']);
 assert!(iter.next().is_none());
-
1.31.0 · 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 +

1.31.0 · 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 end of the slice.

The chunks are slices and do not overlap. If chunk_size does not divide the length of the slice, then the last up to chunk_size-1 elements will be omitted and can be retrieved from the remainder function of the iterator.

Due to each chunk having exactly chunk_size elements, the compiler can often optimize the -resulting code better than in the case of rchunks.

-

See rchunks for a variant of this iterator that also returns the remainder as a smaller -chunk, and chunks_exact for the same iterator but starting at the beginning of the +resulting code better than in the case of rchunks.

+

See rchunks for a variant of this iterator that also returns the remainder as a smaller +chunk, and chunks_exact for the same iterator but starting at the beginning of the slice.

-
Panics
+
Panics

Panics if chunk_size is 0.

-
Examples
-
let slice = ['l', 'o', 'r', 'e', 'm'];
+
Examples
+
let slice = ['l', 'o', 'r', 'e', 'm'];
 let mut iter = slice.rchunks_exact(2);
-assert_eq!(iter.next().unwrap(), &['e', 'm']);
-assert_eq!(iter.next().unwrap(), &['o', 'r']);
+assert_eq!(iter.next().unwrap(), &['e', 'm']);
+assert_eq!(iter.next().unwrap(), &['o', 'r']);
 assert!(iter.next().is_none());
-assert_eq!(iter.remainder(), &['l']);
-
source

pub fn group_by<F>(&self, pred: F) -> GroupBy<'_, T, F>where - F: FnMut(&T, &T) -> bool,

🔬This is a nightly-only experimental API. (slice_group_by)

Returns an iterator over the slice producing non-overlapping runs +assert_eq!(iter.remainder(), &['l']);

+
source

pub fn group_by<F>(&self, pred: F) -> GroupBy<'_, T, F>
where + F: FnMut(&T, &T) -> bool,

🔬This is a nightly-only experimental API. (slice_group_by)

Returns an iterator over the slice producing non-overlapping runs of elements using the predicate to separate them.

The predicate is called on two elements following themselves, it means the predicate is called on slice[0] and slice[1] then on slice[1] and slice[2] and so on.

-
Examples
+
Examples
#![feature(slice_group_by)]
 
 let slice = &[1, 1, 1, 3, 3, 2, 2, 2];
@@ -575,13 +602,13 @@ 
Examples
assert_eq!(iter.next(), Some(&[2, 3][..])); assert_eq!(iter.next(), Some(&[2, 3, 4][..])); assert_eq!(iter.next(), None);
-
1.0.0 · source

pub fn split_at(&self, mid: usize) -> (&[T], &[T])

Divides one slice into two at an index.

+
1.0.0 · source

pub fn split_at(&self, mid: usize) -> (&[T], &[T])

Divides one slice into two at an index.

The first will contain all indices from [0, mid) (excluding the index mid itself) and the second will contain all indices from [mid, len) (excluding the index len itself).

-
Panics
+
Panics

Panics if mid > len.

-
Examples
+
Examples
let v = [1, 2, 3, 4, 5, 6];
 
 {
@@ -601,16 +628,16 @@ 
Examples
assert_eq!(left, [1, 2, 3, 4, 5, 6]); assert_eq!(right, []); }
-
source

pub unsafe fn split_at_unchecked(&self, mid: usize) -> (&[T], &[T])

🔬This is a nightly-only experimental API. (slice_split_at_unchecked)

Divides one slice into two at an index, without doing bounds checking.

+
source

pub unsafe fn split_at_unchecked(&self, mid: usize) -> (&[T], &[T])

🔬This is a nightly-only experimental API. (slice_split_at_unchecked)

Divides one slice into two at an index, without doing bounds checking.

The first will contain all indices from [0, mid) (excluding the index mid itself) and the second will contain all indices from [mid, len) (excluding the index len itself).

-

For a safe alternative see split_at.

-
Safety
+

For a safe alternative see split_at.

+
Safety

Calling this method with an out-of-bounds index is undefined behavior even if the resulting reference is not used. The caller has to ensure that 0 <= mid <= self.len().

-
Examples
+
Examples
#![feature(slice_split_at_unchecked)]
 
 let v = [1, 2, 3, 4, 5, 6];
@@ -632,13 +659,13 @@ 
Examples
assert_eq!(left, [1, 2, 3, 4, 5, 6]); assert_eq!(right, []); }
-
source

pub fn split_array_ref<const N: usize>(&self) -> (&[T; N], &[T])

🔬This is a nightly-only experimental API. (split_array)

Divides one slice into an array and a remainder slice at an index.

+
source

pub fn split_array_ref<const N: usize>(&self) -> (&[T; N], &[T])

🔬This is a nightly-only experimental API. (split_array)

Divides one slice into an array and a remainder slice at an index.

The array will contain all indices from [0, N) (excluding the index N itself) and the slice will contain all indices from [N, len) (excluding the index len itself).

-
Panics
+
Panics

Panics if N > len.

-
Examples
+
Examples
#![feature(split_array)]
 
 let v = &[1, 2, 3, 4, 5, 6][..];
@@ -660,14 +687,14 @@ 
Examples
assert_eq!(left, &[1, 2, 3, 4, 5, 6]); assert_eq!(right, []); }
-
source

pub fn rsplit_array_ref<const N: usize>(&self) -> (&[T], &[T; N])

🔬This is a nightly-only experimental API. (split_array)

Divides one slice into an array and a remainder slice at an index from +

source

pub fn rsplit_array_ref<const N: usize>(&self) -> (&[T], &[T; N])

🔬This is a nightly-only experimental API. (split_array)

Divides one slice into an array and a remainder slice at an index from the end.

The slice will contain all indices from [0, len - N) (excluding the index len - N itself) and the array will contain all indices from [len - N, len) (excluding the index len itself).

-
Panics
+
Panics

Panics if N > len.

-
Examples
+
Examples
#![feature(split_array)]
 
 let v = &[1, 2, 3, 4, 5, 6][..];
@@ -689,10 +716,10 @@ 
Examples
assert_eq!(left, []); assert_eq!(right, &[1, 2, 3, 4, 5, 6]); }
-
1.0.0 · source

pub fn split<F>(&self, pred: F) -> Split<'_, T, F>where - F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match +

1.0.0 · source

pub fn split<F>(&self, pred: F) -> Split<'_, T, F>
where + F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match pred. The matched element is not contained in the subslices.

-
Examples
+
Examples
let slice = [10, 40, 33, 20];
 let mut iter = slice.split(|num| num % 3 == 0);
 
@@ -720,11 +747,11 @@ 
Examples
assert_eq!(iter.next().unwrap(), &[]); assert_eq!(iter.next().unwrap(), &[20]); assert!(iter.next().is_none());
-
1.51.0 · source

pub fn split_inclusive<F>(&self, pred: F) -> SplitInclusive<'_, T, F>where - F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match +

1.51.0 · source

pub fn split_inclusive<F>(&self, pred: F) -> SplitInclusive<'_, T, F>
where + F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match pred. The matched element is contained in the end of the previous subslice as a terminator.

-
Examples
+
Examples
let slice = [10, 40, 33, 20];
 let mut iter = slice.split_inclusive(|num| num % 3 == 0);
 
@@ -741,11 +768,11 @@ 
Examples
assert_eq!(iter.next().unwrap(), &[3]); assert_eq!(iter.next().unwrap(), &[10, 40, 33]); assert!(iter.next().is_none());
-
1.27.0 · source

pub fn rsplit<F>(&self, pred: F) -> RSplit<'_, T, F>where - F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match +

1.27.0 · source

pub fn rsplit<F>(&self, pred: F) -> RSplit<'_, T, F>
where + F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match pred, starting at the end of the slice and working backwards. The matched element is not contained in the subslices.

-
Examples
+
Examples
let slice = [11, 22, 33, 0, 44, 55];
 let mut iter = slice.rsplit(|num| *num == 0);
 
@@ -762,44 +789,44 @@ 
Examples
assert_eq!(it.next().unwrap(), &[1, 1]); assert_eq!(it.next().unwrap(), &[]); assert_eq!(it.next(), None);
-
1.0.0 · source

pub fn splitn<F>(&self, n: usize, pred: F) -> SplitN<'_, T, F>where - F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match +

1.0.0 · source

pub fn splitn<F>(&self, n: usize, pred: F) -> SplitN<'_, T, F>
where + F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match pred, limited to returning at most n items. The matched element is not contained in the subslices.

The last element returned, if any, will contain the remainder of the slice.

-
Examples
+
Examples

Print the slice split once by numbers divisible by 3 (i.e., [10, 40], [20, 60, 50]):

let v = [10, 40, 30, 20, 60, 50];
 
 for group in v.splitn(2, |num| *num % 3 == 0) {
-    println!("{group:?}");
+    println!("{group:?}");
 }
-
1.0.0 · source

pub fn rsplitn<F>(&self, n: usize, pred: F) -> RSplitN<'_, T, F>where - F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match +

1.0.0 · source

pub fn rsplitn<F>(&self, n: usize, pred: F) -> RSplitN<'_, T, F>
where + F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match pred limited to returning at most n items. This starts at the end of the slice and works backwards. The matched element is not contained in the subslices.

The last element returned, if any, will contain the remainder of the slice.

-
Examples
+
Examples

Print the slice split once, starting from the end, by numbers divisible by 3 (i.e., [50], [10, 40, 30, 20]):

let v = [10, 40, 30, 20, 60, 50];
 
 for group in v.rsplitn(2, |num| *num % 3 == 0) {
-    println!("{group:?}");
+    println!("{group:?}");
 }
-
source

pub fn split_once<F>(&self, pred: F) -> Option<(&[T], &[T])>where - 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 +

source

pub fn split_once<F>(&self, pred: F) -> Option<(&[T], &[T])>
where + 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 predicate.

If any matching elements are resent in the slice, returns the prefix before the match and suffix after. The matching element itself is not included. If no elements match, returns None.

-
Examples
+
Examples
#![feature(slice_split_once)]
 let s = [1, 2, 3, 2, 4];
 assert_eq!(s.split_once(|&x| x == 2), Some((
@@ -807,13 +834,13 @@ 
Examples
&[3, 2, 4][..] ))); assert_eq!(s.split_once(|&x| x == 0), None);
-
source

pub fn rsplit_once<F>(&self, pred: F) -> Option<(&[T], &[T])>where - 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 +

source

pub fn rsplit_once<F>(&self, pred: F) -> Option<(&[T], &[T])>
where + 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 predicate.

If any matching elements are resent in the slice, returns the prefix before the match and suffix after. The matching element itself is not included. If no elements match, returns None.

-
Examples
+
Examples
#![feature(slice_split_once)]
 let s = [1, 2, 3, 2, 4];
 assert_eq!(s.rsplit_once(|&x| x == 2), Some((
@@ -821,11 +848,11 @@ 
Examples
&[4][..] ))); assert_eq!(s.rsplit_once(|&x| x == 0), None);
-
1.0.0 · source

pub fn contains(&self, x: &T) -> boolwhere - T: PartialEq,

Returns true if the slice contains an element with the given value.

+
1.0.0 · source

pub fn contains(&self, x: &T) -> bool
where + T: PartialEq,

Returns true if the slice contains an element with the given value.

This operation is O(n).

-

Note that if you have a sorted slice, binary_search may be faster.

-
Examples
+

Note that if you have a sorted slice, binary_search may be faster.

+
Examples
let v = [10, 40, 30];
 assert!(v.contains(&30));
 assert!(!v.contains(&50));
@@ -833,12 +860,12 @@
Examples
with one (for example, String implements PartialEq<str>), you can use iter().any:

-
let v = [String::from("hello"), String::from("world")]; // slice of `String`
-assert!(v.iter().any(|e| e == "hello")); // search with `&str`
-assert!(!v.iter().any(|e| e == "hi"));
-
1.0.0 · source

pub fn starts_with(&self, needle: &[T]) -> boolwhere - T: PartialEq,

Returns true if needle is a prefix of the slice.

-
Examples
+
let v = [String::from("hello"), String::from("world")]; // slice of `String`
+assert!(v.iter().any(|e| e == "hello")); // search with `&str`
+assert!(!v.iter().any(|e| e == "hi"));
+
1.0.0 · source

pub fn starts_with(&self, needle: &[T]) -> bool
where + T: PartialEq,

Returns true if needle is a prefix of the slice.

+
Examples
let v = [10, 40, 30];
 assert!(v.starts_with(&[10]));
 assert!(v.starts_with(&[10, 40]));
@@ -850,9 +877,9 @@ 
Examples
assert!(v.starts_with(&[])); let v: &[u8] = &[]; assert!(v.starts_with(&[]));
-
1.0.0 · source

pub fn ends_with(&self, needle: &[T]) -> boolwhere - T: PartialEq,

Returns true if needle is a suffix of the slice.

-
Examples
+
1.0.0 · source

pub fn ends_with(&self, needle: &[T]) -> bool
where + T: PartialEq,

Returns true if needle is a suffix of the slice.

+
Examples
let v = [10, 40, 30];
 assert!(v.ends_with(&[30]));
 assert!(v.ends_with(&[40, 30]));
@@ -864,47 +891,47 @@ 
Examples
assert!(v.ends_with(&[])); let v: &[u8] = &[]; assert!(v.ends_with(&[]));
-
1.51.0 · source

pub fn strip_prefix<P>(&self, prefix: &P) -> Option<&[T]>where - P: SlicePattern<Item = T> + ?Sized, - T: PartialEq,

Returns a subslice with the prefix removed.

+
1.51.0 · source

pub fn strip_prefix<P>(&self, prefix: &P) -> Option<&[T]>
where + P: SlicePattern<Item = T> + ?Sized, + T: PartialEq,

Returns a subslice with the prefix removed.

If the slice starts with prefix, returns the subslice after the prefix, wrapped in Some. If prefix is empty, simply returns the original slice.

If the slice does not start with prefix, returns None.

-
Examples
+
Examples
let v = &[10, 40, 30];
 assert_eq!(v.strip_prefix(&[10]), Some(&[40, 30][..]));
 assert_eq!(v.strip_prefix(&[10, 40]), Some(&[30][..]));
 assert_eq!(v.strip_prefix(&[50]), None);
 assert_eq!(v.strip_prefix(&[10, 50]), None);
 
-let prefix : &str = "he";
-assert_eq!(b"hello".strip_prefix(prefix.as_bytes()),
-           Some(b"llo".as_ref()));
-
1.51.0 · source

pub fn strip_suffix<P>(&self, suffix: &P) -> Option<&[T]>where - P: SlicePattern<Item = T> + ?Sized, - T: PartialEq,

Returns a subslice with the suffix removed.

+let prefix : &str = "he"; +assert_eq!(b"hello".strip_prefix(prefix.as_bytes()), + Some(b"llo".as_ref()));
+
1.51.0 · source

pub fn strip_suffix<P>(&self, suffix: &P) -> Option<&[T]>
where + P: SlicePattern<Item = T> + ?Sized, + T: PartialEq,

Returns a subslice with the suffix removed.

If the slice ends with suffix, returns the subslice before the suffix, wrapped in Some. If suffix is empty, simply returns the original slice.

If the slice does not end with suffix, returns None.

-
Examples
+
Examples
let v = &[10, 40, 30];
 assert_eq!(v.strip_suffix(&[30]), Some(&[10, 40][..]));
 assert_eq!(v.strip_suffix(&[40, 30]), Some(&[10][..]));
 assert_eq!(v.strip_suffix(&[50]), None);
 assert_eq!(v.strip_suffix(&[50, 30]), None);
-

Binary searches this slice for a given element. +

Binary searches this slice for a given element. If the slice is not sorted, the returned result is unspecified and meaningless.

-

If the value is found then Result::Ok is returned, containing the +

If the value is found then Result::Ok is returned, containing the index of the matching element. If there are multiple matches, then any one of the matches could be returned. The index is chosen deterministically, but is subject to change in future versions of Rust. -If the value is not found then Result::Err is returned, containing +If the value is not found then Result::Err is returned, containing the index where a matching element could be inserted while maintaining sorted order.

-

See also binary_search_by, binary_search_by_key, and partition_point.

-
Examples
+

See also binary_search_by, binary_search_by_key, and partition_point.

+
Examples

Looks up a series of four elements. The first is found, with a uniquely determined position; the second and third are not found; the fourth could match any position in [1, 4].

@@ -917,7 +944,7 @@
Examples
let r = s.binary_search(&1); assert!(match r { Ok(1..=4) => true, _ => false, });

If you want to find that whole range of matching items, rather than -an arbitrary matching one, that can be done using partition_point:

+an arbitrary matching one, that can be done using partition_point:

let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
 
@@ -932,12 +959,12 @@ 
Examples
assert!(s[low..high].iter().all(|&x| x == 1)); assert!(s[high..].iter().all(|&x| x > 1)); -// For something not found, the "range" of equal items is empty +// For something not found, the "range" of equal items is empty assert_eq!(s.partition_point(|x| x < &11), 9); assert_eq!(s.partition_point(|x| x <= &11), 9); assert_eq!(s.binary_search(&11), Err(9));

If you want to insert an item to a sorted vector, while maintaining -sort order, consider using partition_point:

+sort order, consider using partition_point:

let mut s = vec![0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
 let num = 42;
@@ -945,23 +972,23 @@ 
Examples
// The above is equivalent to `let idx = s.binary_search(&num).unwrap_or_else(|x| x);` s.insert(idx, num); assert_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 - F: FnMut(&'a T) -> Ordering,

Binary searches this slice with a comparator function.

+
1.0.0 · source

pub fn binary_search_by<'a, F>(&'a self, f: F) -> Result<usize, usize>
where + F: FnMut(&'a T) -> Ordering,

Binary searches this slice with a comparator function.

The comparator function should return an order code that indicates whether its argument is Less, Equal or Greater the desired target. If the slice is not sorted or if the comparator function does not implement an order consistent with the sort order of the underlying slice, the returned result is unspecified and meaningless.

-

If the value is found then Result::Ok is returned, containing the +

If the value is found then Result::Ok is returned, containing the index of the matching element. If there are multiple matches, then any one of the matches could be returned. The index is chosen deterministically, but is subject to change in future versions of Rust. -If the value is not found then Result::Err is returned, containing +If the value is not found then Result::Err is returned, containing the index where a matching element could be inserted while maintaining sorted order.

-

See also binary_search, binary_search_by_key, and partition_point.

-
Examples
+

See also binary_search, binary_search_by_key, and partition_point.

+
Examples

Looks up a series of four elements. The first is found, with a uniquely determined position; the second and third are not found; the fourth could match any position in [1, 4].

@@ -977,26 +1004,26 @@
Examples
let seek = 1; let r = s.binary_search_by(|probe| probe.cmp(&seek)); assert!(match r { Ok(1..=4) => true, _ => false, });
-
1.10.0 · source

pub fn binary_search_by_key<'a, B, F>( +

1.10.0 · source

pub fn binary_search_by_key<'a, B, F>( &'a self, - b: &B, + b: &B, f: F -) -> Result<usize, usize>where - F: FnMut(&'a T) -> B, - B: Ord,

Binary searches this slice with a key extraction function.

+) -> Result<usize, usize>
where + F: FnMut(&'a T) -> B, + B: Ord,

Binary searches this slice with a key extraction function.

Assumes that the slice is sorted by the key, for instance with -sort_by_key using the same key extraction function. +sort_by_key using the same key extraction function. If the slice is not sorted by the key, the returned result is unspecified and meaningless.

-

If the value is found then Result::Ok is returned, containing the +

If the value is found then Result::Ok is returned, containing the index of the matching element. If there are multiple matches, then any one of the matches could be returned. The index is chosen deterministically, but is subject to change in future versions of Rust. -If the value is not found then Result::Err is returned, containing +If the value is not found then Result::Err is returned, containing the index where a matching element could be inserted while maintaining sorted order.

-

See also binary_search, binary_search_by, and partition_point.

-
Examples
+

See also binary_search, binary_search_by, and partition_point.

+
Examples

Looks up a series of four elements in a slice of pairs sorted by their second elements. The first is found, with a uniquely determined position; the second and third are not found; the @@ -1011,7 +1038,7 @@

Examples
assert_eq!(s.binary_search_by_key(&100, |&(a, b)| b), Err(13)); let r = s.binary_search_by_key(&1, |&(a, b)| b); assert!(match r { Ok(1..=4) => true, _ => false, });
-
1.30.0 · source

pub unsafe fn align_to<U>(&self) -> (&[T], &[U], &[T])

Transmute the slice to a slice of another type, ensuring alignment of the types is +

1.30.0 · source

pub unsafe fn align_to<U>(&self) -> (&[T], &[U], &[T])

Transmute the slice to a slice of another type, ensuring alignment of the types is maintained.

This method splits the slice into three distinct slices: prefix, correctly aligned middle slice of a new type, and the suffix slice. How exactly the slice is split up is not @@ -1021,10 +1048,10 @@

Examples
in a default (debug or release) execution will return a maximal middle part.

This method has no purpose when either input element T or output element U are zero-sized and will return the original slice without splitting anything.

-
Safety
+
Safety

This method is essentially a transmute with respect to the elements in the returned middle slice, so all the usual caveats pertaining to transmute::<T, U> also apply here.

-
Examples
+
Examples

Basic usage:

unsafe {
@@ -1034,11 +1061,11 @@ 
Examples
// more_efficient_algorithm_for_aligned_shorts(shorts); // less_efficient_algorithm_for_bytes(suffix); }
-
source

pub fn as_simd<const LANES: usize>(&self) -> (&[T], &[Simd<T, LANES>], &[T])where - Simd<T, LANES>: AsRef<[T; LANES]>, - T: SimdElement, - LaneCount<LANES>: SupportedLaneCount,

🔬This is a nightly-only experimental API. (portable_simd)

Split a slice into a prefix, a middle of aligned SIMD types, and a suffix.

-

This is a safe wrapper around slice::align_to, so has the same weak +

source

pub fn as_simd<const LANES: usize>(&self) -> (&[T], &[Simd<T, LANES>], &[T])
where + Simd<T, LANES>: AsRef<[T; LANES]>, + T: SimdElement, + LaneCount<LANES>: SupportedLaneCount,

🔬This is a nightly-only experimental API. (portable_simd)

Split a slice into a prefix, a middle of aligned SIMD types, and a suffix.

+

This is a safe wrapper around slice::align_to, so has the same weak postconditions as that method. You’re only assured that self.len() == prefix.len() + middle.len() * LANES + suffix.len().

Notably, all of the following are possible:

@@ -1049,7 +1076,7 @@
Examples

That said, this is a safe method, so if you’re only writing safe code, then this can at most cause incorrect logic, not unsoundness.

-
Panics
+
Panics

This will panic if the size of the SIMD type is different from LANES times that of the scalar.

At the time of writing, the trait restrictions on Simd<T, LANES> keeps @@ -1057,9 +1084,9 @@

Panics
supported. It’s possible that, in the future, those restrictions might be lifted in a way that would make it possible to see panics from this method for something like LANES == 3.

-
Examples
+
Examples
#![feature(portable_simd)]
-use core::simd::SimdFloat;
+use core::simd::prelude::*;
 
 let short = &[1, 2, 3];
 let (prefix, middle, suffix) = short.as_simd::<4>();
@@ -1071,7 +1098,6 @@ 
Examples
fn basic_simd_sum(x: &[f32]) -> f32 { use std::ops::Add; - use std::simd::f32x4; let (prefix, middle, suffix) = x.as_simd(); let sums = f32x4::from_array([ prefix.iter().copied().sum(), @@ -1085,14 +1111,14 @@
Examples
let numbers: Vec<f32> = (1..101).map(|x| x as _).collect(); assert_eq!(basic_simd_sum(&numbers[1..99]), 4949.0);
-
source

pub fn is_sorted(&self) -> boolwhere - T: PartialOrd,

🔬This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this slice are sorted.

+
source

pub fn is_sorted(&self) -> bool
where + T: PartialOrd,

🔬This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this slice are sorted.

That is, for each element a and its following element b, a <= b must hold. If the slice yields exactly zero or one element, true is returned.

Note that if Self::Item is only PartialOrd, but not Ord, the above definition implies that this function returns false if any two consecutive items are not comparable.

-
Examples
+
Examples
#![feature(is_sorted)]
 let empty: [i32; 0] = [];
 
@@ -1101,24 +1127,24 @@ 
Examples
assert!([0].is_sorted()); assert!(empty.is_sorted()); assert!(![0.0, 1.0, f32::NAN].is_sorted());
-
source

pub fn is_sorted_by<'a, F>(&'a self, compare: F) -> boolwhere - F: FnMut(&'a T, &'a T) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this slice are sorted using the given comparator function.

+
source

pub fn is_sorted_by<'a, F>(&'a self, compare: F) -> bool
where + F: FnMut(&'a T, &'a T) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this slice are sorted using the given comparator function.

Instead of using PartialOrd::partial_cmp, this function uses the given compare function to determine the ordering of two elements. Apart from that, it’s equivalent to -is_sorted; see its documentation for more information.

-
source

pub fn is_sorted_by_key<'a, F, K>(&'a self, f: F) -> boolwhere - F: FnMut(&'a T) -> K, - K: PartialOrd,

🔬This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this slice are sorted using the given key extraction function.

+is_sorted; see its documentation for more information.

+
source

pub fn is_sorted_by_key<'a, F, K>(&'a self, f: F) -> bool
where + F: FnMut(&'a T) -> K, + K: PartialOrd,

🔬This is a nightly-only experimental API. (is_sorted)

Checks if the elements of this slice are sorted using the given key extraction function.

Instead of comparing the slice’s elements directly, this function compares the keys of the -elements, as determined by f. Apart from that, it’s equivalent to is_sorted; see its +elements, as determined by f. Apart from that, it’s equivalent to is_sorted; see its documentation for more information.

-
Examples
+
Examples
#![feature(is_sorted)]
 
-assert!(["c", "bb", "aaa"].is_sorted_by_key(|s| s.len()));
+assert!(["c", "bb", "aaa"].is_sorted_by_key(|s| s.len()));
 assert!(![-2i32, -1, 0, 3].is_sorted_by_key(|n| n.abs()));
-
1.52.0 · source

pub fn partition_point<P>(&self, pred: P) -> usizewhere - P: FnMut(&T) -> bool,

Returns the index of the partition point according to the given predicate +

1.52.0 · source

pub fn partition_point<P>(&self, pred: P) -> usize
where + P: FnMut(&T) -> bool,

Returns the index of the partition point according to the given predicate (the index of the first element of the second partition).

The slice is assumed to be partitioned according to the given predicate. This means that all elements for which the predicate returns true are at the start of the slice @@ -1127,8 +1153,8 @@

Examples
(all odd numbers are at the start, all even at the end).

If this slice is not partitioned, the returned result is unspecified and meaningless, as this method performs a kind of binary search.

-

See also binary_search, binary_search_by, and binary_search_by_key.

-
Examples
+

See also binary_search, binary_search_by, and binary_search_by_key.

+
Examples
let v = [1, 2, 3, 3, 5, 6, 7];
 let i = v.partition_point(|&x| x < 5);
 
@@ -1150,62 +1176,36 @@ 
Examples
let idx = s.partition_point(|&x| x < num); s.insert(idx, num); assert_eq!(s, [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 42, 55]);
-
1.23.0 · source

pub fn is_ascii(&self) -> bool

Checks if all bytes in this slice are within the ASCII range.

-
source

pub fn as_ascii(&self) -> Option<&[AsciiChar]>

🔬This is a nightly-only experimental API. (ascii_char)

If this slice is_ascii, returns it as a slice of -ASCII characters, otherwise returns None.

-
source

pub unsafe fn as_ascii_unchecked(&self) -> &[AsciiChar]

🔬This is a nightly-only experimental API. (ascii_char)

Converts this slice of bytes into a slice of ASCII characters, -without checking whether they’re valid.

-
Safety
-

Every byte in the slice must be in 0..=127, or else this is UB.

-
1.23.0 · source

pub fn eq_ignore_ascii_case(&self, other: &[u8]) -> bool

Checks that two slices are an ASCII case-insensitive match.

-

Same as to_ascii_lowercase(a) == to_ascii_lowercase(b), -but without allocating and copying temporaries.

-
1.60.0 · source

pub fn escape_ascii(&self) -> EscapeAscii<'_>

Returns an iterator that produces an escaped version of this slice, -treating it as an ASCII string.

-
Examples
-

-let s = b"0\t\r\n'\"\\\x9d";
-let escaped = s.escape_ascii().to_string();
-assert_eq!(escaped, "0\\t\\r\\n\\'\\\"\\\\\\x9d");
-
source

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

🔬This is a nightly-only experimental API. (byte_slice_trim_ascii)

Returns a byte slice with leading ASCII whitespace bytes removed.

-

‘Whitespace’ refers to the definition used by -u8::is_ascii_whitespace.

-
Examples
-
#![feature(byte_slice_trim_ascii)]
+
source

pub fn flatten(&self) -> &[T]

🔬This is a nightly-only experimental API. (slice_flatten)

Takes a &[[T; N]], and flattens it to a &[T].

+
Panics
+

This panics if the length of the resulting slice would overflow a usize.

+

This is only possible when flattening a slice of arrays of zero-sized +types, and thus tends to be irrelevant in practice. If +size_of::<T>() > 0, this will never panic.

+
Examples
+
#![feature(slice_flatten)]
 
-assert_eq!(b" \t hello world\n".trim_ascii_start(), b"hello world\n");
-assert_eq!(b"  ".trim_ascii_start(), b"");
-assert_eq!(b"".trim_ascii_start(), b"");
-
source

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

🔬This is a nightly-only experimental API. (byte_slice_trim_ascii)

Returns a byte slice with trailing ASCII whitespace bytes removed.

-

‘Whitespace’ refers to the definition used by -u8::is_ascii_whitespace.

-
Examples
-
#![feature(byte_slice_trim_ascii)]
+assert_eq!([[1, 2, 3], [4, 5, 6]].flatten(), &[1, 2, 3, 4, 5, 6]);
 
-assert_eq!(b"\r hello world\n ".trim_ascii_end(), b"\r hello world");
-assert_eq!(b"  ".trim_ascii_end(), b"");
-assert_eq!(b"".trim_ascii_end(), b"");
-
source

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

🔬This is a nightly-only experimental API. (byte_slice_trim_ascii)

Returns a byte slice with leading and trailing ASCII whitespace bytes -removed.

-

‘Whitespace’ refers to the definition used by -u8::is_ascii_whitespace.

-
Examples
-
#![feature(byte_slice_trim_ascii)]
+assert_eq!(
+    [[1, 2, 3], [4, 5, 6]].flatten(),
+    [[1, 2], [3, 4], [5, 6]].flatten(),
+);
+
+let slice_of_empty_arrays: &[[i32; 0]] = &[[], [], [], [], []];
+assert!(slice_of_empty_arrays.flatten().is_empty());
 
-assert_eq!(b"\r hello world\n ".trim_ascii(), b"hello world");
-assert_eq!(b"  ".trim_ascii(), b"");
-assert_eq!(b"".trim_ascii(), b"");
-
source

pub fn as_str(&self) -> &str

🔬This is a nightly-only experimental API. (ascii_char)

Views this slice of ASCII characters as a UTF-8 str.

-
source

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

🔬This is a nightly-only experimental API. (ascii_char)

Views this slice of ASCII characters as a slice of u8 bytes.

-
1.0.0 · source

pub fn to_vec(&self) -> Vec<T>where - T: Clone,

Copies self into a new Vec.

+let empty_slice_of_arrays: &[[u32; 10]] = &[]; +assert!(empty_slice_of_arrays.flatten().is_empty());
+
1.0.0 · source

pub fn to_vec(&self) -> Vec<T>
where + T: Clone,

Copies self into a new Vec.

Examples
let s = [10, 40, 30];
 let x = s.to_vec();
 // Here, `s` and `x` can be modified independently.
-
source

pub fn to_vec_in<A>(&self, alloc: A) -> Vec<T, A>where - A: Allocator, - T: Clone,

🔬This is a nightly-only experimental API. (allocator_api)

Copies self into a new Vec with an allocator.

+
source

pub fn to_vec_in<A>(&self, alloc: A) -> Vec<T, A>
where + A: Allocator, + T: Clone,

🔬This is a nightly-only experimental API. (allocator_api)

Copies self into a new Vec with an allocator.

Examples
#![feature(allocator_api)]
 
@@ -1214,8 +1214,8 @@ 
Examples
let s = [10, 40, 30]; let x = s.to_vec_in(System); // Here, `s` and `x` can be modified independently.
-
1.40.0 · source

pub fn repeat(&self, n: usize) -> Vec<T>where - T: Copy,

Creates a vector by copying a slice n times.

+
1.40.0 · source

pub fn repeat(&self, n: usize) -> Vec<T>
where + T: Copy,

Creates a vector by copying a slice n times.

Panics

This function will panic if the capacity would overflow.

Examples
@@ -1225,126 +1225,126 @@
Examples

A panic upon overflow:

// this will panic at runtime
-b"0123456789abcdef".repeat(usize::MAX);
-
1.0.0 · source

pub fn concat<Item>(&self) -> <[T] as Concat<Item>>::Output where - [T]: Concat<Item>, - Item: ?Sized,

Flattens a slice of T into a single value Self::Output.

+b"0123456789abcdef".repeat(usize::MAX);
+
1.0.0 · source

pub fn concat<Item>(&self) -> <[T] as Concat<Item>>::Output
where + [T]: Concat<Item>, + Item: ?Sized,

Flattens a slice of T into a single value Self::Output.

Examples
-
assert_eq!(["hello", "world"].concat(), "helloworld");
+
assert_eq!(["hello", "world"].concat(), "helloworld");
 assert_eq!([[1, 2], [3, 4]].concat(), [1, 2, 3, 4]);
-
1.3.0 · source

pub fn join<Separator>( +

1.3.0 · source

pub fn join<Separator>( &self, sep: Separator -) -> <[T] as Join<Separator>>::Output where - [T]: Join<Separator>,

Flattens a slice of T into a single value Self::Output, placing a +) -> <[T] as Join<Separator>>::Output

where + [T]: Join<Separator>,

Flattens a slice of T into a single value Self::Output, placing a given separator between each.

Examples
-
assert_eq!(["hello", "world"].join(" "), "hello world");
+
assert_eq!(["hello", "world"].join(" "), "hello world");
 assert_eq!([[1, 2], [3, 4]].join(&0), [1, 2, 0, 3, 4]);
 assert_eq!([[1, 2], [3, 4]].join(&[0, 0][..]), [1, 2, 0, 0, 3, 4]);
-
1.0.0 · source

pub fn connect<Separator>( +

1.0.0 · source

pub fn connect<Separator>( &self, sep: Separator -) -> <[T] as Join<Separator>>::Output where - [T]: Join<Separator>,

👎Deprecated since 1.3.0: renamed to join

Flattens a slice of T into a single value Self::Output, placing a +) -> <[T] as Join<Separator>>::Output

where + [T]: Join<Separator>,
👎Deprecated since 1.3.0: renamed to join

Flattens a slice of T into a single value Self::Output, placing a given separator between each.

Examples
-
assert_eq!(["hello", "world"].connect(" "), "hello world");
+
assert_eq!(["hello", "world"].connect(" "), "hello world");
 assert_eq!([[1, 2], [3, 4]].connect(&0), [1, 2, 0, 3, 4]);
-
1.23.0 · source

pub fn to_ascii_uppercase(&self) -> Vec<u8>

Returns a vector containing a copy of this slice where each byte +

1.23.0 · source

pub fn to_ascii_uppercase(&self) -> Vec<u8>

Returns a vector containing a copy of this slice where each byte is mapped to its ASCII upper case equivalent.

ASCII letters ‘a’ to ‘z’ are mapped to ‘A’ to ‘Z’, but non-ASCII letters are unchanged.

-

To uppercase the value in-place, use make_ascii_uppercase.

-
1.23.0 · source

pub fn to_ascii_lowercase(&self) -> Vec<u8>

Returns a vector containing a copy of this slice where each byte +

To uppercase the value in-place, use make_ascii_uppercase.

+
1.23.0 · source

pub fn to_ascii_lowercase(&self) -> Vec<u8>

Returns a vector containing a copy of this slice where each byte is mapped to its ASCII lower case equivalent.

ASCII letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’, but non-ASCII letters are unchanged.

-

To lowercase the value in-place, use make_ascii_lowercase.

-

Trait Implementations§

source§

impl AsRef<[u8]> for Bytes

source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Borrow<[u8]> for Bytes

source§

fn borrow(&self) -> &[u8]

Immutably borrows from an owned value. Read more
source§

impl Buf for Bytes

source§

fn remaining(&self) -> usize

Returns the number of bytes between the current position and the end of -the buffer. Read more
source§

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

Returns a slice starting at the current position and of length between 0 +

To lowercase the value in-place, use make_ascii_lowercase.

+

Trait Implementations§

source§

impl AsRef<[u8]> for Bytes

source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Borrow<[u8]> for Bytes

source§

fn borrow(&self) -> &[u8]

Immutably borrows from an owned value. Read more
source§

impl Buf for Bytes

source§

fn remaining(&self) -> usize

Returns the number of bytes between the current position and the end of +the buffer. Read more
source§

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

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

fn advance(&mut self, cnt: usize)

Advance the internal cursor of the Buf Read more
source§

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

Consumes len bytes inside self and returns new instance of Bytes -with this data. Read more
source§

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

Fills dst with potentially multiple slices starting at self’s -current position. Read more
source§

fn has_remaining(&self) -> bool

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

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

Copies bytes from self into dst. Read more
source§

fn get_u8(&mut self) -> u8

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

fn get_i8(&mut self) -> i8

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

fn get_u16(&mut self) -> u16

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

fn get_u16_le(&mut self) -> u16

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

fn get_u16_ne(&mut self) -> u16

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

fn get_i16(&mut self) -> i16

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

fn get_i16_le(&mut self) -> i16

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

fn get_i16_ne(&mut self) -> i16

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

fn get_u32(&mut self) -> u32

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

fn get_u32_le(&mut self) -> u32

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

fn get_u32_ne(&mut self) -> u32

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

fn get_i32(&mut self) -> i32

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

fn get_i32_le(&mut self) -> i32

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

fn get_i32_ne(&mut self) -> i32

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

fn get_u64(&mut self) -> u64

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

fn get_u64_le(&mut self) -> u64

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

fn get_u64_ne(&mut self) -> u64

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

fn get_i64(&mut self) -> i64

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

fn get_i64_le(&mut self) -> i64

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

fn get_i64_ne(&mut self) -> i64

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

fn get_u128(&mut self) -> u128

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

fn get_u128_le(&mut self) -> u128

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

fn get_u128_ne(&mut self) -> u128

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

fn get_i128(&mut self) -> i128

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

fn get_i128_le(&mut self) -> i128

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

fn get_i128_ne(&mut self) -> i128

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

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

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

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

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

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

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

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

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

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

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

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

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

fn get_f32(&mut self) -> f32

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

fn get_f32_le(&mut self) -> f32

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

fn get_f32_ne(&mut self) -> f32

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

fn get_f64(&mut self) -> f64

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

fn get_f64_le(&mut self) -> f64

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

fn get_f64_ne(&mut self) -> f64

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

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

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

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

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

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

Creates an adaptor which implements the Read trait for self. Read more
source§

impl Clone for Bytes

source§

fn clone(&self) -> Bytes

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Bytes

source§

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

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

impl Default for Bytes

source§

fn default() -> Bytes

Returns the “default value” for a type. Read more
source§

impl Deref for Bytes

§

type Target = [u8]

The resulting type after dereferencing.
source§

fn deref(&self) -> &[u8]

Dereferences the value.
source§

impl Drop for Bytes

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl Extend<Bytes> for BytesMut

source§

fn extend<T>(&mut self, iter: T)where - T: IntoIterator<Item = Bytes>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

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

source§

fn from(slice: &'static [u8]) -> Bytes

Converts to this type from the input type.
source§

impl From<&'static str> for Bytes

source§

fn from(slice: &'static str) -> Bytes

Converts to this type from the input type.
source§

impl From<Box<[u8]>> for Bytes

source§

fn from(slice: Box<[u8]>) -> Bytes

Converts to this type from the input type.
source§

impl From<Bytes> for Vec<u8>

source§

fn from(bytes: Bytes) -> Vec<u8>

Converts to this type from the input type.
source§

impl From<BytesMut> for Bytes

source§

fn from(src: BytesMut) -> Bytes

Converts to this type from the input type.
source§

impl From<String> for Bytes

source§

fn from(s: String) -> Bytes

Converts to this type from the input type.
source§

impl From<Vec<u8>> for Bytes

source§

fn from(vec: Vec<u8>) -> Bytes

Converts to this type from the input type.
source§

impl FromIterator<u8> for Bytes

source§

fn from_iter<T: IntoIterator<Item = u8>>(into_iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl Hash for Bytes

source§

fn hash<H>(&self, state: &mut H)where - H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<'a> IntoIterator for &'a Bytes

§

type Item = &'a u8

The type of the elements being iterated over.
§

type IntoIter = Iter<'a, u8>

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

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl IntoIterator for Bytes

§

type Item = u8

The type of the elements being iterated over.
§

type IntoIter = IntoIter<Bytes>

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

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl LowerHex for Bytes

source§

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

Formats the value using the given formatter.
source§

impl Ord for Bytes

source§

fn cmp(&self, other: &Bytes) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<'a, T: ?Sized> PartialEq<&'a T> for Byteswhere - Bytes: PartialEq<T>,

source§

fn eq(&self, other: &&'a T) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<[u8]> for Bytes

source§

fn eq(&self, other: &[u8]) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<Bytes> for &[u8]

source§

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

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<Bytes> for &str

source§

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

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<Bytes> for [u8]

source§

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

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<Bytes> for BytesMut

source§

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

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<Bytes> for String

source§

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

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<Bytes> for Vec<u8>

source§

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

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<Bytes> for str

source§

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

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<BytesMut> for Bytes

source§

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

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<String> for Bytes

source§

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

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<Vec<u8>> for Bytes

source§

fn eq(&self, other: &Vec<u8>) -> bool

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<str> for Bytes

source§

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

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl PartialEq for Bytes

source§

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

This method tests for self and other values to be equal, and is used -by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl<'a, T: ?Sized> PartialOrd<&'a T> for Byteswhere - Bytes: PartialOrd<T>,

source§

fn partial_cmp(&self, other: &&'a T) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl PartialOrd<[u8]> for Bytes

source§

fn partial_cmp(&self, other: &[u8]) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl PartialOrd<Bytes> for &[u8]

source§

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 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl PartialOrd<Bytes> for &str

source§

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 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl PartialOrd<Bytes> for [u8]

source§

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 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl PartialOrd<Bytes> for String

source§

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 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl PartialOrd<Bytes> for Vec<u8>

source§

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 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl PartialOrd<Bytes> for str

source§

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 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl PartialOrd<String> for Bytes

source§

fn partial_cmp(&self, other: &String) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl PartialOrd<Vec<u8>> for Bytes

source§

fn partial_cmp(&self, other: &Vec<u8>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl PartialOrd<str> for Bytes

source§

fn partial_cmp(&self, other: &str) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl PartialOrd for Bytes

source§

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 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
source§

impl UpperHex for Bytes

source§

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

Formats the value using the given formatter.
source§

impl Eq for Bytes

source§

impl Send for Bytes

source§

impl Sync for Bytes

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere - T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere - T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

-
source§

impl<T, U> Into<U> for Twhere - U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+non-continuous internal representation). Read more
source§

fn advance(&mut self, cnt: usize)

Advance the internal cursor of the Buf Read more
source§

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

Consumes len bytes inside self and returns new instance of Bytes +with this data. Read more
source§

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

Fills dst with potentially multiple slices starting at self’s +current position. Read more
source§

fn has_remaining(&self) -> bool

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

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

Copies bytes from self into dst. Read more
source§

fn get_u8(&mut self) -> u8

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

fn get_i8(&mut self) -> i8

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

fn get_u16(&mut self) -> u16

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

fn get_u16_le(&mut self) -> u16

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

fn get_u16_ne(&mut self) -> u16

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

fn get_i16(&mut self) -> i16

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

fn get_i16_le(&mut self) -> i16

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

fn get_i16_ne(&mut self) -> i16

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

fn get_u32(&mut self) -> u32

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

fn get_u32_le(&mut self) -> u32

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

fn get_u32_ne(&mut self) -> u32

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

fn get_i32(&mut self) -> i32

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

fn get_i32_le(&mut self) -> i32

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

fn get_i32_ne(&mut self) -> i32

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

fn get_u64(&mut self) -> u64

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

fn get_u64_le(&mut self) -> u64

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

fn get_u64_ne(&mut self) -> u64

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

fn get_i64(&mut self) -> i64

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

fn get_i64_le(&mut self) -> i64

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

fn get_i64_ne(&mut self) -> i64

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

fn get_u128(&mut self) -> u128

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

fn get_u128_le(&mut self) -> u128

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

fn get_u128_ne(&mut self) -> u128

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

fn get_i128(&mut self) -> i128

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

fn get_i128_le(&mut self) -> i128

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

fn get_i128_ne(&mut self) -> i128

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

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

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

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

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

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

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

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

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

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

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

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

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

fn get_f32(&mut self) -> f32

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

fn get_f32_le(&mut self) -> f32

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

fn get_f32_ne(&mut self) -> f32

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

fn get_f64(&mut self) -> f64

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

fn get_f64_le(&mut self) -> f64

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

fn get_f64_ne(&mut self) -> f64

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

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

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

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

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

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

Creates an adaptor which implements the Read trait for self. Read more
source§

impl Clone for Bytes

source§

fn clone(&self) -> Bytes

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Bytes

source§

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

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

impl Default for Bytes

source§

fn default() -> Bytes

Returns the “default value” for a type. Read more
source§

impl Deref for Bytes

§

type Target = [u8]

The resulting type after dereferencing.
source§

fn deref(&self) -> &[u8]

Dereferences the value.
source§

impl Drop for Bytes

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl Extend<Bytes> for BytesMut

source§

fn extend<T>(&mut self, iter: T)
where + T: IntoIterator<Item = Bytes>,

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

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

source§

fn from(slice: &'static [u8]) -> Bytes

Converts to this type from the input type.
source§

impl From<&'static str> for Bytes

source§

fn from(slice: &'static str) -> Bytes

Converts to this type from the input type.
source§

impl From<Box<[u8]>> for Bytes

source§

fn from(slice: Box<[u8]>) -> Bytes

Converts to this type from the input type.
source§

impl From<Bytes> for Vec<u8>

source§

fn from(bytes: Bytes) -> Vec<u8>

Converts to this type from the input type.
source§

impl From<BytesMut> for Bytes

source§

fn from(src: BytesMut) -> Bytes

Converts to this type from the input type.
source§

impl From<String> for Bytes

source§

fn from(s: String) -> Bytes

Converts to this type from the input type.
source§

impl From<Vec<u8>> for Bytes

source§

fn from(vec: Vec<u8>) -> Bytes

Converts to this type from the input type.
source§

impl FromIterator<u8> for Bytes

source§

fn from_iter<T: IntoIterator<Item = u8>>(into_iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl Hash for Bytes

source§

fn hash<H>(&self, state: &mut H)
where + H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<'a> IntoIterator for &'a Bytes

§

type Item = &'a u8

The type of the elements being iterated over.
§

type IntoIter = Iter<'a, u8>

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

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl IntoIterator for Bytes

§

type Item = u8

The type of the elements being iterated over.
§

type IntoIter = IntoIter<Bytes>

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

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl LowerHex for Bytes

source§

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

Formats the value using the given formatter.
source§

impl Ord for Bytes

source§

fn cmp(&self, other: &Bytes) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<'a, T: ?Sized> PartialEq<&'a T> for Bytes
where + Bytes: PartialEq<T>,

source§

fn eq(&self, other: &&'a T) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<[u8]> for Bytes

source§

fn eq(&self, other: &[u8]) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<Bytes> for &[u8]

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<Bytes> for &str

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<Bytes> for [u8]

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<Bytes> for BytesMut

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<Bytes> for String

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<Bytes> for Vec<u8>

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<Bytes> for str

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<BytesMut> for Bytes

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<String> for Bytes

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<Vec<u8>> for Bytes

source§

fn eq(&self, other: &Vec<u8>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<str> for Bytes

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl PartialEq for Bytes

source§

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

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<'a, T: ?Sized> PartialOrd<&'a T> for Bytes
where + Bytes: PartialOrd<T>,

source§

fn partial_cmp(&self, other: &&'a T) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl PartialOrd<[u8]> for Bytes

source§

fn partial_cmp(&self, other: &[u8]) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl PartialOrd<Bytes> for &[u8]

source§

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 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl PartialOrd<Bytes> for &str

source§

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 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl PartialOrd<Bytes> for [u8]

source§

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 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl PartialOrd<Bytes> for String

source§

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 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl PartialOrd<Bytes> for Vec<u8>

source§

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 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl PartialOrd<Bytes> for str

source§

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 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl PartialOrd<String> for Bytes

source§

fn partial_cmp(&self, other: &String) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl PartialOrd<Vec<u8>> for Bytes

source§

fn partial_cmp(&self, other: &Vec<u8>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl PartialOrd<str> for Bytes

source§

fn partial_cmp(&self, other: &str) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl PartialOrd for Bytes

source§

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 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
source§

impl UpperHex for Bytes

source§

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

Formats the value using the given formatter.
source§

impl Eq for Bytes

source§

impl Send for Bytes

source§

impl Sync for Bytes

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
source§

impl<T, U> Into<U> for T
where + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
source§

impl<T> ToOwned for Twhere - T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file +From<T> for U chooses to do.

+
source§

impl<T> ToOwned for T
where + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
\ No newline at end of file diff --git a/bytes/struct.BytesMut.html b/bytes/struct.BytesMut.html index 545e7bb8e..9d639eb09 100644 --- a/bytes/struct.BytesMut.html +++ b/bytes/struct.BytesMut.html @@ -1,4 +1,5 @@ -BytesMut in bytes - Rust

Struct bytes::BytesMut

source ·
pub struct BytesMut { /* private fields */ }
Expand description

A unique reference to a contiguous slice of memory.

+BytesMut in bytes - Rust +

Struct bytes::BytesMut

source ·
pub struct BytesMut { /* private fields */ }
Expand description

A unique reference to a contiguous slice of memory.

BytesMut represents a unique view into a potentially shared memory region. Given the uniqueness guarantee, owners of BytesMut handles are able to mutate the memory.

@@ -15,11 +16,11 @@

Examples

let mut buf = BytesMut::with_capacity(64); -buf.put_u8(b'h'); -buf.put_u8(b'e'); -buf.put(&b"llo"[..]); +buf.put_u8(b'h'); +buf.put_u8(b'e'); +buf.put(&b"llo"[..]); -assert_eq!(&buf[..], b"hello"); +assert_eq!(&buf[..], b"hello"); // Freeze the buffer so that it can be shared let a = buf.freeze(); @@ -27,9 +28,9 @@

Examples

// This does not allocate, instead `b` points to the same memory. let b = a.clone(); -assert_eq!(&a[..], b"hello"); -assert_eq!(&b[..], b"hello");
-

Implementations§

source§

impl BytesMut

source

pub fn with_capacity(capacity: usize) -> BytesMut

Creates a new BytesMut with the specified capacity.

+assert_eq!(&a[..], b"hello"); +assert_eq!(&b[..], b"hello");
+

Implementations§

source§

impl BytesMut

source

pub fn with_capacity(capacity: usize) -> BytesMut

Creates a new BytesMut with the specified capacity.

The returned BytesMut will be able to hold at least capacity bytes without reallocating.

It is important to note that this function does not specify the length @@ -42,9 +43,9 @@

Examples
// `bytes` contains no data, even though there is capacity assert_eq!(bytes.len(), 0); -bytes.put(&b"hello world"[..]); +bytes.put(&b"hello world"[..]); -assert_eq!(&bytes[..], b"hello world");
+assert_eq!(&bytes[..], b"hello world");
source

pub fn new() -> BytesMut

Creates a new BytesMut with default capacity.

Resulting object has length 0 and unspecified capacity. This function does not allocate.

@@ -56,22 +57,22 @@
Examples
assert_eq!(0, bytes.len()); bytes.reserve(2); -bytes.put_slice(b"xy"); +bytes.put_slice(b"xy"); -assert_eq!(&b"xy"[..], &bytes[..]);
-
source

pub fn len(&self) -> usize

Returns the number of bytes contained in this BytesMut.

+assert_eq!(&b"xy"[..], &bytes[..]);
+
source

pub fn len(&self) -> usize

Returns the number of bytes contained in this BytesMut.

Examples
use bytes::BytesMut;
 
-let b = BytesMut::from(&b"hello"[..]);
+let b = BytesMut::from(&b"hello"[..]);
 assert_eq!(b.len(), 5);
-
source

pub fn is_empty(&self) -> bool

Returns true if the BytesMut has a length of 0.

+
source

pub fn is_empty(&self) -> bool

Returns true if the BytesMut has a length of 0.

Examples
use bytes::BytesMut;
 
 let b = BytesMut::with_capacity(64);
 assert!(b.is_empty());
-
source

pub fn capacity(&self) -> usize

Returns the number of bytes the BytesMut can hold without reallocating.

+
source

pub fn capacity(&self) -> usize

Returns the number of bytes the BytesMut can hold without reallocating.

Examples
use bytes::BytesMut;
 
@@ -86,17 +87,17 @@ 
Examples
use std::thread; let mut b = BytesMut::with_capacity(64); -b.put(&b"hello world"[..]); +b.put(&b"hello world"[..]); let b1 = b.freeze(); let b2 = b1.clone(); let th = thread::spawn(move || { - assert_eq!(&b1[..], b"hello world"); + assert_eq!(&b1[..], b"hello world"); }); -assert_eq!(&b2[..], b"hello world"); +assert_eq!(&b2[..], b"hello world"); th.join().unwrap();
-
source

pub fn zeroed(len: usize) -> BytesMut

Creates a new BytesMut, which is initialized with zero.

+
source

pub fn zeroed(len: usize) -> BytesMut

Creates a new BytesMut, which is initialized with zero.

Examples
use bytes::BytesMut;
 
@@ -104,7 +105,7 @@ 
Examples
assert_eq!(zeros.len(), 42); zeros.into_iter().for_each(|x| assert_eq!(x, 0));
-
source

pub fn split_off(&mut self, at: usize) -> BytesMut

Splits the bytes into two at the given index.

+
source

pub fn split_off(&mut self, at: usize) -> BytesMut

Splits the bytes into two at the given index.

Afterwards self contains elements [0, at), and the returned BytesMut contains elements [at, capacity).

This is an O(1) operation that just increases the reference count @@ -112,14 +113,14 @@

Examples
Examples
use bytes::BytesMut;
 
-let mut a = BytesMut::from(&b"hello world"[..]);
+let mut a = BytesMut::from(&b"hello world"[..]);
 let mut b = a.split_off(5);
 
-a[0] = b'j';
-b[0] = b'!';
+a[0] = b'j';
+b[0] = b'!';
 
-assert_eq!(&a[..], b"jello");
-assert_eq!(&b[..], b"!world");
+assert_eq!(&a[..], b"jello"); +assert_eq!(&b[..], b"!world");
Panics

Panics if at > capacity.

source

pub fn split(&mut self) -> BytesMut

Removes the bytes from the current view, returning them in a new @@ -133,15 +134,15 @@

Examples
use bytes::{BytesMut, BufMut};
 
 let mut buf = BytesMut::with_capacity(1024);
-buf.put(&b"hello world"[..]);
+buf.put(&b"hello world"[..]);
 
 let other = buf.split();
 
 assert!(buf.is_empty());
 assert_eq!(1013, buf.capacity());
 
-assert_eq!(other, b"hello world"[..]);
-
source

pub fn split_to(&mut self, at: usize) -> BytesMut

Splits the buffer into two at the given index.

+assert_eq!(other, b"hello world"[..]);
+
source

pub fn split_to(&mut self, at: usize) -> BytesMut

Splits the buffer into two at the given index.

Afterwards self contains elements [at, len), and the returned BytesMut contains elements [0, at).

This is an O(1) operation that just increases the reference count and @@ -149,17 +150,17 @@

Examples
Examples
use bytes::BytesMut;
 
-let mut a = BytesMut::from(&b"hello world"[..]);
+let mut a = BytesMut::from(&b"hello world"[..]);
 let mut b = a.split_to(5);
 
-a[0] = b'!';
-b[0] = b'j';
+a[0] = b'!';
+b[0] = b'j';
 
-assert_eq!(&a[..], b"!world");
-assert_eq!(&b[..], b"jello");
+assert_eq!(&a[..], b"!world"); +assert_eq!(&b[..], b"jello");
Panics

Panics if at > len.

-
source

pub fn truncate(&mut self, len: usize)

Shortens the buffer, keeping the first len bytes and dropping the +

source

pub fn truncate(&mut self, len: usize)

Shortens the buffer, keeping the first len bytes and dropping the rest.

If len is greater than the buffer’s current length, this has no effect.

@@ -169,17 +170,17 @@
Panics
Examples
use bytes::BytesMut;
 
-let mut buf = BytesMut::from(&b"hello world"[..]);
+let mut buf = BytesMut::from(&b"hello world"[..]);
 buf.truncate(5);
-assert_eq!(buf, b"hello"[..]);
+assert_eq!(buf, b"hello"[..]);
source

pub fn clear(&mut self)

Clears the buffer, removing all data. Existing capacity is preserved.

Examples
use bytes::BytesMut;
 
-let mut buf = BytesMut::from(&b"hello world"[..]);
+let mut buf = BytesMut::from(&b"hello world"[..]);
 buf.clear();
 assert!(buf.is_empty());
-
source

pub fn resize(&mut self, new_len: usize, value: u8)

Resizes the buffer so that len is equal to new_len.

+
source

pub fn resize(&mut self, new_len: usize, value: u8)

Resizes the buffer so that len is equal to new_len.

If new_len is greater than len, the buffer is extended by the difference with each additional byte set to value. If new_len is less than len, the buffer is simply truncated.

@@ -196,27 +197,27 @@
Examples
buf.resize(4, 0x3); assert_eq!(&buf[..], &[0x1, 0x1, 0x3, 0x3]);
-
source

pub unsafe fn set_len(&mut self, len: usize)

Sets the length of the buffer.

+
source

pub unsafe fn set_len(&mut self, len: usize)

Sets the length of the buffer.

This will explicitly set the size of the buffer without actually modifying the data, so it is up to the caller to ensure that the data has been initialized.

Examples
use bytes::BytesMut;
 
-let mut b = BytesMut::from(&b"hello world"[..]);
+let mut b = BytesMut::from(&b"hello world"[..]);
 
 unsafe {
     b.set_len(5);
 }
 
-assert_eq!(&b[..], b"hello");
+assert_eq!(&b[..], b"hello");
 
 unsafe {
     b.set_len(11);
 }
 
-assert_eq!(&b[..], b"hello world");
-
source

pub fn reserve(&mut self, additional: usize)

Reserves capacity for at least additional more bytes to be inserted +assert_eq!(&b[..], b"hello world");

+
source

pub fn reserve(&mut self, additional: usize)

Reserves capacity for at least additional more bytes to be inserted into the given BytesMut.

More than additional bytes may be reserved in order to avoid frequent reallocations. A call to reserve may result in an allocation.

@@ -239,7 +240,7 @@
Examples
use bytes::BytesMut;
 
-let mut buf = BytesMut::from(&b"hello"[..]);
+let mut buf = BytesMut::from(&b"hello"[..]);
 buf.reserve(64);
 assert!(buf.capacity() >= 69);

In the following example, the existing buffer is reclaimed.

@@ -262,17 +263,17 @@
Examples
assert_eq!(buf.as_ptr(), ptr);
Panics

Panics if the new capacity overflows usize.

-
source

pub fn extend_from_slice(&mut self, extend: &[u8])

Appends given bytes to this BytesMut.

+
source

pub fn extend_from_slice(&mut self, extend: &[u8])

Appends given bytes to this BytesMut.

If this BytesMut object does not have enough capacity, it is resized first.

Examples
use bytes::BytesMut;
 
 let mut buf = BytesMut::with_capacity(0);
-buf.extend_from_slice(b"aaabbb");
-buf.extend_from_slice(b"cccddd");
+buf.extend_from_slice(b"aaabbb");
+buf.extend_from_slice(b"cccddd");
 
-assert_eq!(b"aaabbbcccddd", &buf[..]);
+assert_eq!(b"aaabbbcccddd", &buf[..]);
source

pub fn unsplit(&mut self, other: BytesMut)

Absorbs a BytesMut that was previously split off.

If the two BytesMut objects were previously contiguous and not mutated in a way that causes re-allocation i.e., if other was created by @@ -284,15 +285,15 @@

Examples
use bytes::BytesMut;
 
 let mut buf = BytesMut::with_capacity(64);
-buf.extend_from_slice(b"aaabbbcccddd");
+buf.extend_from_slice(b"aaabbbcccddd");
 
 let split = buf.split_off(6);
-assert_eq!(b"aaabbb", &buf[..]);
-assert_eq!(b"cccddd", &split[..]);
+assert_eq!(b"aaabbb", &buf[..]);
+assert_eq!(b"cccddd", &split[..]);
 
 buf.unsplit(split);
-assert_eq!(b"aaabbbcccddd", &buf[..]);
-
source

pub fn spare_capacity_mut(&mut self) -> &mut [MaybeUninit<u8>]

Returns the remaining spare capacity of the buffer as a slice of MaybeUninit<u8>.

+assert_eq!(b"aaabbbcccddd", &buf[..]);
+
source

pub fn spare_capacity_mut(&mut self) -> &mut [MaybeUninit<u8>]

Returns the remaining spare capacity of the buffer as a slice of MaybeUninit<u8>.

The returned slice can be used to fill the buffer with data (e.g. by reading from a file) before marking the data as initialized using the set_len method.

@@ -314,78 +315,96 @@
Examples
} assert_eq!(&buf[..], &[0, 1, 2]);
-

Methods from Deref<Target = [u8]>§

source

pub fn flatten(&self) -> &[T]

🔬This is a nightly-only experimental API. (slice_flatten)

Takes a &[[T; N]], and flattens it to a &[T].

-
Panics
-

This panics if the length of the resulting slice would overflow a usize.

-

This is only possible when flattening a slice of arrays of zero-sized -types, and thus tends to be irrelevant in practice. If -size_of::<T>() > 0, this will never panic.

+

Methods from Deref<Target = [u8]>§

source

pub fn as_str(&self) -> &str

🔬This is a nightly-only experimental API. (ascii_char)

Views this slice of ASCII characters as a UTF-8 str.

+
source

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

🔬This is a nightly-only experimental API. (ascii_char)

Views this slice of ASCII characters as a slice of u8 bytes.

+
1.23.0 · source

pub fn is_ascii(&self) -> bool

Checks if all bytes in this slice are within the ASCII range.

+
source

pub fn as_ascii(&self) -> Option<&[AsciiChar]>

🔬This is a nightly-only experimental API. (ascii_char)

If this slice is_ascii, returns it as a slice of +ASCII characters, otherwise returns None.

+
source

pub unsafe fn as_ascii_unchecked(&self) -> &[AsciiChar]

🔬This is a nightly-only experimental API. (ascii_char)

Converts this slice of bytes into a slice of ASCII characters, +without checking whether they’re valid.

+
Safety
+

Every byte in the slice must be in 0..=127, or else this is UB.

+
1.23.0 · source

pub fn eq_ignore_ascii_case(&self, other: &[u8]) -> bool

Checks that two slices are an ASCII case-insensitive match.

+

Same as to_ascii_lowercase(a) == to_ascii_lowercase(b), +but without allocating and copying temporaries.

+
1.23.0 · source

pub fn make_ascii_uppercase(&mut self)

Converts this slice to its ASCII upper case equivalent in-place.

+

ASCII letters ‘a’ to ‘z’ are mapped to ‘A’ to ‘Z’, +but non-ASCII letters are unchanged.

+

To return a new uppercased value without modifying the existing one, use +to_ascii_uppercase.

+
1.23.0 · source

pub fn make_ascii_lowercase(&mut self)

Converts this slice to its ASCII lower case equivalent in-place.

+

ASCII letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’, +but non-ASCII letters are unchanged.

+

To return a new lowercased value without modifying the existing one, use +to_ascii_lowercase.

+
1.60.0 · source

pub fn escape_ascii(&self) -> EscapeAscii<'_>

Returns an iterator that produces an escaped version of this slice, +treating it as an ASCII string.

Examples
-
#![feature(slice_flatten)]
-
-assert_eq!([[1, 2, 3], [4, 5, 6]].flatten(), &[1, 2, 3, 4, 5, 6]);
-
-assert_eq!(
-    [[1, 2, 3], [4, 5, 6]].flatten(),
-    [[1, 2], [3, 4], [5, 6]].flatten(),
-);
-
-let slice_of_empty_arrays: &[[i32; 0]] = &[[], [], [], [], []];
-assert!(slice_of_empty_arrays.flatten().is_empty());
-
-let empty_slice_of_arrays: &[[u32; 10]] = &[];
-assert!(empty_slice_of_arrays.flatten().is_empty());
-
source

pub fn flatten_mut(&mut self) -> &mut [T]

🔬This is a nightly-only experimental API. (slice_flatten)

Takes a &mut [[T; N]], and flattens it to a &mut [T].

-
Panics
-

This panics if the length of the resulting slice would overflow a usize.

-

This is only possible when flattening a slice of arrays of zero-sized -types, and thus tends to be irrelevant in practice. If -size_of::<T>() > 0, this will never panic.

+

+let s = b"0\t\r\n'\"\\\x9d";
+let escaped = s.escape_ascii().to_string();
+assert_eq!(escaped, "0\\t\\r\\n\\'\\\"\\\\\\x9d");
+
source

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

🔬This is a nightly-only experimental API. (byte_slice_trim_ascii)

Returns a byte slice with leading ASCII whitespace bytes removed.

+

‘Whitespace’ refers to the definition used by +u8::is_ascii_whitespace.

Examples
-
#![feature(slice_flatten)]
-
-fn add_5_to_all(slice: &mut [i32]) {
-    for i in slice {
-        *i += 5;
-    }
-}
+
#![feature(byte_slice_trim_ascii)]
 
-let mut array = [[1, 2, 3], [4, 5, 6], [7, 8, 9]];
-add_5_to_all(array.flatten_mut());
-assert_eq!(array, [[6, 7, 8], [9, 10, 11], [12, 13, 14]]);
-
1.0.0 · source

pub fn len(&self) -> usize

Returns the number of elements in the slice.

+assert_eq!(b" \t hello world\n".trim_ascii_start(), b"hello world\n"); +assert_eq!(b" ".trim_ascii_start(), b""); +assert_eq!(b"".trim_ascii_start(), b"");
+
source

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

🔬This is a nightly-only experimental API. (byte_slice_trim_ascii)

Returns a byte slice with trailing ASCII whitespace bytes removed.

+

‘Whitespace’ refers to the definition used by +u8::is_ascii_whitespace.

Examples
+
#![feature(byte_slice_trim_ascii)]
+
+assert_eq!(b"\r hello world\n ".trim_ascii_end(), b"\r hello world");
+assert_eq!(b"  ".trim_ascii_end(), b"");
+assert_eq!(b"".trim_ascii_end(), b"");
+
source

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

🔬This is a nightly-only experimental API. (byte_slice_trim_ascii)

Returns a byte slice with leading and trailing ASCII whitespace bytes +removed.

+

‘Whitespace’ refers to the definition used by +u8::is_ascii_whitespace.

+
Examples
+
#![feature(byte_slice_trim_ascii)]
+
+assert_eq!(b"\r hello world\n ".trim_ascii(), b"hello world");
+assert_eq!(b"  ".trim_ascii(), b"");
+assert_eq!(b"".trim_ascii(), b"");
+
1.0.0 · source

pub fn len(&self) -> usize

Returns the number of elements in the slice.

+
Examples
let a = [1, 2, 3];
 assert_eq!(a.len(), 3);
-
1.0.0 · source

pub fn is_empty(&self) -> bool

Returns true if the slice has a length of 0.

-
Examples
+
1.0.0 · source

pub fn is_empty(&self) -> bool

Returns true if the slice has a length of 0.

+
Examples
let a = [1, 2, 3];
 assert!(!a.is_empty());
-
1.0.0 · source

pub fn first(&self) -> Option<&T>

Returns the first element of the slice, or None if it is empty.

-
Examples
+
1.0.0 · source

pub fn first(&self) -> Option<&T>

Returns the first element of the slice, or None if it is empty.

+
Examples
let v = [10, 40, 30];
 assert_eq!(Some(&10), v.first());
 
 let w: &[i32] = &[];
 assert_eq!(None, w.first());
-
1.0.0 · source

pub fn first_mut(&mut self) -> Option<&mut T>

Returns a mutable pointer to the first element of the slice, or None if it is empty.

-
Examples
+
1.0.0 · source

pub fn first_mut(&mut self) -> Option<&mut T>

Returns a mutable pointer to the first element of the slice, or None if it is empty.

+
Examples
let x = &mut [0, 1, 2];
 
 if let Some(first) = x.first_mut() {
     *first = 5;
 }
 assert_eq!(x, &[5, 1, 2]);
-
1.5.0 · source

pub 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.

-
Examples
+
1.5.0 · source

pub 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.

+
Examples
let x = &[0, 1, 2];
 
 if let Some((first, elements)) = x.split_first() {
     assert_eq!(first, &0);
     assert_eq!(elements, &[1, 2]);
 }
-
1.5.0 · source

pub 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.

-
Examples
+
1.5.0 · source

pub 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.

+
Examples
let x = &mut [0, 1, 2];
 
 if let Some((first, elements)) = x.split_first_mut() {
@@ -394,16 +413,16 @@ 
Examples
elements[1] = 5; } assert_eq!(x, &[3, 4, 5]);
-
1.5.0 · source

pub 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.

-
Examples
+
1.5.0 · source

pub 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.

+
Examples
let x = &[0, 1, 2];
 
 if let Some((last, elements)) = x.split_last() {
     assert_eq!(last, &2);
     assert_eq!(elements, &[0, 1]);
 }
-
1.5.0 · source

pub 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.

-
Examples
+
1.5.0 · source

pub 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.

+
Examples
let x = &mut [0, 1, 2];
 
 if let Some((last, elements)) = x.split_last_mut() {
@@ -412,23 +431,23 @@ 
Examples
elements[1] = 5; } assert_eq!(x, &[4, 5, 3]);
-
1.0.0 · source

pub fn last(&self) -> Option<&T>

Returns the last element of the slice, or None if it is empty.

-
Examples
+
1.0.0 · source

pub fn last(&self) -> Option<&T>

Returns the last element of the slice, or None if it is empty.

+
Examples
let v = [10, 40, 30];
 assert_eq!(Some(&30), v.last());
 
 let w: &[i32] = &[];
 assert_eq!(None, w.last());
-
1.0.0 · source

pub fn last_mut(&mut self) -> Option<&mut T>

Returns a mutable pointer to the last item in the slice.

-
Examples
+
1.0.0 · source

pub fn last_mut(&mut self) -> Option<&mut T>

Returns a mutable pointer to the last item in the slice.

+
Examples
let x = &mut [0, 1, 2];
 
 if let Some(last) = x.last_mut() {
     *last = 10;
 }
 assert_eq!(x, &[0, 1, 10]);
-
source

pub fn first_chunk<const N: usize>(&self) -> Option<&[T; N]>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns the first N elements of the slice, or None if it has fewer than N elements.

-
Examples
+
source

pub fn first_chunk<const N: usize>(&self) -> Option<&[T; N]>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns the first N elements of the slice, or None if it has fewer than N elements.

+
Examples
#![feature(slice_first_last_chunk)]
 
 let u = [10, 40, 30];
@@ -439,9 +458,9 @@ 
Examples
let w: &[i32] = &[]; assert_eq!(Some(&[]), w.first_chunk::<0>());
-
source

pub fn first_chunk_mut<const N: usize>(&mut self) -> Option<&mut [T; N]>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns a mutable reference to the first N elements of the slice, +

source

pub fn first_chunk_mut<const N: usize>(&mut self) -> Option<&mut [T; N]>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns a mutable reference to the first N elements of the slice, or None if it has fewer than N elements.

-
Examples
+
Examples
#![feature(slice_first_last_chunk)]
 
 let x = &mut [0, 1, 2];
@@ -451,9 +470,9 @@ 
Examples
first[1] = 4; } assert_eq!(x, &[5, 4, 2]);
-
source

pub fn split_first_chunk<const N: usize>(&self) -> Option<(&[T; N], &[T])>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns the first N elements of the slice and the remainder, +

source

pub fn split_first_chunk<const N: usize>(&self) -> Option<(&[T; N], &[T])>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns the first N elements of the slice and the remainder, or None if it has fewer than N elements.

-
Examples
+
Examples
#![feature(slice_first_last_chunk)]
 
 let x = &[0, 1, 2];
@@ -462,11 +481,11 @@ 
Examples
assert_eq!(first, &[0, 1]); assert_eq!(elements, &[2]); }
-
source

pub fn split_first_chunk_mut<const N: usize>( +

source

pub fn split_first_chunk_mut<const N: usize>( &mut self -) -> Option<(&mut [T; N], &mut [T])>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns a mutable reference to the first N elements of the slice and the remainder, +) -> Option<(&mut [T; N], &mut [T])>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns a mutable reference to the first N elements of the slice and the remainder, or None if it has fewer than N elements.

-
Examples
+
Examples
#![feature(slice_first_last_chunk)]
 
 let x = &mut [0, 1, 2];
@@ -477,9 +496,9 @@ 
Examples
elements[0] = 5; } assert_eq!(x, &[3, 4, 5]);
-
source

pub fn split_last_chunk<const N: usize>(&self) -> Option<(&[T; N], &[T])>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns the last N elements of the slice and the remainder, +

source

pub fn split_last_chunk<const N: usize>(&self) -> Option<(&[T; N], &[T])>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns the last N elements of the slice and the remainder, or None if it has fewer than N elements.

-
Examples
+
Examples
#![feature(slice_first_last_chunk)]
 
 let x = &[0, 1, 2];
@@ -488,10 +507,10 @@ 
Examples
assert_eq!(last, &[1, 2]); assert_eq!(elements, &[0]); }
-
source

pub fn split_last_chunk_mut<const N: usize>( +

source

pub fn split_last_chunk_mut<const N: usize>( &mut self -) -> Option<(&mut [T; N], &mut [T])>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns the last and all the rest of the elements of the slice, or None if it is empty.

-
Examples
+) -> Option<(&mut [T; N], &mut [T])>
🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns the last and all the rest of the elements of the slice, or None if it is empty.

+
Examples
#![feature(slice_first_last_chunk)]
 
 let x = &mut [0, 1, 2];
@@ -502,8 +521,8 @@ 
Examples
elements[0] = 5; } assert_eq!(x, &[5, 3, 4]);
-
source

pub fn last_chunk<const N: usize>(&self) -> Option<&[T; N]>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns the last element of the slice, or None if it is empty.

-
Examples
+
source

pub fn last_chunk<const N: usize>(&self) -> Option<&[T; N]>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns the last element of the slice, or None if it is empty.

+
Examples
#![feature(slice_first_last_chunk)]
 
 let u = [10, 40, 30];
@@ -514,8 +533,8 @@ 
Examples
let w: &[i32] = &[]; assert_eq!(Some(&[]), w.last_chunk::<0>());
-
source

pub fn last_chunk_mut<const N: usize>(&mut self) -> Option<&mut [T; N]>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns a mutable pointer to the last item in the slice.

-
Examples
+
source

pub fn last_chunk_mut<const N: usize>(&mut self) -> Option<&mut [T; N]>

🔬This is a nightly-only experimental API. (slice_first_last_chunk)

Returns a mutable pointer to the last item in the slice.

+
Examples
#![feature(slice_first_last_chunk)]
 
 let x = &mut [0, 1, 2];
@@ -525,8 +544,8 @@ 
Examples
last[1] = 20; } assert_eq!(x, &[0, 10, 20]);
-
1.0.0 · source

pub fn get<I>(&self, index: I) -> Option<&<I as SliceIndex<[T]>>::Output>where - I: SliceIndex<[T]>,

Returns a reference to an element or subslice depending on the type of +

1.0.0 · source

pub fn get<I>(&self, index: I) -> Option<&<I as SliceIndex<[T]>>::Output>
where + I: SliceIndex<[T]>,

Returns a reference to an element or subslice depending on the type of index.

  • If given a position, returns a reference to the element at that @@ -534,60 +553,60 @@
    Examples
  • If given a range, returns the subslice corresponding to that range, or None if out of bounds.
-
Examples
+
Examples
let v = [10, 40, 30];
 assert_eq!(Some(&40), v.get(1));
 assert_eq!(Some(&[10, 40][..]), v.get(0..2));
 assert_eq!(None, v.get(3));
 assert_eq!(None, v.get(0..4));
-
1.0.0 · source

pub fn get_mut<I>( +

1.0.0 · source

pub fn get_mut<I>( &mut self, index: I -) -> Option<&mut <I as SliceIndex<[T]>>::Output>where - I: SliceIndex<[T]>,

Returns a mutable reference to an element or subslice depending on the -type of index (see get) or None if the index is out of bounds.

-
Examples
+) -> Option<&mut <I as SliceIndex<[T]>>::Output>
where + I: SliceIndex<[T]>,

Returns a mutable reference to an element or subslice depending on the +type of index (see get) or None if the index is out of bounds.

+
Examples
let x = &mut [0, 1, 2];
 
 if let Some(elem) = x.get_mut(1) {
     *elem = 42;
 }
 assert_eq!(x, &[0, 42, 2]);
-
1.0.0 · source

pub unsafe fn get_unchecked<I>( +

1.0.0 · source

pub unsafe fn get_unchecked<I>( &self, index: I -) -> &<I as SliceIndex<[T]>>::Outputwhere - I: SliceIndex<[T]>,

Returns a reference to an element or subslice, without doing bounds +) -> &<I as SliceIndex<[T]>>::Output

where + I: SliceIndex<[T]>,

Returns a reference to an element or subslice, without doing bounds checking.

-

For a safe alternative see get.

-
Safety
+

For a safe alternative see get.

+
Safety

Calling this method with an out-of-bounds index is undefined behavior even if the resulting reference is not used.

You can think of this like .get(index).unwrap_unchecked(). It’s UB to call .get_unchecked(len), even if you immediately convert to a pointer. And it’s UB to call .get_unchecked(..len + 1), .get_unchecked(..=len), or similar.

-
Examples
+
Examples
let x = &[1, 2, 4];
 
 unsafe {
     assert_eq!(x.get_unchecked(1), &2);
 }
-
1.0.0 · source

pub unsafe fn get_unchecked_mut<I>( +

1.0.0 · source

pub unsafe fn get_unchecked_mut<I>( &mut self, index: I -) -> &mut <I as SliceIndex<[T]>>::Outputwhere - I: SliceIndex<[T]>,

Returns a mutable reference to an element or subslice, without doing +) -> &mut <I as SliceIndex<[T]>>::Output

where + I: SliceIndex<[T]>,

Returns a mutable reference to an element or subslice, without doing bounds checking.

-

For a safe alternative see get_mut.

-
Safety
+

For a safe alternative see get_mut.

+
Safety

Calling this method with an out-of-bounds index is undefined behavior even if the resulting reference is not used.

You can think of this like .get_mut(index).unwrap_unchecked(). It’s UB to call .get_unchecked_mut(len), even if you immediately convert to a pointer. And it’s UB to call .get_unchecked_mut(..len + 1), .get_unchecked_mut(..=len), or similar.

-
Examples
+
Examples
let x = &mut [1, 2, 4];
 
 unsafe {
@@ -595,15 +614,15 @@ 
Examples
*elem = 13; } assert_eq!(x, &[1, 13, 4]);
-
1.0.0 · source

pub fn as_ptr(&self) -> *const T

Returns a raw pointer to the slice’s buffer.

+
1.0.0 · source

pub fn as_ptr(&self) -> *const T

Returns a raw pointer to the slice’s buffer.

The caller must ensure that the slice outlives the pointer this function returns, or else it will end up pointing to garbage.

The caller must also ensure that the memory the pointer (non-transitively) points to is never written to (except inside an UnsafeCell) using this pointer or any pointer -derived from it. If you need to mutate the contents of the slice, use as_mut_ptr.

+derived from it. If you need to mutate the contents of the slice, use as_mut_ptr.

Modifying the container referenced by this slice may cause its buffer to be reallocated, which would also make any pointers to it invalid.

-
Examples
+
Examples
let x = &[1, 2, 4];
 let x_ptr = x.as_ptr();
 
@@ -612,12 +631,12 @@ 
Examples
assert_eq!(x.get_unchecked(i), &*x_ptr.add(i)); } }
-
1.0.0 · source

pub fn as_mut_ptr(&mut self) -> *mut T

Returns an unsafe mutable pointer to the slice’s buffer.

+
1.0.0 · source

pub fn as_mut_ptr(&mut self) -> *mut T

Returns an unsafe mutable pointer to the slice’s buffer.

The caller must ensure that the slice outlives the pointer this function returns, or else it will end up pointing to garbage.

Modifying the container referenced by this slice may cause its buffer to be reallocated, which would also make any pointers to it invalid.

-
Examples
+
Examples
let x = &mut [1, 2, 4];
 let x_ptr = x.as_mut_ptr();
 
@@ -627,12 +646,12 @@ 
Examples
} } assert_eq!(x, &[3, 4, 6]);
-
1.48.0 · source

pub fn as_ptr_range(&self) -> Range<*const T>

Returns the two raw pointers spanning the slice.

+
1.48.0 · source

pub fn as_ptr_range(&self) -> Range<*const T>

Returns the two raw pointers spanning the slice.

The returned range is half-open, which means that the end pointer points one past the last element of the slice. This way, an empty slice is represented by two equal pointers, and the difference between the two pointers represents the size of the slice.

-

See as_ptr for warnings on using these pointers. The end pointer +

See as_ptr for warnings on using these pointers. The end pointer requires extra caution, as it does not point to a valid element in the slice.

This function is useful for interacting with foreign interfaces which @@ -647,55 +666,55 @@

Examples
assert!(a.as_ptr_range().contains(&x)); assert!(!a.as_ptr_range().contains(&y));
-
1.48.0 · source

pub fn as_mut_ptr_range(&mut self) -> Range<*mut T>

Returns the two unsafe mutable pointers spanning the slice.

+
1.48.0 · source

pub fn as_mut_ptr_range(&mut self) -> Range<*mut T>

Returns the two unsafe mutable pointers spanning the slice.

The returned range is half-open, which means that the end pointer points one past the last element of the slice. This way, an empty slice is represented by two equal pointers, and the difference between the two pointers represents the size of the slice.

-

See as_mut_ptr for warnings on using these pointers. The end +

See as_mut_ptr for warnings on using these pointers. The end pointer requires extra caution, as it does not point to a valid element in the slice.

This function is useful for interacting with foreign interfaces which use two pointers to refer to a range of elements in memory, as is common in C++.

-
1.0.0 · source

pub fn swap(&mut self, a: usize, b: usize)

Swaps two elements in the slice.

+
1.0.0 · source

pub fn swap(&mut self, a: usize, b: usize)

Swaps two elements in the slice.

If a equals to b, it’s guaranteed that elements won’t change value.

Arguments
  • a - The index of the first element
  • b - The index of the second element
-
Panics
+
Panics

Panics if a or b are out of bounds.

-
Examples
-
let mut v = ["a", "b", "c", "d", "e"];
+
Examples
+
let mut v = ["a", "b", "c", "d", "e"];
 v.swap(2, 4);
-assert!(v == ["a", "b", "e", "d", "c"]);
-
source

pub 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.

-

For a safe alternative see swap.

+assert!(v == ["a", "b", "e", "d", "c"]);
+
source

pub 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.

+

For a safe alternative see swap.

Arguments
  • a - The index of the first element
  • b - The index of the second element
-
Safety
+
Safety

Calling this method with an out-of-bounds index is undefined behavior. The caller has to ensure that a < self.len() and b < self.len().

-
Examples
+
Examples
#![feature(slice_swap_unchecked)]
 
-let mut v = ["a", "b", "c", "d"];
+let mut v = ["a", "b", "c", "d"];
 // SAFETY: we know that 1 and 3 are both indices of the slice
 unsafe { v.swap_unchecked(1, 3) };
-assert!(v == ["a", "d", "c", "b"]);
-
1.0.0 · source

pub fn reverse(&mut self)

Reverses the order of elements in the slice, in place.

-
Examples
+assert!(v == ["a", "d", "c", "b"]);
+
1.0.0 · source

pub fn reverse(&mut self)

Reverses the order of elements in the slice, in place.

+
Examples
let mut v = [1, 2, 3];
 v.reverse();
 assert!(v == [3, 2, 1]);
-
1.0.0 · source

pub fn iter(&self) -> Iter<'_, T>

Returns an iterator over the slice.

+
1.0.0 · source

pub fn iter(&self) -> Iter<'_, T>

Returns an iterator over the slice.

The iterator yields all items from start to end.

-
Examples
+
Examples
let x = &[1, 2, 4];
 let mut iterator = x.iter();
 
@@ -703,71 +722,71 @@ 
Examples
assert_eq!(iterator.next(), Some(&2)); assert_eq!(iterator.next(), Some(&4)); assert_eq!(iterator.next(), None);
-
1.0.0 · source

pub fn iter_mut(&mut self) -> IterMut<'_, T>

Returns an iterator that allows modifying each value.

+
1.0.0 · source

pub fn iter_mut(&mut self) -> IterMut<'_, T>

Returns an iterator that allows modifying each value.

The iterator yields all items from start to end.

-
Examples
+
Examples
let x = &mut [1, 2, 4];
 for elem in x.iter_mut() {
     *elem += 2;
 }
 assert_eq!(x, &[3, 4, 6]);
-
1.0.0 · source

pub fn windows(&self, size: usize) -> Windows<'_, T>

Returns an iterator over all contiguous windows of length +

1.0.0 · source

pub fn windows(&self, size: usize) -> Windows<'_, T>

Returns an iterator over all contiguous windows of length size. The windows overlap. If the slice is shorter than size, the iterator returns no values.

-
Panics
+
Panics

Panics if size is 0.

-
Examples
-
let slice = ['r', 'u', 's', 't'];
-let mut iter = slice.windows(2);
-assert_eq!(iter.next().unwrap(), &['r', 'u']);
-assert_eq!(iter.next().unwrap(), &['u', 's']);
-assert_eq!(iter.next().unwrap(), &['s', 't']);
+
Examples
+
let slice = ['l', 'o', 'r', 'e', 'm'];
+let mut iter = slice.windows(3);
+assert_eq!(iter.next().unwrap(), &['l', 'o', 'r']);
+assert_eq!(iter.next().unwrap(), &['o', 'r', 'e']);
+assert_eq!(iter.next().unwrap(), &['r', 'e', 'm']);
 assert!(iter.next().is_none());

If the slice is shorter than size:

-
let slice = ['f', 'o', 'o'];
+
let slice = ['f', 'o', 'o'];
 let mut iter = slice.windows(4);
 assert!(iter.next().is_none());

There’s no windows_mut, as that existing would let safe code violate the “only one &mut at a time to the same thing” rule. However, you can sometimes -use Cell::as_slice_of_cells in +use Cell::as_slice_of_cells in conjunction with windows to accomplish something similar:

use std::cell::Cell;
 
-let mut array = ['R', 'u', 's', 't', ' ', '2', '0', '1', '5'];
+let mut array = ['R', 'u', 's', 't', ' ', '2', '0', '1', '5'];
 let slice = &mut array[..];
 let slice_of_cells: &[Cell<char>] = Cell::from_mut(slice).as_slice_of_cells();
 for w in slice_of_cells.windows(3) {
     Cell::swap(&w[0], &w[2]);
 }
-assert_eq!(array, ['s', 't', ' ', '2', '0', '1', '5', 'u', 'R']);
-
1.0.0 · 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 +assert_eq!(array, ['s', 't', ' ', '2', '0', '1', '5', 'u', 'R']);

+
1.0.0 · 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 beginning of the slice.

The chunks are slices and do not overlap. If chunk_size does not divide the length of the slice, then the last chunk will not have length chunk_size.

-

See chunks_exact for a variant of this iterator that returns chunks of always exactly -chunk_size elements, and rchunks for the same iterator but starting at the end of the +

See chunks_exact for a variant of this iterator that returns chunks of always exactly +chunk_size elements, and rchunks for the same iterator but starting at the end of the slice.

-
Panics
+
Panics

Panics if chunk_size is 0.

-
Examples
-
let slice = ['l', 'o', 'r', 'e', 'm'];
+
Examples
+
let slice = ['l', 'o', 'r', 'e', 'm'];
 let mut iter = slice.chunks(2);
-assert_eq!(iter.next().unwrap(), &['l', 'o']);
-assert_eq!(iter.next().unwrap(), &['r', 'e']);
-assert_eq!(iter.next().unwrap(), &['m']);
+assert_eq!(iter.next().unwrap(), &['l', 'o']);
+assert_eq!(iter.next().unwrap(), &['r', 'e']);
+assert_eq!(iter.next().unwrap(), &['m']);
 assert!(iter.next().is_none());
-
1.0.0 · 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 +

1.0.0 · 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 beginning of the slice.

The chunks are mutable slices, and do not overlap. If chunk_size does not divide the length of the slice, then the last chunk will not have length chunk_size.

-

See chunks_exact_mut for a variant of this iterator that returns chunks of always -exactly chunk_size elements, and rchunks_mut for the same iterator but starting at +

See chunks_exact_mut for a variant of this iterator that returns chunks of always +exactly chunk_size elements, and rchunks_mut for the same iterator but starting at the end of the slice.

-
Panics
+
Panics

Panics if chunk_size is 0.

-
Examples
+
Examples
let v = &mut [0, 0, 0, 0, 0];
 let mut count = 1;
 
@@ -778,37 +797,37 @@ 
Examples
count += 1; } assert_eq!(v, &[1, 1, 2, 2, 3]);
-
1.31.0 · 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 +

1.31.0 · 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 beginning of the slice.

The chunks are slices and do not overlap. If chunk_size does not divide the length of the slice, then the last up to chunk_size-1 elements will be omitted and can be retrieved from the remainder function of the iterator.

Due to each chunk having exactly chunk_size elements, the compiler can often optimize the -resulting code better than in the case of chunks.

-

See chunks for a variant of this iterator that also returns the remainder as a smaller -chunk, and rchunks_exact for the same iterator but starting at the end of the slice.

-
Panics
+resulting code better than in the case of chunks.

+

See chunks for a variant of this iterator that also returns the remainder as a smaller +chunk, and rchunks_exact for the same iterator but starting at the end of the slice.

+
Panics

Panics if chunk_size is 0.

-
Examples
-
let slice = ['l', 'o', 'r', 'e', 'm'];
+
Examples
+
let slice = ['l', 'o', 'r', 'e', 'm'];
 let mut iter = slice.chunks_exact(2);
-assert_eq!(iter.next().unwrap(), &['l', 'o']);
-assert_eq!(iter.next().unwrap(), &['r', 'e']);
+assert_eq!(iter.next().unwrap(), &['l', 'o']);
+assert_eq!(iter.next().unwrap(), &['r', 'e']);
 assert!(iter.next().is_none());
-assert_eq!(iter.remainder(), &['m']);
-
1.31.0 · 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 +assert_eq!(iter.remainder(), &['m']);

+
1.31.0 · 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 beginning of the slice.

The chunks are mutable slices, and do not overlap. If chunk_size does not divide the length of the slice, then the last up to chunk_size-1 elements will be omitted and can be retrieved from the into_remainder function of the iterator.

Due to each chunk having exactly chunk_size elements, the compiler can often optimize the -resulting code better than in the case of chunks_mut.

-

See chunks_mut for a variant of this iterator that also returns the remainder as a -smaller chunk, and rchunks_exact_mut for the same iterator but starting at the end of +resulting code better than in the case of chunks_mut.

+

See chunks_mut for a variant of this iterator that also returns the remainder as a +smaller chunk, and rchunks_exact_mut for the same iterator but starting at the end of the slice.

-
Panics
+
Panics

Panics if chunk_size is 0.

-
Examples
+
Examples
let v = &mut [0, 0, 0, 0, 0];
 let mut count = 1;
 
@@ -819,113 +838,113 @@ 
Examples
count += 1; } assert_eq!(v, &[1, 1, 2, 2, 0]);
-
source

pub unsafe fn as_chunks_unchecked<const N: usize>(&self) -> &[[T; N]]

🔬This is a nightly-only experimental API. (slice_as_chunks)

Splits the slice into a slice of N-element arrays, +

source

pub unsafe fn as_chunks_unchecked<const N: usize>(&self) -> &[[T; N]]

🔬This is a nightly-only experimental API. (slice_as_chunks)

Splits the slice into a slice of N-element arrays, assuming that there’s no remainder.

-
Safety
+
Safety

This may only be called when

  • The slice splits exactly into N-element chunks (aka self.len() % N == 0).
  • N != 0.
-
Examples
+
Examples
#![feature(slice_as_chunks)]
-let slice: &[char] = &['l', 'o', 'r', 'e', 'm', '!'];
+let slice: &[char] = &['l', 'o', 'r', 'e', 'm', '!'];
 let chunks: &[[char; 1]] =
     // SAFETY: 1-element chunks never have remainder
     unsafe { slice.as_chunks_unchecked() };
-assert_eq!(chunks, &[['l'], ['o'], ['r'], ['e'], ['m'], ['!']]);
+assert_eq!(chunks, &[['l'], ['o'], ['r'], ['e'], ['m'], ['!']]);
 let chunks: &[[char; 3]] =
     // SAFETY: The slice length (6) is a multiple of 3
     unsafe { slice.as_chunks_unchecked() };
-assert_eq!(chunks, &[['l', 'o', 'r'], ['e', 'm', '!']]);
+assert_eq!(chunks, &[['l', 'o', 'r'], ['e', 'm', '!']]);
 
 // These would be unsound:
 // let chunks: &[[_; 5]] = slice.as_chunks_unchecked() // The slice length is not a multiple of 5
 // let chunks: &[[_; 0]] = slice.as_chunks_unchecked() // Zero-length chunks are never allowed
-
source

pub fn as_chunks<const N: usize>(&self) -> (&[[T; N]], &[T])

🔬This is a nightly-only experimental API. (slice_as_chunks)

Splits the slice into a slice of N-element arrays, +

source

pub fn as_chunks<const N: usize>(&self) -> (&[[T; N]], &[T])

🔬This is a nightly-only experimental API. (slice_as_chunks)

Splits the slice into a slice of N-element arrays, starting at the beginning of the slice, and a remainder slice with length strictly less than N.

-
Panics
+
Panics

Panics if N is 0. This check will most probably get changed to a compile time error before this method gets stabilized.

-
Examples
+
Examples
#![feature(slice_as_chunks)]
-let slice = ['l', 'o', 'r', 'e', 'm'];
+let slice = ['l', 'o', 'r', 'e', 'm'];
 let (chunks, remainder) = slice.as_chunks();
-assert_eq!(chunks, &[['l', 'o'], ['r', 'e']]);
-assert_eq!(remainder, &['m']);
+assert_eq!(chunks, &[['l', 'o'], ['r', 'e']]); +assert_eq!(remainder, &['m']);

If you expect the slice to be an exact multiple, you can combine let-else with an empty slice pattern:

#![feature(slice_as_chunks)]
-let slice = ['R', 'u', 's', 't'];
+let slice = ['R', 'u', 's', 't'];
 let (chunks, []) = slice.as_chunks::<2>() else {
-    panic!("slice didn't have even length")
+    panic!("slice didn't have even length")
 };
-assert_eq!(chunks, &[['R', 'u'], ['s', 't']]);
-
source

pub fn as_rchunks<const N: usize>(&self) -> (&[T], &[[T; N]])

🔬This is a nightly-only experimental API. (slice_as_chunks)

Splits the slice into a slice of N-element arrays, +assert_eq!(chunks, &[['R', 'u'], ['s', 't']]);

+
source

pub fn as_rchunks<const N: usize>(&self) -> (&[T], &[[T; N]])

🔬This is a nightly-only experimental API. (slice_as_chunks)

Splits the slice into a slice of N-element arrays, starting at the end of the slice, and a remainder slice with length strictly less than N.

-
Panics
+
Panics

Panics if N is 0. This check will most probably get changed to a compile time error before this method gets stabilized.

-
Examples
+
Examples
#![feature(slice_as_chunks)]
-let slice = ['l', 'o', 'r', 'e', 'm'];
+let slice = ['l', 'o', 'r', 'e', 'm'];
 let (remainder, chunks) = slice.as_rchunks();
-assert_eq!(remainder, &['l']);
-assert_eq!(chunks, &[['o', 'r'], ['e', 'm']]);
-
source

pub fn array_chunks<const N: usize>(&self) -> ArrayChunks<'_, T, N>

🔬This is a nightly-only experimental API. (array_chunks)

Returns an iterator over N elements of the slice at a time, starting at the +assert_eq!(remainder, &['l']); +assert_eq!(chunks, &[['o', 'r'], ['e', 'm']]);

+
source

pub fn array_chunks<const N: usize>(&self) -> ArrayChunks<'_, T, N>

🔬This is a nightly-only experimental API. (array_chunks)

Returns an iterator over N elements of the slice at a time, starting at the beginning of the slice.

The chunks are array references and do not overlap. If N does not divide the length of the slice, then the last up to N-1 elements will be omitted and can be retrieved from the remainder function of the iterator.

-

This method is the const generic equivalent of chunks_exact.

-
Panics
+

This method is the const generic equivalent of chunks_exact.

+
Panics

Panics if N is 0. This check will most probably get changed to a compile time error before this method gets stabilized.

-
Examples
+
Examples
#![feature(array_chunks)]
-let slice = ['l', 'o', 'r', 'e', 'm'];
+let slice = ['l', 'o', 'r', 'e', 'm'];
 let mut iter = slice.array_chunks();
-assert_eq!(iter.next().unwrap(), &['l', 'o']);
-assert_eq!(iter.next().unwrap(), &['r', 'e']);
+assert_eq!(iter.next().unwrap(), &['l', 'o']);
+assert_eq!(iter.next().unwrap(), &['r', 'e']);
 assert!(iter.next().is_none());
-assert_eq!(iter.remainder(), &['m']);
-
source

pub unsafe fn as_chunks_unchecked_mut<const N: usize>( +assert_eq!(iter.remainder(), &['m']); +

source

pub unsafe fn as_chunks_unchecked_mut<const N: usize>( &mut self -) -> &mut [[T; N]]

🔬This is a nightly-only experimental API. (slice_as_chunks)

Splits the slice into a slice of N-element arrays, +) -> &mut [[T; N]]

🔬This is a nightly-only experimental API. (slice_as_chunks)

Splits the slice into a slice of N-element arrays, assuming that there’s no remainder.

-
Safety
+
Safety

This may only be called when

  • The slice splits exactly into N-element chunks (aka self.len() % N == 0).
  • N != 0.
-
Examples
+
Examples
#![feature(slice_as_chunks)]
-let slice: &mut [char] = &mut ['l', 'o', 'r', 'e', 'm', '!'];
+let slice: &mut [char] = &mut ['l', 'o', 'r', 'e', 'm', '!'];
 let chunks: &mut [[char; 1]] =
     // SAFETY: 1-element chunks never have remainder
     unsafe { slice.as_chunks_unchecked_mut() };
-chunks[0] = ['L'];
-assert_eq!(chunks, &[['L'], ['o'], ['r'], ['e'], ['m'], ['!']]);
+chunks[0] = ['L'];
+assert_eq!(chunks, &[['L'], ['o'], ['r'], ['e'], ['m'], ['!']]);
 let chunks: &mut [[char; 3]] =
     // SAFETY: The slice length (6) is a multiple of 3
     unsafe { slice.as_chunks_unchecked_mut() };
-chunks[1] = ['a', 'x', '?'];
-assert_eq!(slice, &['L', 'o', 'r', 'a', 'x', '?']);
+chunks[1] = ['a', 'x', '?'];
+assert_eq!(slice, &['L', 'o', 'r', 'a', 'x', '?']);
 
 // These would be unsound:
 // let chunks: &[[_; 5]] = slice.as_chunks_unchecked_mut() // The slice length is not a multiple of 5
 // let chunks: &[[_; 0]] = slice.as_chunks_unchecked_mut() // Zero-length chunks are never allowed
-
source

pub fn as_chunks_mut<const N: usize>(&mut self) -> (&mut [[T; N]], &mut [T])

🔬This is a nightly-only experimental API. (slice_as_chunks)

Splits the slice into a slice of N-element arrays, +

source

pub fn as_chunks_mut<const N: usize>(&mut self) -> (&mut [[T; N]], &mut [T])

🔬This is a nightly-only experimental API. (slice_as_chunks)

Splits the slice into a slice of N-element arrays, starting at the beginning of the slice, and a remainder slice with length strictly less than N.

-
Panics
+
Panics

Panics if N is 0. This check will most probably get changed to a compile time error before this method gets stabilized.

-
Examples
+
Examples
#![feature(slice_as_chunks)]
 let v = &mut [0, 0, 0, 0, 0];
 let mut count = 1;
@@ -937,13 +956,13 @@ 
Examples
count += 1; } assert_eq!(v, &[1, 1, 2, 2, 9]);
-
source

pub fn as_rchunks_mut<const N: usize>(&mut self) -> (&mut [T], &mut [[T; N]])

🔬This is a nightly-only experimental API. (slice_as_chunks)

Splits the slice into a slice of N-element arrays, +

source

pub fn as_rchunks_mut<const N: usize>(&mut self) -> (&mut [T], &mut [[T; N]])

🔬This is a nightly-only experimental API. (slice_as_chunks)

Splits the slice into a slice of N-element arrays, starting at the end of the slice, and a remainder slice with length strictly less than N.

-
Panics
+
Panics

Panics if N is 0. This check will most probably get changed to a compile time error before this method gets stabilized.

-
Examples
+
Examples
#![feature(slice_as_chunks)]
 let v = &mut [0, 0, 0, 0, 0];
 let mut count = 1;
@@ -955,16 +974,16 @@ 
Examples
count += 1; } assert_eq!(v, &[9, 1, 1, 2, 2]);
-
source

pub fn array_chunks_mut<const N: usize>(&mut self) -> ArrayChunksMut<'_, T, N>

🔬This is a nightly-only experimental API. (array_chunks)

Returns an iterator over N elements of the slice at a time, starting at the +

source

pub fn array_chunks_mut<const N: usize>(&mut self) -> ArrayChunksMut<'_, T, N>

🔬This is a nightly-only experimental API. (array_chunks)

Returns an iterator over N elements of the slice at a time, starting at the beginning of the slice.

The chunks are mutable array references and do not overlap. If N does not divide the length of the slice, then the last up to N-1 elements will be omitted and can be retrieved from the into_remainder function of the iterator.

-

This method is the const generic equivalent of chunks_exact_mut.

-
Panics
+

This method is the const generic equivalent of chunks_exact_mut.

+
Panics

Panics if N is 0. This check will most probably get changed to a compile time error before this method gets stabilized.

-
Examples
+
Examples
#![feature(array_chunks)]
 let v = &mut [0, 0, 0, 0, 0];
 let mut count = 1;
@@ -974,14 +993,14 @@ 
Examples
count += 1; } assert_eq!(v, &[1, 1, 2, 2, 0]);
-
source

pub fn array_windows<const N: usize>(&self) -> ArrayWindows<'_, T, N>

🔬This is a nightly-only experimental API. (array_windows)

Returns an iterator over overlapping windows of N elements of a slice, +

source

pub fn array_windows<const N: usize>(&self) -> ArrayWindows<'_, T, N>

🔬This is a nightly-only experimental API. (array_windows)

Returns an iterator over overlapping windows of N elements of a slice, starting at the beginning of the slice.

-

This is the const generic equivalent of windows.

+

This is the const generic equivalent of windows.

If N is greater than the size of the slice, it will return no windows.

-
Panics
+
Panics

Panics if N is 0. This check will most probably get changed to a compile time error before this method gets stabilized.

-
Examples
+
Examples
#![feature(array_windows)]
 let slice = [0, 1, 2, 3];
 let mut iter = slice.array_windows();
@@ -989,32 +1008,32 @@ 
Examples
assert_eq!(iter.next().unwrap(), &[1, 2]); assert_eq!(iter.next().unwrap(), &[2, 3]); assert!(iter.next().is_none());
-
1.31.0 · 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 +

1.31.0 · 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 of the slice.

The chunks are slices and do not overlap. If chunk_size does not divide the length of the slice, then the last chunk will not have length chunk_size.

-

See rchunks_exact for a variant of this iterator that returns chunks of always exactly -chunk_size elements, and chunks for the same iterator but starting at the beginning +

See rchunks_exact for a variant of this iterator that returns chunks of always exactly +chunk_size elements, and chunks for the same iterator but starting at the beginning of the slice.

-
Panics
+
Panics

Panics if chunk_size is 0.

-
Examples
-
let slice = ['l', 'o', 'r', 'e', 'm'];
+
Examples
+
let slice = ['l', 'o', 'r', 'e', 'm'];
 let mut iter = slice.rchunks(2);
-assert_eq!(iter.next().unwrap(), &['e', 'm']);
-assert_eq!(iter.next().unwrap(), &['o', 'r']);
-assert_eq!(iter.next().unwrap(), &['l']);
+assert_eq!(iter.next().unwrap(), &['e', 'm']);
+assert_eq!(iter.next().unwrap(), &['o', 'r']);
+assert_eq!(iter.next().unwrap(), &['l']);
 assert!(iter.next().is_none());
-
1.31.0 · 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 +

1.31.0 · 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 of the slice.

The chunks are mutable slices, and do not overlap. If chunk_size does not divide the length of the slice, then the last chunk will not have length chunk_size.

-

See rchunks_exact_mut for a variant of this iterator that returns chunks of always -exactly chunk_size elements, and chunks_mut for the same iterator but starting at the +

See rchunks_exact_mut for a variant of this iterator that returns chunks of always +exactly chunk_size elements, and chunks_mut for the same iterator but starting at the beginning of the slice.

-
Panics
+
Panics

Panics if chunk_size is 0.

-
Examples
+
Examples
let v = &mut [0, 0, 0, 0, 0];
 let mut count = 1;
 
@@ -1025,38 +1044,38 @@ 
Examples
count += 1; } assert_eq!(v, &[3, 2, 2, 1, 1]);
-
1.31.0 · 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 +

1.31.0 · 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 end of the slice.

The chunks are slices and do not overlap. If chunk_size does not divide the length of the slice, then the last up to chunk_size-1 elements will be omitted and can be retrieved from the remainder function of the iterator.

Due to each chunk having exactly chunk_size elements, the compiler can often optimize the -resulting code better than in the case of rchunks.

-

See rchunks for a variant of this iterator that also returns the remainder as a smaller -chunk, and chunks_exact for the same iterator but starting at the beginning of the +resulting code better than in the case of rchunks.

+

See rchunks for a variant of this iterator that also returns the remainder as a smaller +chunk, and chunks_exact for the same iterator but starting at the beginning of the slice.

-
Panics
+
Panics

Panics if chunk_size is 0.

-
Examples
-
let slice = ['l', 'o', 'r', 'e', 'm'];
+
Examples
+
let slice = ['l', 'o', 'r', 'e', 'm'];
 let mut iter = slice.rchunks_exact(2);
-assert_eq!(iter.next().unwrap(), &['e', 'm']);
-assert_eq!(iter.next().unwrap(), &['o', 'r']);
+assert_eq!(iter.next().unwrap(), &['e', 'm']);
+assert_eq!(iter.next().unwrap(), &['o', 'r']);
 assert!(iter.next().is_none());
-assert_eq!(iter.remainder(), &['l']);
-
1.31.0 · 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 +assert_eq!(iter.remainder(), &['l']);

+
1.31.0 · 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 of the slice.

The chunks are mutable slices, and do not overlap. If chunk_size does not divide the length of the slice, then the last up to chunk_size-1 elements will be omitted and can be retrieved from the into_remainder function of the iterator.

Due to each chunk having exactly chunk_size elements, the compiler can often optimize the -resulting code better than in the case of chunks_mut.

-

See rchunks_mut for a variant of this iterator that also returns the remainder as a -smaller chunk, and chunks_exact_mut for the same iterator but starting at the beginning +resulting code better than in the case of chunks_mut.

+

See rchunks_mut for a variant of this iterator that also returns the remainder as a +smaller chunk, and chunks_exact_mut for the same iterator but starting at the beginning of the slice.

-
Panics
+
Panics

Panics if chunk_size is 0.

-
Examples
+
Examples
let v = &mut [0, 0, 0, 0, 0];
 let mut count = 1;
 
@@ -1067,13 +1086,13 @@ 
Examples
count += 1; } assert_eq!(v, &[0, 2, 2, 1, 1]);
-
source

pub fn group_by<F>(&self, pred: F) -> GroupBy<'_, T, F>where - F: FnMut(&T, &T) -> bool,

🔬This is a nightly-only experimental API. (slice_group_by)

Returns an iterator over the slice producing non-overlapping runs +

source

pub fn group_by<F>(&self, pred: F) -> GroupBy<'_, T, F>
where + F: FnMut(&T, &T) -> bool,

🔬This is a nightly-only experimental API. (slice_group_by)

Returns an iterator over the slice producing non-overlapping runs of elements using the predicate to separate them.

The predicate is called on two elements following themselves, it means the predicate is called on slice[0] and slice[1] then on slice[1] and slice[2] and so on.

-
Examples
+
Examples
#![feature(slice_group_by)]
 
 let slice = &[1, 1, 1, 3, 3, 2, 2, 2];
@@ -1096,13 +1115,13 @@ 
Examples
assert_eq!(iter.next(), Some(&[2, 3][..])); assert_eq!(iter.next(), Some(&[2, 3, 4][..])); assert_eq!(iter.next(), None);
-
source

pub fn group_by_mut<F>(&mut self, pred: F) -> GroupByMut<'_, T, F>where - F: FnMut(&T, &T) -> bool,

🔬This is a nightly-only experimental API. (slice_group_by)

Returns an iterator over the slice producing non-overlapping mutable +

source

pub fn group_by_mut<F>(&mut self, pred: F) -> GroupByMut<'_, T, F>
where + F: FnMut(&T, &T) -> bool,

🔬This is a nightly-only experimental API. (slice_group_by)

Returns an iterator over the slice producing non-overlapping mutable runs of elements using the predicate to separate them.

The predicate is called on two elements following themselves, it means the predicate is called on slice[0] and slice[1] then on slice[1] and slice[2] and so on.

-
Examples
+
Examples
#![feature(slice_group_by)]
 
 let slice = &mut [1, 1, 1, 3, 3, 2, 2, 2];
@@ -1125,13 +1144,13 @@ 
Examples
assert_eq!(iter.next(), Some(&mut [2, 3][..])); assert_eq!(iter.next(), Some(&mut [2, 3, 4][..])); assert_eq!(iter.next(), None);
-
1.0.0 · source

pub fn split_at(&self, mid: usize) -> (&[T], &[T])

Divides one slice into two at an index.

+
1.0.0 · source

pub fn split_at(&self, mid: usize) -> (&[T], &[T])

Divides one slice into two at an index.

The first will contain all indices from [0, mid) (excluding the index mid itself) and the second will contain all indices from [mid, len) (excluding the index len itself).

-
Panics
+
Panics

Panics if mid > len.

-
Examples
+
Examples
let v = [1, 2, 3, 4, 5, 6];
 
 {
@@ -1151,13 +1170,13 @@ 
Examples
assert_eq!(left, [1, 2, 3, 4, 5, 6]); assert_eq!(right, []); }
-
1.0.0 · source

pub fn split_at_mut(&mut self, mid: usize) -> (&mut [T], &mut [T])

Divides one mutable slice into two at an index.

+
1.0.0 · source

pub fn split_at_mut(&mut self, mid: usize) -> (&mut [T], &mut [T])

Divides one mutable slice into two at an index.

The first will contain all indices from [0, mid) (excluding the index mid itself) and the second will contain all indices from [mid, len) (excluding the index len itself).

-
Panics
+
Panics

Panics if mid > len.

-
Examples
+
Examples
let mut v = [1, 0, 3, 0, 5, 6];
 let (left, right) = v.split_at_mut(2);
 assert_eq!(left, [1, 0]);
@@ -1165,16 +1184,16 @@ 
Examples
left[1] = 2; right[1] = 4; assert_eq!(v, [1, 2, 3, 4, 5, 6]);
-
source

pub unsafe fn split_at_unchecked(&self, mid: usize) -> (&[T], &[T])

🔬This is a nightly-only experimental API. (slice_split_at_unchecked)

Divides one slice into two at an index, without doing bounds checking.

+
source

pub unsafe fn split_at_unchecked(&self, mid: usize) -> (&[T], &[T])

🔬This is a nightly-only experimental API. (slice_split_at_unchecked)

Divides one slice into two at an index, without doing bounds checking.

The first will contain all indices from [0, mid) (excluding the index mid itself) and the second will contain all indices from [mid, len) (excluding the index len itself).

-

For a safe alternative see split_at.

-
Safety
+

For a safe alternative see split_at.

+
Safety

Calling this method with an out-of-bounds index is undefined behavior even if the resulting reference is not used. The caller has to ensure that 0 <= mid <= self.len().

-
Examples
+
Examples
#![feature(slice_split_at_unchecked)]
 
 let v = [1, 2, 3, 4, 5, 6];
@@ -1196,19 +1215,19 @@ 
Examples
assert_eq!(left, [1, 2, 3, 4, 5, 6]); assert_eq!(right, []); }
-
source

pub unsafe fn split_at_mut_unchecked( +

source

pub unsafe fn split_at_mut_unchecked( &mut self, - mid: usize -) -> (&mut [T], &mut [T])

🔬This is a nightly-only experimental API. (slice_split_at_unchecked)

Divides one mutable slice into two at an index, without doing bounds checking.

+ mid: usize +) -> (&mut [T], &mut [T])
🔬This is a nightly-only experimental API. (slice_split_at_unchecked)

Divides one mutable slice into two at an index, without doing bounds checking.

The first will contain all indices from [0, mid) (excluding the index mid itself) and the second will contain all indices from [mid, len) (excluding the index len itself).

-

For a safe alternative see split_at_mut.

-
Safety
+

For a safe alternative see split_at_mut.

+
Safety

Calling this method with an out-of-bounds index is undefined behavior even if the resulting reference is not used. The caller has to ensure that 0 <= mid <= self.len().

-
Examples
+
Examples
#![feature(slice_split_at_unchecked)]
 
 let mut v = [1, 0, 3, 0, 5, 6];
@@ -1221,13 +1240,13 @@ 
Examples
right[1] = 4; } assert_eq!(v, [1, 2, 3, 4, 5, 6]);
-
source

pub fn split_array_ref<const N: usize>(&self) -> (&[T; N], &[T])

🔬This is a nightly-only experimental API. (split_array)

Divides one slice into an array and a remainder slice at an index.

+
source

pub fn split_array_ref<const N: usize>(&self) -> (&[T; N], &[T])

🔬This is a nightly-only experimental API. (split_array)

Divides one slice into an array and a remainder slice at an index.

The array will contain all indices from [0, N) (excluding the index N itself) and the slice will contain all indices from [N, len) (excluding the index len itself).

-
Panics
+
Panics

Panics if N > len.

-
Examples
+
Examples
#![feature(split_array)]
 
 let v = &[1, 2, 3, 4, 5, 6][..];
@@ -1249,13 +1268,13 @@ 
Examples
assert_eq!(left, &[1, 2, 3, 4, 5, 6]); assert_eq!(right, []); }
-
source

pub fn split_array_mut<const N: usize>(&mut self) -> (&mut [T; N], &mut [T])

🔬This is a nightly-only experimental API. (split_array)

Divides one mutable slice into an array and a remainder slice at an index.

+
source

pub fn split_array_mut<const N: usize>(&mut self) -> (&mut [T; N], &mut [T])

🔬This is a nightly-only experimental API. (split_array)

Divides one mutable slice into an array and a remainder slice at an index.

The array will contain all indices from [0, N) (excluding the index N itself) and the slice will contain all indices from [N, len) (excluding the index len itself).

-
Panics
+
Panics

Panics if N > len.

-
Examples
+
Examples
#![feature(split_array)]
 
 let mut v = &mut [1, 0, 3, 0, 5, 6][..];
@@ -1265,14 +1284,14 @@ 
Examples
left[1] = 2; right[1] = 4; assert_eq!(v, [1, 2, 3, 4, 5, 6]);
-
source

pub fn rsplit_array_ref<const N: usize>(&self) -> (&[T], &[T; N])

🔬This is a nightly-only experimental API. (split_array)

Divides one slice into an array and a remainder slice at an index from +

source

pub fn rsplit_array_ref<const N: usize>(&self) -> (&[T], &[T; N])

🔬This is a nightly-only experimental API. (split_array)

Divides one slice into an array and a remainder slice at an index from the end.

The slice will contain all indices from [0, len - N) (excluding the index len - N itself) and the array will contain all indices from [len - N, len) (excluding the index len itself).

-
Panics
+
Panics

Panics if N > len.

-
Examples
+
Examples
#![feature(split_array)]
 
 let v = &[1, 2, 3, 4, 5, 6][..];
@@ -1294,14 +1313,14 @@ 
Examples
assert_eq!(left, []); assert_eq!(right, &[1, 2, 3, 4, 5, 6]); }
-
source

pub fn rsplit_array_mut<const N: usize>(&mut self) -> (&mut [T], &mut [T; N])

🔬This is a nightly-only experimental API. (split_array)

Divides one mutable slice into an array and a remainder slice at an +

source

pub fn rsplit_array_mut<const N: usize>(&mut self) -> (&mut [T], &mut [T; N])

🔬This is a nightly-only experimental API. (split_array)

Divides one mutable slice into an array and a remainder slice at an index from the end.

The slice will contain all indices from [0, len - N) (excluding the index N itself) and the array will contain all indices from [len - N, len) (excluding the index len itself).

-
Panics
+
Panics

Panics if N > len.

-
Examples
+
Examples
#![feature(split_array)]
 
 let mut v = &mut [1, 0, 3, 0, 5, 6][..];
@@ -1311,10 +1330,10 @@ 
Examples
left[1] = 2; right[1] = 4; assert_eq!(v, [1, 2, 3, 4, 5, 6]);
-
1.0.0 · source

pub fn split<F>(&self, pred: F) -> Split<'_, T, F>where - F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match +

1.0.0 · source

pub fn split<F>(&self, pred: F) -> Split<'_, T, F>
where + F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match pred. The matched element is not contained in the subslices.

-
Examples
+
Examples
let slice = [10, 40, 33, 20];
 let mut iter = slice.split(|num| num % 3 == 0);
 
@@ -1342,21 +1361,21 @@ 
Examples
assert_eq!(iter.next().unwrap(), &[]); assert_eq!(iter.next().unwrap(), &[20]); assert!(iter.next().is_none());
-
1.0.0 · source

pub fn split_mut<F>(&mut self, pred: F) -> SplitMut<'_, T, F>where - F: FnMut(&T) -> bool,

Returns an iterator over mutable subslices separated by elements that +

1.0.0 · source

pub fn split_mut<F>(&mut self, pred: F) -> SplitMut<'_, T, F>
where + F: FnMut(&T) -> bool,

Returns an iterator over mutable subslices separated by elements that match pred. The matched element is not contained in the subslices.

-
Examples
+
Examples
let mut v = [10, 40, 30, 20, 60, 50];
 
 for group in v.split_mut(|num| *num % 3 == 0) {
     group[0] = 1;
 }
 assert_eq!(v, [1, 40, 30, 1, 60, 1]);
-
1.51.0 · source

pub fn split_inclusive<F>(&self, pred: F) -> SplitInclusive<'_, T, F>where - F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match +

1.51.0 · source

pub fn split_inclusive<F>(&self, pred: F) -> SplitInclusive<'_, T, F>
where + F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match pred. The matched element is contained in the end of the previous subslice as a terminator.

-
Examples
+
Examples
let slice = [10, 40, 33, 20];
 let mut iter = slice.split_inclusive(|num| num % 3 == 0);
 
@@ -1373,11 +1392,11 @@ 
Examples
assert_eq!(iter.next().unwrap(), &[3]); assert_eq!(iter.next().unwrap(), &[10, 40, 33]); assert!(iter.next().is_none());
-
1.51.0 · source

pub fn split_inclusive_mut<F>(&mut self, pred: F) -> SplitInclusiveMut<'_, T, F>where - F: FnMut(&T) -> bool,

Returns an iterator over mutable subslices separated by elements that +

1.51.0 · source

pub fn split_inclusive_mut<F>(&mut self, pred: F) -> SplitInclusiveMut<'_, T, F>
where + F: FnMut(&T) -> bool,

Returns an iterator over mutable subslices separated by elements that match pred. The matched element is contained in the previous subslice as a terminator.

-
Examples
+
Examples
let mut v = [10, 40, 30, 20, 60, 50];
 
 for group in v.split_inclusive_mut(|num| *num % 3 == 0) {
@@ -1385,11 +1404,11 @@ 
Examples
group[terminator_idx] = 1; } assert_eq!(v, [10, 40, 1, 20, 1, 1]);
-
1.27.0 · source

pub fn rsplit<F>(&self, pred: F) -> RSplit<'_, T, F>where - F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match +

1.27.0 · source

pub fn rsplit<F>(&self, pred: F) -> RSplit<'_, T, F>
where + F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match pred, starting at the end of the slice and working backwards. The matched element is not contained in the subslices.

-
Examples
+
Examples
let slice = [11, 22, 33, 0, 44, 55];
 let mut iter = slice.rsplit(|num| *num == 0);
 
@@ -1406,11 +1425,11 @@ 
Examples
assert_eq!(it.next().unwrap(), &[1, 1]); assert_eq!(it.next().unwrap(), &[]); assert_eq!(it.next(), None);
-
1.27.0 · source

pub fn rsplit_mut<F>(&mut self, pred: F) -> RSplitMut<'_, T, F>where - F: FnMut(&T) -> bool,

Returns an iterator over mutable subslices separated by elements that +

1.27.0 · source

pub fn rsplit_mut<F>(&mut self, pred: F) -> RSplitMut<'_, T, F>
where + F: FnMut(&T) -> bool,

Returns an iterator over mutable subslices separated by elements that match pred, starting at the end of the slice and working backwards. The matched element is not contained in the subslices.

-
Examples
+
Examples
let mut v = [100, 400, 300, 200, 600, 500];
 
 let mut count = 0;
@@ -1419,71 +1438,71 @@ 
Examples
group[0] = count; } assert_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 - F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match +

1.0.0 · source

pub fn splitn<F>(&self, n: usize, pred: F) -> SplitN<'_, T, F>
where + F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match pred, limited to returning at most n items. The matched element is not contained in the subslices.

The last element returned, if any, will contain the remainder of the slice.

-
Examples
+
Examples

Print the slice split once by numbers divisible by 3 (i.e., [10, 40], [20, 60, 50]):

let v = [10, 40, 30, 20, 60, 50];
 
 for group in v.splitn(2, |num| *num % 3 == 0) {
-    println!("{group:?}");
+    println!("{group:?}");
 }
-
1.0.0 · source

pub fn splitn_mut<F>(&mut self, n: usize, pred: F) -> SplitNMut<'_, T, F>where - F: FnMut(&T) -> bool,

Returns an iterator over mutable subslices separated by elements that match +

1.0.0 · source

pub fn splitn_mut<F>(&mut self, n: usize, pred: F) -> SplitNMut<'_, T, F>
where + F: FnMut(&T) -> bool,

Returns an iterator over mutable subslices separated by elements that match pred, limited to returning at most n items. The matched element is not contained in the subslices.

The last element returned, if any, will contain the remainder of the slice.

-
Examples
+
Examples
let mut v = [10, 40, 30, 20, 60, 50];
 
 for group in v.splitn_mut(2, |num| *num % 3 == 0) {
     group[0] = 1;
 }
 assert_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 - F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match +

1.0.0 · source

pub fn rsplitn<F>(&self, n: usize, pred: F) -> RSplitN<'_, T, F>
where + F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match pred limited to returning at most n items. This starts at the end of the slice and works backwards. The matched element is not contained in the subslices.

The last element returned, if any, will contain the remainder of the slice.

-
Examples
+
Examples

Print the slice split once, starting from the end, by numbers divisible by 3 (i.e., [50], [10, 40, 30, 20]):

let v = [10, 40, 30, 20, 60, 50];
 
 for group in v.rsplitn(2, |num| *num % 3 == 0) {
-    println!("{group:?}");
+    println!("{group:?}");
 }
-
1.0.0 · source

pub fn rsplitn_mut<F>(&mut self, n: usize, pred: F) -> RSplitNMut<'_, T, F>where - F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match +

1.0.0 · source

pub fn rsplitn_mut<F>(&mut self, n: usize, pred: F) -> RSplitNMut<'_, T, F>
where + F: FnMut(&T) -> bool,

Returns an iterator over subslices separated by elements that match pred limited to returning at most n items. This starts at the end of the slice and works backwards. The matched element is not contained in the subslices.

The last element returned, if any, will contain the remainder of the slice.

-
Examples
+
Examples
let mut s = [10, 40, 30, 20, 60, 50];
 
 for group in s.rsplitn_mut(2, |num| *num % 3 == 0) {
     group[0] = 1;
 }
 assert_eq!(s, [1, 40, 30, 20, 60, 1]);
-
source

pub fn split_once<F>(&self, pred: F) -> Option<(&[T], &[T])>where - 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 +

source

pub fn split_once<F>(&self, pred: F) -> Option<(&[T], &[T])>
where + 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 predicate.

If any matching elements are resent in the slice, returns the prefix before the match and suffix after. The matching element itself is not included. If no elements match, returns None.

-
Examples
+
Examples
#![feature(slice_split_once)]
 let s = [1, 2, 3, 2, 4];
 assert_eq!(s.split_once(|&x| x == 2), Some((
@@ -1491,13 +1510,13 @@ 
Examples
&[3, 2, 4][..] ))); assert_eq!(s.split_once(|&x| x == 0), None);
-
source

pub fn rsplit_once<F>(&self, pred: F) -> Option<(&[T], &[T])>where - 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 +

source

pub fn rsplit_once<F>(&self, pred: F) -> Option<(&[T], &[T])>
where + 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 predicate.

If any matching elements are resent in the slice, returns the prefix before the match and suffix after. The matching element itself is not included. If no elements match, returns None.

-
Examples
+
Examples
#![feature(slice_split_once)]
 let s = [1, 2, 3, 2, 4];
 assert_eq!(s.rsplit_once(|&x| x == 2), Some((
@@ -1505,11 +1524,11 @@ 
Examples
&[4][..] ))); assert_eq!(s.rsplit_once(|&x| x == 0), None);
-
1.0.0 · source

pub fn contains(&self, x: &T) -> boolwhere - T: PartialEq,

Returns true if the slice contains an element with the given value.

+
1.0.0 · source

pub fn contains(&self, x: &T) -> bool
where + T: PartialEq,

Returns true if the slice contains an element with the given value.

This operation is O(n).

-

Note that if you have a sorted slice, binary_search may be faster.

-
Examples
+

Note that if you have a sorted slice, binary_search may be faster.

+
Examples
let v = [10, 40, 30];
 assert!(v.contains(&30));
 assert!(!v.contains(&50));
@@ -1517,12 +1536,12 @@
Examples
with one (for example, String implements PartialEq<str>), you can use iter().any:

-
let v = [String::from("hello"), String::from("world")]; // slice of `String`
-assert!(v.iter().any(|e| e == "hello")); // search with `&str`
-assert!(!v.iter().any(|e| e == "hi"));
-
1.0.0 · source

pub fn starts_with(&self, needle: &[T]) -> boolwhere - T: PartialEq,

Returns true if needle is a prefix of the slice.

-
Examples
+
let v = [String::from("hello"), String::from("world")]; // slice of `String`
+assert!(v.iter().any(|e| e == "hello")); // search with `&str`
+assert!(!v.iter().any(|e| e == "hi"));
+
1.0.0 · source

pub fn starts_with(&self, needle: &[T]) -> bool
where + T: PartialEq,

Returns true if needle is a prefix of the slice.

+
Examples
let v = [10, 40, 30];
 assert!(v.starts_with(&[10]));
 assert!(v.starts_with(&[10, 40]));
@@ -1534,9 +1553,9 @@ 
Examples
assert!(v.starts_with(&[])); let v: &[u8] = &[]; assert!(v.starts_with(&[]));
-
1.0.0 · source

pub fn ends_with(&self, needle: &[T]) -> boolwhere - T: PartialEq,

Returns true if needle is a suffix of the slice.

-
Examples
+
1.0.0 · source

pub fn ends_with(&self, needle: &[T]) -> bool
where + T: PartialEq,

Returns true if needle is a suffix of the slice.

+
Examples
let v = [10, 40, 30];
 assert!(v.ends_with(&[30]));
 assert!(v.ends_with(&[40, 30]));
@@ -1548,47 +1567,47 @@ 
Examples
assert!(v.ends_with(&[])); let v: &[u8] = &[]; assert!(v.ends_with(&[]));
-
1.51.0 · source

pub fn strip_prefix<P>(&self, prefix: &P) -> Option<&[T]>where - P: SlicePattern<Item = T> + ?Sized, - T: PartialEq,

Returns a subslice with the prefix removed.

+
1.51.0 · source

pub fn strip_prefix<P>(&self, prefix: &P) -> Option<&[T]>
where + P: SlicePattern<Item = T> + ?Sized, + T: PartialEq,

Returns a subslice with the prefix removed.

If the slice starts with prefix, returns the subslice after the prefix, wrapped in Some. If prefix is empty, simply returns the original slice.

If the slice does not start with prefix, returns None.

-
Examples
+
Examples
let v = &[10, 40, 30];
 assert_eq!(v.strip_prefix(&[10]), Some(&[40, 30][..]));
 assert_eq!(v.strip_prefix(&[10, 40]), Some(&[30][..]));
 assert_eq!(v.strip_prefix(&[50]), None);
 assert_eq!(v.strip_prefix(&[10, 50]), None);
 
-let prefix : &str = "he";
-assert_eq!(b"hello".strip_prefix(prefix.as_bytes()),
-           Some(b"llo".as_ref()));
-
1.51.0 · source

pub fn strip_suffix<P>(&self, suffix: &P) -> Option<&[T]>where - P: SlicePattern<Item = T> + ?Sized, - T: PartialEq,

Returns a subslice with the suffix removed.

+let prefix : &str = "he"; +assert_eq!(b"hello".strip_prefix(prefix.as_bytes()), + Some(b"llo".as_ref()));
+
1.51.0 · source

pub fn strip_suffix<P>(&self, suffix: &P) -> Option<&[T]>
where + P: SlicePattern<Item = T> + ?Sized, + T: PartialEq,

Returns a subslice with the suffix removed.

If the slice ends with suffix, returns the subslice before the suffix, wrapped in Some. If suffix is empty, simply returns the original slice.

If the slice does not end with suffix, returns None.

-
Examples
+
Examples
let v = &[10, 40, 30];
 assert_eq!(v.strip_suffix(&[30]), Some(&[10, 40][..]));
 assert_eq!(v.strip_suffix(&[40, 30]), Some(&[10][..]));
 assert_eq!(v.strip_suffix(&[50]), None);
 assert_eq!(v.strip_suffix(&[50, 30]), None);
-

Binary searches this slice for a given element. +

Binary searches this slice for a given element. If the slice is not sorted, the returned result is unspecified and meaningless.

-

If the value is found then Result::Ok is returned, containing the +

If the value is found then Result::Ok is returned, containing the index of the matching element. If there are multiple matches, then any one of the matches could be returned. The index is chosen deterministically, but is subject to change in future versions of Rust. -If the value is not found then Result::Err is returned, containing +If the value is not found then Result::Err is returned, containing the index where a matching element could be inserted while maintaining sorted order.

-

See also binary_search_by, binary_search_by_key, and partition_point.

-
Examples
+

See also binary_search_by, binary_search_by_key, and partition_point.

+
Examples

Looks up a series of four elements. The first is found, with a uniquely determined position; the second and third are not found; the fourth could match any position in [1, 4].

@@ -1601,7 +1620,7 @@
Examples
let r = s.binary_search(&1); assert!(match r { Ok(1..=4) => true, _ => false, });

If you want to find that whole range of matching items, rather than -an arbitrary matching one, that can be done using partition_point:

+an arbitrary matching one, that can be done using partition_point:

let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
 
@@ -1616,12 +1635,12 @@ 
Examples
assert!(s[low..high].iter().all(|&x| x == 1)); assert!(s[high..].iter().all(|&x| x > 1)); -// For something not found, the "range" of equal items is empty +// For something not found, the "range" of equal items is empty assert_eq!(s.partition_point(|x| x < &11), 9); assert_eq!(s.partition_point(|x| x <= &11), 9); assert_eq!(s.binary_search(&11), Err(9));

If you want to insert an item to a sorted vector, while maintaining -sort order, consider using partition_point:

+sort order, consider using partition_point:

let mut s = vec![0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
 let num = 42;
@@ -1629,23 +1648,23 @@ 
Examples
// The above is equivalent to `let idx = s.binary_search(&num).unwrap_or_else(|x| x);` s.insert(idx, num); assert_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 - F: FnMut(&'a T) -> Ordering,

Binary searches this slice with a comparator function.

+
1.0.0 · source

pub fn binary_search_by<'a, F>(&'a self, f: F) -> Result<usize, usize>
where + F: FnMut(&'a T) -> Ordering,

Binary searches this slice with a comparator function.

The comparator function should return an order code that indicates whether its argument is Less, Equal or Greater the desired target. If the slice is not sorted or if the comparator function does not implement an order consistent with the sort order of the underlying slice, the returned result is unspecified and meaningless.

-

If the value is found then Result::Ok is returned, containing the +

If the value is found then Result::Ok is returned, containing the index of the matching element. If there are multiple matches, then any one of the matches could be returned. The index is chosen deterministically, but is subject to change in future versions of Rust. -If the value is not found then Result::Err is returned, containing +If the value is not found then Result::Err is returned, containing the index where a matching element could be inserted while maintaining sorted order.

-

See also binary_search, binary_search_by_key, and partition_point.

-
Examples
+

See also binary_search, binary_search_by_key, and partition_point.

+
Examples

Looks up a series of four elements. The first is found, with a uniquely determined position; the second and third are not found; the fourth could match any position in [1, 4].

@@ -1661,26 +1680,26 @@
Examples
let seek = 1; let r = s.binary_search_by(|probe| probe.cmp(&seek)); assert!(match r { Ok(1..=4) => true, _ => false, });
-
1.10.0 · source

pub fn binary_search_by_key<'a, B, F>( +

1.10.0 · source

pub fn binary_search_by_key<'a, B, F>( &'a self, - b: &B, + b: &B, f: F -) -> Result<usize, usize>where - F: FnMut(&'a T) -> B, - B: Ord,

Binary searches this slice with a key extraction function.

+) -> Result<usize, usize>
where + F: FnMut(&'a T) -> B, + B: Ord,

Binary searches this slice with a key extraction function.

Assumes that the slice is sorted by the key, for instance with -sort_by_key using the same key extraction function. +sort_by_key using the same key extraction function. If the slice is not sorted by the key, the returned result is unspecified and meaningless.

-

If the value is found then Result::Ok is returned, containing the +

If the value is found then Result::Ok is returned, containing the index of the matching element. If there are multiple matches, then any one of the matches could be returned. The index is chosen deterministically, but is subject to change in future versions of Rust. -If the value is not found then Result::Err is returned, containing +If the value is not found then Result::Err is returned, containing the index where a matching element could be inserted while maintaining sorted order.

-

See also binary_search, binary_search_by, and partition_point.

-
Examples
+

See also binary_search, binary_search_by, and partition_point.

+
Examples

Looks up a series of four elements in a slice of pairs sorted by their second elements. The first is found, with a uniquely determined position; the second and third are not found; the @@ -1695,8 +1714,8 @@

Examples
assert_eq!(s.binary_search_by_key(&100, |&(a, b)| b), Err(13)); let r = s.binary_search_by_key(&1, |&(a, b)| b); assert!(match r { Ok(1..=4) => true, _ => false, });
-
1.20.0 · source

pub fn sort_unstable(&mut self)where - T: Ord,

Sorts the slice, but might not preserve the order of equal elements.

+
1.20.0 · source

pub fn sort_unstable(&mut self)
where + T: Ord,

Sorts the slice, but might not preserve the order of equal elements.

This sort is unstable (i.e., may reorder equal elements), in-place (i.e., does not allocate), and O(n * log(n)) worst-case.

Current implementation
@@ -1707,13 +1726,13 @@
Current implem deterministic behavior.

It is typically faster than stable sorting, except in a few special cases, e.g., when the slice consists of several concatenated sorted sequences.

-
Examples
+
Examples
let mut v = [-5, 4, 1, -3, 2];
 
 v.sort_unstable();
 assert!(v == [-5, -3, 1, 2, 4]);
-
1.20.0 · source

pub fn sort_unstable_by<F>(&mut self, compare: F)where - F: FnMut(&T, &T) -> Ordering,

Sorts the slice with a comparator function, but might not preserve the order of equal +

1.20.0 · source

pub fn sort_unstable_by<F>(&mut self, compare: F)
where + F: FnMut(&T, &T) -> Ordering,

Sorts the slice with a comparator function, but might not preserve the order of equal elements.

This sort is unstable (i.e., may reorder equal elements), in-place (i.e., does not allocate), and O(n * log(n)) worst-case.

@@ -1724,7 +1743,7 @@
Examples
  • total and antisymmetric: exactly one of a < b, a == b or a > b is true, and
  • transitive, a < b and b < c implies a < c. The same must hold for both == and >.
  • -

    For example, while f64 doesn’t implement Ord because NaN != NaN, we can use +

    For example, while f64 doesn’t implement Ord because NaN != NaN, we can use partial_cmp as our sort function when we know the slice doesn’t contain a NaN.

    let mut floats = [5f64, 4.0, 1.0, 3.0, 2.0];
    @@ -1738,7 +1757,7 @@ 
    Current im deterministic behavior.

    It is typically faster than stable sorting, except in a few special cases, e.g., when the slice consists of several concatenated sorted sequences.

    -
    Examples
    +
    Examples
    let mut v = [5, 4, 1, 3, 2];
     v.sort_unstable_by(|a, b| a.cmp(b));
     assert!(v == [1, 2, 3, 4, 5]);
    @@ -1746,9 +1765,9 @@ 
    Examples
    // reverse sorting v.sort_unstable_by(|a, b| b.cmp(a)); assert!(v == [5, 4, 3, 2, 1]);
    -
    1.20.0 · source

    pub fn sort_unstable_by_key<K, F>(&mut self, f: F)where - F: FnMut(&T) -> K, - K: Ord,

    Sorts the slice with a key extraction function, but might not preserve the order of equal +

    1.20.0 · source

    pub fn sort_unstable_by_key<K, F>(&mut self, f: F)
    where + F: FnMut(&T) -> K, + K: Ord,

    Sorts the slice with a key extraction function, but might not preserve the order of equal elements.

    This sort is unstable (i.e., may reorder equal elements), in-place (i.e., does not allocate), and O(m * n * log(n)) worst-case, where the key function is @@ -1762,16 +1781,16 @@

    Current im

    Due to its key calling strategy, sort_unstable_by_key is likely to be slower than sort_by_cached_key in cases where the key function is expensive.

    -
    Examples
    +
    Examples
    let mut v = [-5i32, 4, 1, -3, 2];
     
     v.sort_unstable_by_key(|k| k.abs());
     assert!(v == [1, 2, -3, 4, -5]);
    -
    1.49.0 · source

    pub fn select_nth_unstable( +

    1.49.0 · source

    pub fn select_nth_unstable( &mut self, - index: usize -) -> (&mut [T], &mut T, &mut [T])where - T: Ord,

    Reorder the slice such that the element at index is at its final sorted position.

    + index: usize +) -> (&mut [T], &mut T, &mut [T])
    where + T: Ord,

    Reorder the slice such that the element at index is at its final sorted position.

    This reordering has the additional property that any value at position i < index will be less than or equal to any value at a position j > index. Additionally, this reordering is unstable (i.e. any number of equal elements may end up at position index), in-place @@ -1783,11 +1802,11 @@

    Examples
    and greater-than-or-equal-to the value of the element at index.

    Current implementation

    The current algorithm is an introselect implementation based on Pattern Defeating Quicksort, which is also -the basis for sort_unstable. The fallback algorithm is Median of Medians using Tukey’s Ninther for +the basis for sort_unstable. The fallback algorithm is Median of Medians using Tukey’s Ninther for pivot selection, which guarantees linear runtime for all inputs.

    -
    Panics
    +
    Panics

    Panics when index >= len(), meaning it always panics on empty slices.

    -
    Examples
    +
    Examples
    let mut v = [-5i32, 4, 1, -3, 2];
     
     // Find the median
    @@ -1799,12 +1818,12 @@ 
    Examples
    v == [-5, -3, 1, 2, 4] || v == [-3, -5, 1, 4, 2] || v == [-5, -3, 1, 4, 2]);
    -
    1.49.0 · source

    pub fn select_nth_unstable_by<F>( +

    1.49.0 · source

    pub fn select_nth_unstable_by<F>( &mut self, - index: usize, + index: usize, compare: F -) -> (&mut [T], &mut T, &mut [T])where - F: FnMut(&T, &T) -> Ordering,

    Reorder the slice with a comparator function such that the element at index is at its +) -> (&mut [T], &mut T, &mut [T])

    where + F: FnMut(&T, &T) -> Ordering,

    Reorder the slice with a comparator function such that the element at index is at its final sorted position.

    This reordering has the additional property that any value at position i < index will be less than or equal to any value at a position j > index using the comparator function. @@ -1818,11 +1837,11 @@

    Examples
    the value of the element at index.

    Current implementation

    The current algorithm is an introselect implementation based on Pattern Defeating Quicksort, which is also -the basis for sort_unstable. The fallback algorithm is Median of Medians using Tukey’s Ninther for +the basis for sort_unstable. The fallback algorithm is Median of Medians using Tukey’s Ninther for pivot selection, which guarantees linear runtime for all inputs.

    -
    Panics
    +
    Panics

    Panics when index >= len(), meaning it always panics on empty slices.

    -
    Examples
    +
    Examples
    let mut v = [-5i32, 4, 1, -3, 2];
     
     // Find the median as if the slice were sorted in descending order.
    @@ -1834,13 +1853,13 @@ 
    Examples
    v == [2, 4, 1, -3, -5] || v == [4, 2, 1, -5, -3] || v == [4, 2, 1, -3, -5]);
    -
    1.49.0 · source

    pub fn select_nth_unstable_by_key<K, F>( +

    1.49.0 · source

    pub fn select_nth_unstable_by_key<K, F>( &mut self, - index: usize, + index: usize, f: F -) -> (&mut [T], &mut T, &mut [T])where - F: FnMut(&T) -> K, - K: Ord,

    Reorder the slice with a key extraction function such that the element at index is at its +) -> (&mut [T], &mut T, &mut [T])

    where + F: FnMut(&T) -> K, + K: Ord,

    Reorder the slice with a key extraction function such that the element at index is at its final sorted position.

    This reordering has the additional property that any value at position i < index will be less than or equal to any value at a position j > index using the key extraction function. @@ -1854,11 +1873,11 @@

    Examples
    the value of the element at index.

    Current implementation

    The current algorithm is an introselect implementation based on Pattern Defeating Quicksort, which is also -the basis for sort_unstable. The fallback algorithm is Median of Medians using Tukey’s Ninther for +the basis for sort_unstable. The fallback algorithm is Median of Medians using Tukey’s Ninther for pivot selection, which guarantees linear runtime for all inputs.

    -
    Panics
    +
    Panics

    Panics when index >= len(), meaning it always panics on empty slices.

    -
    Examples
    +
    Examples
    let mut v = [-5i32, 4, 1, -3, 2];
     
     // Return the median as if the array were sorted according to absolute value.
    @@ -1870,13 +1889,13 @@ 
    Examples
    v == [1, 2, -3, -5, 4] || v == [2, 1, -3, 4, -5] || v == [2, 1, -3, -5, 4]);
    -
    source

    pub fn partition_dedup(&mut self) -> (&mut [T], &mut [T])where - 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 -PartialEq trait implementation.

    +
    source

    pub fn partition_dedup(&mut self) -> (&mut [T], &mut [T])
    where + 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 +PartialEq trait implementation.

    Returns two slices. The first contains no consecutive repeated elements. The second contains all the duplicates in no specified order.

    If the slice is sorted, the first returned slice contains no duplicates.

    -
    Examples
    +
    Examples
    #![feature(slice_partition_dedup)]
     
     let mut slice = [1, 2, 2, 3, 3, 2, 1, 1];
    @@ -1885,8 +1904,8 @@ 
    Examples
    assert_eq!(dedup, [1, 2, 3, 2, 1]); assert_eq!(duplicates, [2, 3, 1]);
    -
    source

    pub fn partition_dedup_by<F>(&mut self, same_bucket: F) -> (&mut [T], &mut [T])where - 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 +

    source

    pub fn partition_dedup_by<F>(&mut self, same_bucket: F) -> (&mut [T], &mut [T])
    where + 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 a given equality relation.

    Returns two slices. The first contains no consecutive repeated elements. The second contains all the duplicates in no specified order.

    @@ -1895,23 +1914,23 @@
    Examples
    from their order in the slice, so if same_bucket(a, b) returns true, a is moved at the end of the slice.

    If the slice is sorted, the first returned slice contains no duplicates.

    -
    Examples
    +
    Examples
    #![feature(slice_partition_dedup)]
     
    -let mut slice = ["foo", "Foo", "BAZ", "Bar", "bar", "baz", "BAZ"];
    +let mut slice = ["foo", "Foo", "BAZ", "Bar", "bar", "baz", "BAZ"];
     
     let (dedup, duplicates) = slice.partition_dedup_by(|a, b| a.eq_ignore_ascii_case(b));
     
    -assert_eq!(dedup, ["foo", "BAZ", "Bar", "baz"]);
    -assert_eq!(duplicates, ["bar", "Foo", "BAZ"]);
    -
    source

    pub fn partition_dedup_by_key<K, F>(&mut self, key: F) -> (&mut [T], &mut [T])where - F: FnMut(&mut T) -> K, - 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 +assert_eq!(dedup, ["foo", "BAZ", "Bar", "baz"]); +assert_eq!(duplicates, ["bar", "Foo", "BAZ"]);

    +
    source

    pub fn partition_dedup_by_key<K, F>(&mut self, key: F) -> (&mut [T], &mut [T])
    where + F: FnMut(&mut T) -> K, + 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 to the same key.

    Returns two slices. The first contains no consecutive repeated elements. The second contains all the duplicates in no specified order.

    If the slice is sorted, the first returned slice contains no duplicates.

    -
    Examples
    +
    Examples
    #![feature(slice_partition_dedup)]
     
     let mut slice = [10, 20, 21, 30, 30, 20, 11, 13];
    @@ -1920,66 +1939,66 @@ 
    Examples
    assert_eq!(dedup, [10, 20, 30, 20, 11]); assert_eq!(duplicates, [21, 30, 13]);
    -
    1.26.0 · source

    pub fn rotate_left(&mut self, mid: usize)

    Rotates the slice in-place such that the first mid elements of the +

    1.26.0 · source

    pub fn rotate_left(&mut self, mid: usize)

    Rotates the slice in-place such that the first mid elements of the slice move to the end while the last self.len() - mid elements move to the front. After calling rotate_left, the element previously at index mid will become the first element in the slice.

    -
    Panics
    +
    Panics

    This function will panic if mid is greater than the length of the slice. Note that mid == self.len() does not panic and is a no-op rotation.

    Complexity

    Takes linear (in self.len()) time.

    -
    Examples
    -
    let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
    +
    Examples
    +
    let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
     a.rotate_left(2);
    -assert_eq!(a, ['c', 'd', 'e', 'f', 'a', 'b']);
    +assert_eq!(a, ['c', 'd', 'e', 'f', 'a', 'b']);

    Rotating a subslice:

    -
    let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
    +
    let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
     a[1..5].rotate_left(1);
    -assert_eq!(a, ['a', 'c', 'd', 'e', 'b', 'f']);
    -
    1.26.0 · source

    pub fn rotate_right(&mut self, k: usize)

    Rotates the slice in-place such that the first self.len() - k +assert_eq!(a, ['a', 'c', 'd', 'e', 'b', 'f']);

    +
    1.26.0 · source

    pub fn rotate_right(&mut self, k: usize)

    Rotates the slice in-place such that the first self.len() - k elements of the slice move to the end while the last k elements move to the front. After calling rotate_right, the element previously at index self.len() - k will become the first element in the slice.

    -
    Panics
    +
    Panics

    This function will panic if k is greater than the length of the slice. Note that k == self.len() does not panic and is a no-op rotation.

    Complexity

    Takes linear (in self.len()) time.

    -
    Examples
    -
    let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
    +
    Examples
    +
    let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
     a.rotate_right(2);
    -assert_eq!(a, ['e', 'f', 'a', 'b', 'c', 'd']);
    +assert_eq!(a, ['e', 'f', 'a', 'b', 'c', 'd']);

    Rotating a subslice:

    -
    let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
    +
    let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
     a[1..5].rotate_right(1);
    -assert_eq!(a, ['a', 'e', 'b', 'c', 'd', 'f']);
    -
    1.50.0 · source

    pub fn fill(&mut self, value: T)where - T: Clone,

    Fills self with elements by cloning value.

    -
    Examples
    +assert_eq!(a, ['a', 'e', 'b', 'c', 'd', 'f']);
    +
    1.50.0 · source

    pub fn fill(&mut self, value: T)
    where + T: Clone,

    Fills self with elements by cloning value.

    +
    Examples
    let mut buf = vec![0; 10];
     buf.fill(1);
     assert_eq!(buf, vec![1; 10]);
    -
    1.51.0 · source

    pub fn fill_with<F>(&mut self, f: F)where - F: FnMut() -> T,

    Fills self with elements returned by calling a closure repeatedly.

    +
    1.51.0 · source

    pub fn fill_with<F>(&mut self, f: F)
    where + F: FnMut() -> T,

    Fills self with elements returned by calling a closure repeatedly.

    This method uses a closure to create new values. If you’d rather -Clone a given value, use fill. If you want to use the Default -trait to generate values, you can pass Default::default as the +Clone a given value, use fill. If you want to use the Default +trait to generate values, you can pass Default::default as the argument.

    -
    Examples
    +
    Examples
    let mut buf = vec![1; 10];
     buf.fill_with(Default::default);
     assert_eq!(buf, vec![0; 10]);
    -
    1.7.0 · source

    pub fn clone_from_slice(&mut self, src: &[T])where - T: Clone,

    Copies the elements from src into self.

    +
    1.7.0 · source

    pub fn clone_from_slice(&mut self, src: &[T])
    where + T: Clone,

    Copies the elements from src into self.

    The length of src must be the same as self.

    -
    Panics
    +
    Panics

    This function will panic if the two slices have different lengths.

    -
    Examples
    +
    Examples

    Cloning two elements from a slice into another:

    let src = [1, 2, 3, 4];
    @@ -1987,7 +2006,7 @@ 
    Examples
    // Because the slices have to be the same length, // we slice the source slice from four elements -// to two. It will panic if we don't do this. +// to two. It will panic if we don't do this. dst.clone_from_slice(&src[2..]); assert_eq!(src, [1, 2, 3, 4]); @@ -2000,7 +2019,7 @@
    Examples
    let mut slice = [1, 2, 3, 4, 5];
     
     slice[..2].clone_from_slice(&slice[3..]); // compile fail!
    -

    To work around this, we can use split_at_mut to create two distinct +

    To work around this, we can use split_at_mut to create two distinct sub-slices from a slice:

    let mut slice = [1, 2, 3, 4, 5];
    @@ -2011,13 +2030,13 @@ 
    Examples
    } assert_eq!(slice, [4, 5, 3, 4, 5]);
    -
    1.9.0 · source

    pub fn copy_from_slice(&mut self, src: &[T])where - T: Copy,

    Copies all elements from src into self, using a memcpy.

    +
    1.9.0 · source

    pub fn copy_from_slice(&mut self, src: &[T])
    where + T: Copy,

    Copies all elements from src into self, using a memcpy.

    The length of src must be the same as self.

    -

    If T does not implement Copy, use clone_from_slice.

    -
    Panics
    +

    If T does not implement Copy, use clone_from_slice.

    +
    Panics

    This function will panic if the two slices have different lengths.

    -
    Examples
    +
    Examples

    Copying two elements from a slice into another:

    let src = [1, 2, 3, 4];
    @@ -2025,7 +2044,7 @@ 
    Examples
    // Because the slices have to be the same length, // we slice the source slice from four elements -// to two. It will panic if we don't do this. +// to two. It will panic if we don't do this. dst.copy_from_slice(&src[2..]); assert_eq!(src, [1, 2, 3, 4]); @@ -2038,7 +2057,7 @@
    Examples
    let mut slice = [1, 2, 3, 4, 5];
     
     slice[..2].copy_from_slice(&slice[3..]); // compile fail!
    -

    To work around this, we can use split_at_mut to create two distinct +

    To work around this, we can use split_at_mut to create two distinct sub-slices from a slice:

    let mut slice = [1, 2, 3, 4, 5];
    @@ -2049,28 +2068,28 @@ 
    Examples
    } assert_eq!(slice, [4, 5, 3, 4, 5]);
    -
    1.37.0 · source

    pub fn copy_within<R>(&mut self, src: R, dest: usize)where - R: RangeBounds<usize>, - T: Copy,

    Copies elements from one part of the slice to another part of itself, +

    1.37.0 · source

    pub fn copy_within<R>(&mut self, src: R, dest: usize)
    where + R: RangeBounds<usize>, + T: Copy,

    Copies elements from one part of the slice to another part of itself, using a memmove.

    src is the range within self to copy from. dest is the starting index of the range within self to copy to, which will have the same length as src. The two ranges may overlap. The ends of the two ranges must be less than or equal to self.len().

    -
    Panics
    +
    Panics

    This function will panic if either range exceeds the end of the slice, or if the end of src is before the start.

    -
    Examples
    +
    Examples

    Copying four bytes within a slice:

    -
    let mut bytes = *b"Hello, World!";
    +
    let mut bytes = *b"Hello, World!";
     
     bytes.copy_within(1..5, 8);
     
    -assert_eq!(&bytes, b"Hello, Wello!");
    -
    1.27.0 · source

    pub fn swap_with_slice(&mut self, other: &mut [T])

    Swaps all elements in self with those in other.

    +assert_eq!(&bytes, b"Hello, Wello!");
    +
    1.27.0 · source

    pub fn swap_with_slice(&mut self, other: &mut [T])

    Swaps all elements in self with those in other.

    The length of other must be the same as self.

    -
    Panics
    +
    Panics

    This function will panic if the two slices have different lengths.

    Example

    Swapping two elements across slices:

    @@ -2089,7 +2108,7 @@
    Example
    let mut slice = [1, 2, 3, 4, 5];
     slice[..2].swap_with_slice(&mut slice[3..]); // compile fail!
    -

    To work around this, we can use split_at_mut to create two distinct +

    To work around this, we can use split_at_mut to create two distinct mutable sub-slices from a slice:

    let mut slice = [1, 2, 3, 4, 5];
    @@ -2100,7 +2119,7 @@ 
    Example
    } assert_eq!(slice, [4, 5, 3, 1, 2]);
    -
    1.30.0 · source

    pub unsafe fn align_to<U>(&self) -> (&[T], &[U], &[T])

    Transmute the slice to a slice of another type, ensuring alignment of the types is +

    1.30.0 · source

    pub unsafe fn align_to<U>(&self) -> (&[T], &[U], &[T])

    Transmute the slice to a slice of another type, ensuring alignment of the types is maintained.

    This method splits the slice into three distinct slices: prefix, correctly aligned middle slice of a new type, and the suffix slice. How exactly the slice is split up is not @@ -2110,10 +2129,10 @@

    Example
    in a default (debug or release) execution will return a maximal middle part.

    This method has no purpose when either input element T or output element U are zero-sized and will return the original slice without splitting anything.

    -
    Safety
    +
    Safety

    This method is essentially a transmute with respect to the elements in the returned middle slice, so all the usual caveats pertaining to transmute::<T, U> also apply here.

    -
    Examples
    +
    Examples

    Basic usage:

    unsafe {
    @@ -2123,7 +2142,7 @@ 
    Examples
    // more_efficient_algorithm_for_aligned_shorts(shorts); // less_efficient_algorithm_for_bytes(suffix); }
    -
    1.30.0 · source

    pub unsafe fn align_to_mut<U>(&mut self) -> (&mut [T], &mut [U], &mut [T])

    Transmute the mutable slice to a mutable slice of another type, ensuring alignment of the +

    1.30.0 · source

    pub unsafe fn align_to_mut<U>(&mut self) -> (&mut [T], &mut [U], &mut [T])

    Transmute the mutable slice to a mutable slice of another type, ensuring alignment of the types is maintained.

    This method splits the slice into three distinct slices: prefix, correctly aligned middle slice of a new type, and the suffix slice. How exactly the slice is split up is not @@ -2133,10 +2152,10 @@

    Examples
    in a default (debug or release) execution will return a maximal middle part.

    This method has no purpose when either input element T or output element U are zero-sized and will return the original slice without splitting anything.

    -
    Safety
    +
    Safety

    This method is essentially a transmute with respect to the elements in the returned middle slice, so all the usual caveats pertaining to transmute::<T, U> also apply here.

    -
    Examples
    +
    Examples

    Basic usage:

    unsafe {
    @@ -2146,11 +2165,11 @@ 
    Examples
    // more_efficient_algorithm_for_aligned_shorts(shorts); // less_efficient_algorithm_for_bytes(suffix); }
    -
    source

    pub fn as_simd<const LANES: usize>(&self) -> (&[T], &[Simd<T, LANES>], &[T])where - Simd<T, LANES>: AsRef<[T; LANES]>, - T: SimdElement, - LaneCount<LANES>: SupportedLaneCount,

    🔬This is a nightly-only experimental API. (portable_simd)

    Split a slice into a prefix, a middle of aligned SIMD types, and a suffix.

    -

    This is a safe wrapper around slice::align_to, so has the same weak +

    source

    pub fn as_simd<const LANES: usize>(&self) -> (&[T], &[Simd<T, LANES>], &[T])
    where + Simd<T, LANES>: AsRef<[T; LANES]>, + T: SimdElement, + LaneCount<LANES>: SupportedLaneCount,

    🔬This is a nightly-only experimental API. (portable_simd)

    Split a slice into a prefix, a middle of aligned SIMD types, and a suffix.

    +

    This is a safe wrapper around slice::align_to, so has the same weak postconditions as that method. You’re only assured that self.len() == prefix.len() + middle.len() * LANES + suffix.len().

    Notably, all of the following are possible:

    @@ -2161,7 +2180,7 @@
    Examples

    That said, this is a safe method, so if you’re only writing safe code, then this can at most cause incorrect logic, not unsoundness.

    -
    Panics
    +
    Panics

    This will panic if the size of the SIMD type is different from LANES times that of the scalar.

    At the time of writing, the trait restrictions on Simd<T, LANES> keeps @@ -2169,9 +2188,9 @@

    Panics
    supported. It’s possible that, in the future, those restrictions might be lifted in a way that would make it possible to see panics from this method for something like LANES == 3.

    -
    Examples
    +
    Examples
    #![feature(portable_simd)]
    -use core::simd::SimdFloat;
    +use core::simd::prelude::*;
     
     let short = &[1, 2, 3];
     let (prefix, middle, suffix) = short.as_simd::<4>();
    @@ -2183,7 +2202,6 @@ 
    Examples
    fn basic_simd_sum(x: &[f32]) -> f32 { use std::ops::Add; - use std::simd::f32x4; let (prefix, middle, suffix) = x.as_simd(); let sums = f32x4::from_array([ prefix.iter().copied().sum(), @@ -2197,14 +2215,14 @@
    Examples
    let numbers: Vec<f32> = (1..101).map(|x| x as _).collect(); assert_eq!(basic_simd_sum(&numbers[1..99]), 4949.0);
    -
    source

    pub fn as_simd_mut<const LANES: usize>( +

    source

    pub fn as_simd_mut<const LANES: usize>( &mut self -) -> (&mut [T], &mut [Simd<T, LANES>], &mut [T])where - Simd<T, LANES>: AsMut<[T; LANES]>, - T: SimdElement, - LaneCount<LANES>: SupportedLaneCount,

    🔬This is a nightly-only experimental API. (portable_simd)

    Split a mutable slice into a mutable prefix, a middle of aligned SIMD types, +) -> (&mut [T], &mut [Simd<T, LANES>], &mut [T])

    where + Simd<T, LANES>: AsMut<[T; LANES]>, + T: SimdElement, + LaneCount<LANES>: SupportedLaneCount,
    🔬This is a nightly-only experimental API. (portable_simd)

    Split a mutable slice into a mutable prefix, a middle of aligned SIMD types, and a mutable suffix.

    -

    This is a safe wrapper around slice::align_to_mut, so has the same weak +

    This is a safe wrapper around slice::align_to_mut, so has the same weak postconditions as that method. You’re only assured that self.len() == prefix.len() + middle.len() * LANES + suffix.len().

    Notably, all of the following are possible:

    @@ -2215,8 +2233,8 @@
    Examples

    That said, this is a safe method, so if you’re only writing safe code, then this can at most cause incorrect logic, not unsoundness.

    -

    This is the mutable version of slice::as_simd; see that for examples.

    -
    Panics
    +

    This is the mutable version of slice::as_simd; see that for examples.

    +
    Panics

    This will panic if the size of the SIMD type is different from LANES times that of the scalar.

    At the time of writing, the trait restrictions on Simd<T, LANES> keeps @@ -2224,14 +2242,14 @@

    Panics
    supported. It’s possible that, in the future, those restrictions might be lifted in a way that would make it possible to see panics from this method for something like LANES == 3.

    -
    source

    pub fn is_sorted(&self) -> boolwhere - T: PartialOrd,

    🔬This is a nightly-only experimental API. (is_sorted)

    Checks if the elements of this slice are sorted.

    +
    source

    pub fn is_sorted(&self) -> bool
    where + T: PartialOrd,

    🔬This is a nightly-only experimental API. (is_sorted)

    Checks if the elements of this slice are sorted.

    That is, for each element a and its following element b, a <= b must hold. If the slice yields exactly zero or one element, true is returned.

    Note that if Self::Item is only PartialOrd, but not Ord, the above definition implies that this function returns false if any two consecutive items are not comparable.

    -
    Examples
    +
    Examples
    #![feature(is_sorted)]
     let empty: [i32; 0] = [];
     
    @@ -2240,24 +2258,24 @@ 
    Examples
    assert!([0].is_sorted()); assert!(empty.is_sorted()); assert!(![0.0, 1.0, f32::NAN].is_sorted());
    -
    source

    pub fn is_sorted_by<'a, F>(&'a self, compare: F) -> boolwhere - F: FnMut(&'a T, &'a T) -> Option<Ordering>,

    🔬This is a nightly-only experimental API. (is_sorted)

    Checks if the elements of this slice are sorted using the given comparator function.

    +
    source

    pub fn is_sorted_by<'a, F>(&'a self, compare: F) -> bool
    where + F: FnMut(&'a T, &'a T) -> Option<Ordering>,

    🔬This is a nightly-only experimental API. (is_sorted)

    Checks if the elements of this slice are sorted using the given comparator function.

    Instead of using PartialOrd::partial_cmp, this function uses the given compare function to determine the ordering of two elements. Apart from that, it’s equivalent to -is_sorted; see its documentation for more information.

    -
    source

    pub fn is_sorted_by_key<'a, F, K>(&'a self, f: F) -> boolwhere - F: FnMut(&'a T) -> K, - K: PartialOrd,

    🔬This is a nightly-only experimental API. (is_sorted)

    Checks if the elements of this slice are sorted using the given key extraction function.

    +is_sorted; see its documentation for more information.

    +
    source

    pub fn is_sorted_by_key<'a, F, K>(&'a self, f: F) -> bool
    where + F: FnMut(&'a T) -> K, + K: PartialOrd,

    🔬This is a nightly-only experimental API. (is_sorted)

    Checks if the elements of this slice are sorted using the given key extraction function.

    Instead of comparing the slice’s elements directly, this function compares the keys of the -elements, as determined by f. Apart from that, it’s equivalent to is_sorted; see its +elements, as determined by f. Apart from that, it’s equivalent to is_sorted; see its documentation for more information.

    -
    Examples
    +
    Examples
    #![feature(is_sorted)]
     
    -assert!(["c", "bb", "aaa"].is_sorted_by_key(|s| s.len()));
    +assert!(["c", "bb", "aaa"].is_sorted_by_key(|s| s.len()));
     assert!(![-2i32, -1, 0, 3].is_sorted_by_key(|n| n.abs()));
    -
    1.52.0 · source

    pub fn partition_point<P>(&self, pred: P) -> usizewhere - P: FnMut(&T) -> bool,

    Returns the index of the partition point according to the given predicate +

    1.52.0 · source

    pub fn partition_point<P>(&self, pred: P) -> usize
    where + P: FnMut(&T) -> bool,

    Returns the index of the partition point according to the given predicate (the index of the first element of the second partition).

    The slice is assumed to be partitioned according to the given predicate. This means that all elements for which the predicate returns true are at the start of the slice @@ -2266,8 +2284,8 @@

    Examples
    (all odd numbers are at the start, all even at the end).

    If this slice is not partitioned, the returned result is unspecified and meaningless, as this method performs a kind of binary search.

    -

    See also binary_search, binary_search_by, and binary_search_by_key.

    -
    Examples
    +

    See also binary_search, binary_search_by, and binary_search_by_key.

    +
    Examples
    let v = [1, 2, 3, 3, 5, 6, 7];
     let i = v.partition_point(|&x| x < 5);
     
    @@ -2289,135 +2307,135 @@ 
    Examples
    let idx = s.partition_point(|&x| x < num); s.insert(idx, num); assert_eq!(s, [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 42, 55]);
    -
    source

    pub fn take<R, 'a>(self: &mut &'a [T], range: R) -> Option<&'a [T]>where - R: OneSidedRange<usize>,

    🔬This is a nightly-only experimental API. (slice_take)

    Removes the subslice corresponding to the given range +

    source

    pub fn take<R, 'a>(self: &mut &'a [T], range: R) -> Option<&'a [T]>
    where + R: OneSidedRange<usize>,

    🔬This is a nightly-only experimental API. (slice_take)

    Removes the subslice corresponding to the given range and returns a reference to it.

    Returns None and does not modify the slice if the given range is out of bounds.

    Note that this method only accepts one-sided ranges such as 2.. or ..6, but not 2..6.

    -
    Examples
    +
    Examples

    Taking the first three elements of a slice:

    #![feature(slice_take)]
     
    -let mut slice: &[_] = &['a', 'b', 'c', 'd'];
    +let mut slice: &[_] = &['a', 'b', 'c', 'd'];
     let mut first_three = slice.take(..3).unwrap();
     
    -assert_eq!(slice, &['d']);
    -assert_eq!(first_three, &['a', 'b', 'c']);
    +assert_eq!(slice, &['d']); +assert_eq!(first_three, &['a', 'b', 'c']);

    Taking the last two elements of a slice:

    #![feature(slice_take)]
     
    -let mut slice: &[_] = &['a', 'b', 'c', 'd'];
    +let mut slice: &[_] = &['a', 'b', 'c', 'd'];
     let mut tail = slice.take(2..).unwrap();
     
    -assert_eq!(slice, &['a', 'b']);
    -assert_eq!(tail, &['c', 'd']);
    +assert_eq!(slice, &['a', 'b']); +assert_eq!(tail, &['c', 'd']);

    Getting None when range is out of bounds:

    #![feature(slice_take)]
     
    -let mut slice: &[_] = &['a', 'b', 'c', 'd'];
    +let mut slice: &[_] = &['a', 'b', 'c', 'd'];
     
     assert_eq!(None, slice.take(5..));
     assert_eq!(None, slice.take(..5));
     assert_eq!(None, slice.take(..=4));
    -let expected: &[char] = &['a', 'b', 'c', 'd'];
    +let expected: &[char] = &['a', 'b', 'c', 'd'];
     assert_eq!(Some(expected), slice.take(..4));
    -
    source

    pub fn take_mut<R, 'a>(self: &mut &'a mut [T], range: R) -> Option<&'a mut [T]>where - R: OneSidedRange<usize>,

    🔬This is a nightly-only experimental API. (slice_take)

    Removes the subslice corresponding to the given range +

    source

    pub fn take_mut<R, 'a>(self: &mut &'a mut [T], range: R) -> Option<&'a mut [T]>
    where + R: OneSidedRange<usize>,

    🔬This is a nightly-only experimental API. (slice_take)

    Removes the subslice corresponding to the given range and returns a mutable reference to it.

    Returns None and does not modify the slice if the given range is out of bounds.

    Note that this method only accepts one-sided ranges such as 2.. or ..6, but not 2..6.

    -
    Examples
    +
    Examples

    Taking the first three elements of a slice:

    #![feature(slice_take)]
     
    -let mut slice: &mut [_] = &mut ['a', 'b', 'c', 'd'];
    +let mut slice: &mut [_] = &mut ['a', 'b', 'c', 'd'];
     let mut first_three = slice.take_mut(..3).unwrap();
     
    -assert_eq!(slice, &mut ['d']);
    -assert_eq!(first_three, &mut ['a', 'b', 'c']);
    +assert_eq!(slice, &mut ['d']); +assert_eq!(first_three, &mut ['a', 'b', 'c']);

    Taking the last two elements of a slice:

    #![feature(slice_take)]
     
    -let mut slice: &mut [_] = &mut ['a', 'b', 'c', 'd'];
    +let mut slice: &mut [_] = &mut ['a', 'b', 'c', 'd'];
     let mut tail = slice.take_mut(2..).unwrap();
     
    -assert_eq!(slice, &mut ['a', 'b']);
    -assert_eq!(tail, &mut ['c', 'd']);
    +assert_eq!(slice, &mut ['a', 'b']); +assert_eq!(tail, &mut ['c', 'd']);

    Getting None when range is out of bounds:

    #![feature(slice_take)]
     
    -let mut slice: &mut [_] = &mut ['a', 'b', 'c', 'd'];
    +let mut slice: &mut [_] = &mut ['a', 'b', 'c', 'd'];
     
     assert_eq!(None, slice.take_mut(5..));
     assert_eq!(None, slice.take_mut(..5));
     assert_eq!(None, slice.take_mut(..=4));
    -let expected: &mut [_] = &mut ['a', 'b', 'c', 'd'];
    +let expected: &mut [_] = &mut ['a', 'b', 'c', 'd'];
     assert_eq!(Some(expected), slice.take_mut(..4));
    -
    source

    pub fn take_first<'a>(self: &mut &'a [T]) -> Option<&'a T>

    🔬This is a nightly-only experimental API. (slice_take)

    Removes the first element of the slice and returns a reference +

    source

    pub fn take_first<'a>(self: &mut &'a [T]) -> Option<&'a T>

    🔬This is a nightly-only experimental API. (slice_take)

    Removes the first element of the slice and returns a reference to it.

    Returns None if the slice is empty.

    -
    Examples
    +
    Examples
    #![feature(slice_take)]
     
    -let mut slice: &[_] = &['a', 'b', 'c'];
    +let mut slice: &[_] = &['a', 'b', 'c'];
     let first = slice.take_first().unwrap();
     
    -assert_eq!(slice, &['b', 'c']);
    -assert_eq!(first, &'a');
    -
    source

    pub fn take_first_mut<'a>(self: &mut &'a mut [T]) -> Option<&'a mut T>

    🔬This is a nightly-only experimental API. (slice_take)

    Removes the first element of the slice and returns a mutable +assert_eq!(slice, &['b', 'c']); +assert_eq!(first, &'a');

    +
    source

    pub fn take_first_mut<'a>(self: &mut &'a mut [T]) -> Option<&'a mut T>

    🔬This is a nightly-only experimental API. (slice_take)

    Removes the first element of the slice and returns a mutable reference to it.

    Returns None if the slice is empty.

    -
    Examples
    +
    Examples
    #![feature(slice_take)]
     
    -let mut slice: &mut [_] = &mut ['a', 'b', 'c'];
    +let mut slice: &mut [_] = &mut ['a', 'b', 'c'];
     let first = slice.take_first_mut().unwrap();
    -*first = 'd';
    +*first = 'd';
     
    -assert_eq!(slice, &['b', 'c']);
    -assert_eq!(first, &'d');
    -
    source

    pub fn take_last<'a>(self: &mut &'a [T]) -> Option<&'a T>

    🔬This is a nightly-only experimental API. (slice_take)

    Removes the last element of the slice and returns a reference +assert_eq!(slice, &['b', 'c']); +assert_eq!(first, &'d');

    +
    source

    pub fn take_last<'a>(self: &mut &'a [T]) -> Option<&'a T>

    🔬This is a nightly-only experimental API. (slice_take)

    Removes the last element of the slice and returns a reference to it.

    Returns None if the slice is empty.

    -
    Examples
    +
    Examples
    #![feature(slice_take)]
     
    -let mut slice: &[_] = &['a', 'b', 'c'];
    +let mut slice: &[_] = &['a', 'b', 'c'];
     let last = slice.take_last().unwrap();
     
    -assert_eq!(slice, &['a', 'b']);
    -assert_eq!(last, &'c');
    -
    source

    pub fn take_last_mut<'a>(self: &mut &'a mut [T]) -> Option<&'a mut T>

    🔬This is a nightly-only experimental API. (slice_take)

    Removes the last element of the slice and returns a mutable +assert_eq!(slice, &['a', 'b']); +assert_eq!(last, &'c');

    +
    source

    pub fn take_last_mut<'a>(self: &mut &'a mut [T]) -> Option<&'a mut T>

    🔬This is a nightly-only experimental API. (slice_take)

    Removes the last element of the slice and returns a mutable reference to it.

    Returns None if the slice is empty.

    -
    Examples
    +
    Examples
    #![feature(slice_take)]
     
    -let mut slice: &mut [_] = &mut ['a', 'b', 'c'];
    +let mut slice: &mut [_] = &mut ['a', 'b', 'c'];
     let last = slice.take_last_mut().unwrap();
    -*last = 'd';
    +*last = 'd';
     
    -assert_eq!(slice, &['a', 'b']);
    -assert_eq!(last, &'d');
    -
    source

    pub unsafe fn get_many_unchecked_mut<const N: usize>( +assert_eq!(slice, &['a', 'b']); +assert_eq!(last, &'d'); +

    source

    pub unsafe fn get_many_unchecked_mut<const N: usize>( &mut self, - indices: [usize; N] -) -> [&mut T; N]

    🔬This is a nightly-only experimental API. (get_many_mut)

    Returns mutable references to many indices at once, without doing any checks.

    -

    For a safe alternative see get_many_mut.

    -
    Safety
    + indices: [usize; N] +) -> [&mut T; N]
    🔬This is a nightly-only experimental API. (get_many_mut)

    Returns mutable references to many indices at once, without doing any checks.

    +

    For a safe alternative see get_many_mut.

    +
    Safety

    Calling this method with overlapping or out-of-bounds indices is undefined behavior even if the resulting references are not used.

    -
    Examples
    +
    Examples
    #![feature(get_many_mut)]
     
     let x = &mut [1, 2, 4];
    @@ -2428,13 +2446,13 @@ 
    Examples
    *b *= 100; } assert_eq!(x, &[10, 2, 400]);
    -
    source

    pub fn get_many_mut<const N: usize>( +

    source

    pub fn get_many_mut<const N: usize>( &mut self, - indices: [usize; N] -) -> Result<[&mut T; N], GetManyMutError<N>>

    🔬This is a nightly-only experimental API. (get_many_mut)

    Returns mutable references to many indices at once.

    + indices: [usize; N] +) -> Result<[&mut T; N], GetManyMutError<N>>
    🔬This is a nightly-only experimental API. (get_many_mut)

    Returns mutable references to many indices at once.

    Returns an error if any index is out-of-bounds, or if the same index was passed more than once.

    -
    Examples
    +
    Examples
    #![feature(get_many_mut)]
     
     let v = &mut [1, 2, 3];
    @@ -2443,69 +2461,12 @@ 
    Examples
    *b = 612; } assert_eq!(v, &[413, 2, 612]);
    -
    1.23.0 · source

    pub fn is_ascii(&self) -> bool

    Checks if all bytes in this slice are within the ASCII range.

    -
    source

    pub fn as_ascii(&self) -> Option<&[AsciiChar]>

    🔬This is a nightly-only experimental API. (ascii_char)

    If this slice is_ascii, returns it as a slice of -ASCII characters, otherwise returns None.

    -
    source

    pub unsafe fn as_ascii_unchecked(&self) -> &[AsciiChar]

    🔬This is a nightly-only experimental API. (ascii_char)

    Converts this slice of bytes into a slice of ASCII characters, -without checking whether they’re valid.

    -
    Safety
    -

    Every byte in the slice must be in 0..=127, or else this is UB.

    -
    1.23.0 · source

    pub fn eq_ignore_ascii_case(&self, other: &[u8]) -> bool

    Checks that two slices are an ASCII case-insensitive match.

    -

    Same as to_ascii_lowercase(a) == to_ascii_lowercase(b), -but without allocating and copying temporaries.

    -
    1.23.0 · source

    pub fn make_ascii_uppercase(&mut self)

    Converts this slice to its ASCII upper case equivalent in-place.

    -

    ASCII letters ‘a’ to ‘z’ are mapped to ‘A’ to ‘Z’, -but non-ASCII letters are unchanged.

    -

    To return a new uppercased value without modifying the existing one, use -to_ascii_uppercase.

    -
    1.23.0 · source

    pub fn make_ascii_lowercase(&mut self)

    Converts this slice to its ASCII lower case equivalent in-place.

    -

    ASCII letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’, -but non-ASCII letters are unchanged.

    -

    To return a new lowercased value without modifying the existing one, use -to_ascii_lowercase.

    -
    1.60.0 · source

    pub fn escape_ascii(&self) -> EscapeAscii<'_>

    Returns an iterator that produces an escaped version of this slice, -treating it as an ASCII string.

    -
    Examples
    -
    
    -let s = b"0\t\r\n'\"\\\x9d";
    -let escaped = s.escape_ascii().to_string();
    -assert_eq!(escaped, "0\\t\\r\\n\\'\\\"\\\\\\x9d");
    -
    source

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

    🔬This is a nightly-only experimental API. (byte_slice_trim_ascii)

    Returns a byte slice with leading ASCII whitespace bytes removed.

    -

    ‘Whitespace’ refers to the definition used by -u8::is_ascii_whitespace.

    -
    Examples
    -
    #![feature(byte_slice_trim_ascii)]
    -
    -assert_eq!(b" \t hello world\n".trim_ascii_start(), b"hello world\n");
    -assert_eq!(b"  ".trim_ascii_start(), b"");
    -assert_eq!(b"".trim_ascii_start(), b"");
    -
    source

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

    🔬This is a nightly-only experimental API. (byte_slice_trim_ascii)

    Returns a byte slice with trailing ASCII whitespace bytes removed.

    -

    ‘Whitespace’ refers to the definition used by -u8::is_ascii_whitespace.

    -
    Examples
    -
    #![feature(byte_slice_trim_ascii)]
    -
    -assert_eq!(b"\r hello world\n ".trim_ascii_end(), b"\r hello world");
    -assert_eq!(b"  ".trim_ascii_end(), b"");
    -assert_eq!(b"".trim_ascii_end(), b"");
    -
    source

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

    🔬This is a nightly-only experimental API. (byte_slice_trim_ascii)

    Returns a byte slice with leading and trailing ASCII whitespace bytes -removed.

    -

    ‘Whitespace’ refers to the definition used by -u8::is_ascii_whitespace.

    -
    Examples
    -
    #![feature(byte_slice_trim_ascii)]
    -
    -assert_eq!(b"\r hello world\n ".trim_ascii(), b"hello world");
    -assert_eq!(b"  ".trim_ascii(), b"");
    -assert_eq!(b"".trim_ascii(), b"");
    -
    source

    pub fn as_str(&self) -> &str

    🔬This is a nightly-only experimental API. (ascii_char)

    Views this slice of ASCII characters as a UTF-8 str.

    -
    source

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

    🔬This is a nightly-only experimental API. (ascii_char)

    Views this slice of ASCII characters as a slice of u8 bytes.

    -
    source

    pub fn sort_floats(&mut self)

    🔬This is a nightly-only experimental API. (sort_floats)

    Sorts the slice of floats.

    +
    source

    pub fn sort_floats(&mut self)

    🔬This is a nightly-only experimental API. (sort_floats)

    Sorts the slice of floats.

    This sort is in-place (i.e. does not allocate), O(n * log(n)) worst-case, and uses -the ordering defined by f32::total_cmp.

    +the ordering defined by f32::total_cmp.

    Current implementation
    -

    This uses the same sorting algorithm as sort_unstable_by.

    -
    Examples
    +

    This uses the same sorting algorithm as sort_unstable_by.

    +
    Examples
    #![feature(sort_floats)]
     let mut v = [2.6, -5e-8, f32::NAN, 8.29, f32::INFINITY, -1.0, 0.0, -f32::INFINITY, -0.0];
     
    @@ -2513,11 +2474,50 @@ 
    Examples
    let sorted = [-f32::INFINITY, -1.0, -5e-8, -0.0, 0.0, 2.6, 8.29, f32::INFINITY, f32::NAN]; assert_eq!(&v[..8], &sorted[..8]); assert!(v[8].is_nan());
    -
    source

    pub fn sort_floats(&mut self)

    🔬This is a nightly-only experimental API. (sort_floats)

    Sorts the slice of floats.

    +
    source

    pub fn flatten(&self) -> &[T]

    🔬This is a nightly-only experimental API. (slice_flatten)

    Takes a &[[T; N]], and flattens it to a &[T].

    +
    Panics
    +

    This panics if the length of the resulting slice would overflow a usize.

    +

    This is only possible when flattening a slice of arrays of zero-sized +types, and thus tends to be irrelevant in practice. If +size_of::<T>() > 0, this will never panic.

    +
    Examples
    +
    #![feature(slice_flatten)]
    +
    +assert_eq!([[1, 2, 3], [4, 5, 6]].flatten(), &[1, 2, 3, 4, 5, 6]);
    +
    +assert_eq!(
    +    [[1, 2, 3], [4, 5, 6]].flatten(),
    +    [[1, 2], [3, 4], [5, 6]].flatten(),
    +);
    +
    +let slice_of_empty_arrays: &[[i32; 0]] = &[[], [], [], [], []];
    +assert!(slice_of_empty_arrays.flatten().is_empty());
    +
    +let empty_slice_of_arrays: &[[u32; 10]] = &[];
    +assert!(empty_slice_of_arrays.flatten().is_empty());
    +
    source

    pub fn flatten_mut(&mut self) -> &mut [T]

    🔬This is a nightly-only experimental API. (slice_flatten)

    Takes a &mut [[T; N]], and flattens it to a &mut [T].

    +
    Panics
    +

    This panics if the length of the resulting slice would overflow a usize.

    +

    This is only possible when flattening a slice of arrays of zero-sized +types, and thus tends to be irrelevant in practice. If +size_of::<T>() > 0, this will never panic.

    +
    Examples
    +
    #![feature(slice_flatten)]
    +
    +fn add_5_to_all(slice: &mut [i32]) {
    +    for i in slice {
    +        *i += 5;
    +    }
    +}
    +
    +let mut array = [[1, 2, 3], [4, 5, 6], [7, 8, 9]];
    +add_5_to_all(array.flatten_mut());
    +assert_eq!(array, [[6, 7, 8], [9, 10, 11], [12, 13, 14]]);
    +
    source

    pub fn sort_floats(&mut self)

    🔬This is a nightly-only experimental API. (sort_floats)

    Sorts the slice of floats.

    This sort is in-place (i.e. does not allocate), O(n * log(n)) worst-case, and uses -the ordering defined by f64::total_cmp.

    +the ordering defined by f64::total_cmp.

    Current implementation
    -

    This uses the same sorting algorithm as sort_unstable_by.

    +

    This uses the same sorting algorithm as sort_unstable_by.

    Examples
    #![feature(sort_floats)]
     let mut v = [2.6, -5e-8, f64::NAN, 8.29, f64::INFINITY, -1.0, 0.0, -f64::INFINITY, -0.0];
    @@ -2526,12 +2526,12 @@ 
    Examples
    let sorted = [-f64::INFINITY, -1.0, -5e-8, -0.0, 0.0, 2.6, 8.29, f64::INFINITY, f64::NAN]; assert_eq!(&v[..8], &sorted[..8]); assert!(v[8].is_nan());
    -
    1.0.0 · source

    pub fn sort(&mut self)where - T: Ord,

    Sorts the slice.

    +
    1.0.0 · source

    pub fn sort(&mut self)
    where + T: Ord,

    Sorts the slice.

    This sort is stable (i.e., does not reorder equal elements) and O(n * log(n)) worst-case.

    When applicable, unstable sorting is preferred because it is generally faster than stable sorting and it doesn’t allocate auxiliary memory. -See sort_unstable.

    +See sort_unstable.

    Current implementation

    The current algorithm is an adaptive, iterative merge sort inspired by timsort. @@ -2544,8 +2544,8 @@

    Examples
    v.sort(); assert!(v == [-5, -3, 1, 2, 4]);
    -
    1.0.0 · source

    pub fn sort_by<F>(&mut self, compare: F)where - F: FnMut(&T, &T) -> Ordering,

    Sorts the slice with a comparator function.

    +
    1.0.0 · source

    pub fn sort_by<F>(&mut self, compare: F)
    where + F: FnMut(&T, &T) -> Ordering,

    Sorts the slice with a comparator function.

    This sort is stable (i.e., does not reorder equal elements) and O(n * log(n)) worst-case.

    The comparator function must define a total ordering for the elements in the slice. If the ordering is not total, the order of the elements is unspecified. An order is a @@ -2554,7 +2554,7 @@

    Examples
  • total and antisymmetric: exactly one of a < b, a == b or a > b is true, and
  • transitive, a < b and b < c implies a < c. The same must hold for both == and >.
  • -

    For example, while f64 doesn’t implement Ord because NaN != NaN, we can use +

    For example, while f64 doesn’t implement Ord because NaN != NaN, we can use partial_cmp as our sort function when we know the slice doesn’t contain a NaN.

    let mut floats = [5f64, 4.0, 1.0, 3.0, 2.0];
    @@ -2562,7 +2562,7 @@ 
    Examples
    assert_eq!(floats, [1.0, 2.0, 3.0, 4.0, 5.0]);

    When applicable, unstable sorting is preferred because it is generally faster than stable sorting and it doesn’t allocate auxiliary memory. -See sort_unstable_by.

    +See sort_unstable_by.

    Current implementation

    The current algorithm is an adaptive, iterative merge sort inspired by timsort. @@ -2578,17 +2578,17 @@

    Examples
    // reverse sorting v.sort_by(|a, b| b.cmp(a)); assert!(v == [5, 4, 3, 2, 1]);
    -
    1.7.0 · source

    pub fn sort_by_key<K, F>(&mut self, f: F)where - F: FnMut(&T) -> K, - K: Ord,

    Sorts the slice with a key extraction function.

    +
    1.7.0 · source

    pub fn sort_by_key<K, F>(&mut self, f: F)
    where + F: FnMut(&T) -> K, + K: Ord,

    Sorts the slice with a key extraction function.

    This sort is stable (i.e., does not reorder equal elements) and O(m * n * log(n)) worst-case, where the key function is O(m).

    For expensive key functions (e.g. functions that are not simple property accesses or -basic operations), sort_by_cached_key is likely to be +basic operations), sort_by_cached_key is likely to be significantly faster, as it does not recompute element keys.

    When applicable, unstable sorting is preferred because it is generally faster than stable sorting and it doesn’t allocate auxiliary memory. -See sort_unstable_by_key.

    +See sort_unstable_by_key.

    Current implementation

    The current algorithm is an adaptive, iterative merge sort inspired by timsort. @@ -2601,9 +2601,9 @@

    Examples
    v.sort_by_key(|k| k.abs()); assert!(v == [1, 2, -3, 4, -5]);
    -
    1.34.0 · source

    pub fn sort_by_cached_key<K, F>(&mut self, f: F)where - F: FnMut(&T) -> K, - K: Ord,

    Sorts the slice with a key extraction function.

    +
    1.34.0 · source

    pub fn sort_by_cached_key<K, F>(&mut self, f: F)
    where + F: FnMut(&T) -> K, + K: Ord,

    Sorts the slice with a key extraction function.

    During sorting, the key function is called at most once per element, by using temporary storage to remember the results of key evaluation. The order of calls to the key function is unspecified and may change in future versions @@ -2611,7 +2611,7 @@

    Examples

    This sort is stable (i.e., does not reorder equal elements) and O(m * n + n * log(n)) worst-case, where the key function is O(m).

    For simple key functions (e.g., functions that are property accesses or -basic operations), sort_by_key is likely to be +basic operations), sort_by_key is likely to be faster.

    Current implementation

    The current algorithm is based on pattern-defeating quicksort by Orson Peters, @@ -2626,15 +2626,15 @@

    Examples
    v.sort_by_cached_key(|k| k.to_string()); assert!(v == [-3, -5, 2, 32, 4]);
    -
    1.0.0 · source

    pub fn to_vec(&self) -> Vec<T>where - T: Clone,

    Copies self into a new Vec.

    +
    1.0.0 · source

    pub fn to_vec(&self) -> Vec<T>
    where + T: Clone,

    Copies self into a new Vec.

    Examples
    let s = [10, 40, 30];
     let x = s.to_vec();
     // Here, `s` and `x` can be modified independently.
    -
    source

    pub fn to_vec_in<A>(&self, alloc: A) -> Vec<T, A>where - A: Allocator, - T: Clone,

    🔬This is a nightly-only experimental API. (allocator_api)

    Copies self into a new Vec with an allocator.

    +
    source

    pub fn to_vec_in<A>(&self, alloc: A) -> Vec<T, A>
    where + A: Allocator, + T: Clone,

    🔬This is a nightly-only experimental API. (allocator_api)

    Copies self into a new Vec with an allocator.

    Examples
    #![feature(allocator_api)]
     
    @@ -2643,8 +2643,8 @@ 
    Examples
    let s = [10, 40, 30]; let x = s.to_vec_in(System); // Here, `s` and `x` can be modified independently.
    -
    1.40.0 · source

    pub fn repeat(&self, n: usize) -> Vec<T>where - T: Copy,

    Creates a vector by copying a slice n times.

    +
    1.40.0 · source

    pub fn repeat(&self, n: usize) -> Vec<T>
    where + T: Copy,

    Creates a vector by copying a slice n times.

    Panics

    This function will panic if the capacity would overflow.

    Examples
    @@ -2654,144 +2654,144 @@
    Examples

    A panic upon overflow:

    // this will panic at runtime
    -b"0123456789abcdef".repeat(usize::MAX);
    -
    1.0.0 · source

    pub fn concat<Item>(&self) -> <[T] as Concat<Item>>::Output where - [T]: Concat<Item>, - Item: ?Sized,

    Flattens a slice of T into a single value Self::Output.

    +b"0123456789abcdef".repeat(usize::MAX);
    +
    1.0.0 · source

    pub fn concat<Item>(&self) -> <[T] as Concat<Item>>::Output
    where + [T]: Concat<Item>, + Item: ?Sized,

    Flattens a slice of T into a single value Self::Output.

    Examples
    -
    assert_eq!(["hello", "world"].concat(), "helloworld");
    +
    assert_eq!(["hello", "world"].concat(), "helloworld");
     assert_eq!([[1, 2], [3, 4]].concat(), [1, 2, 3, 4]);
    -
    1.3.0 · source

    pub fn join<Separator>( +

    1.3.0 · source

    pub fn join<Separator>( &self, sep: Separator -) -> <[T] as Join<Separator>>::Output where - [T]: Join<Separator>,

    Flattens a slice of T into a single value Self::Output, placing a +) -> <[T] as Join<Separator>>::Output

    where + [T]: Join<Separator>,

    Flattens a slice of T into a single value Self::Output, placing a given separator between each.

    Examples
    -
    assert_eq!(["hello", "world"].join(" "), "hello world");
    +
    assert_eq!(["hello", "world"].join(" "), "hello world");
     assert_eq!([[1, 2], [3, 4]].join(&0), [1, 2, 0, 3, 4]);
     assert_eq!([[1, 2], [3, 4]].join(&[0, 0][..]), [1, 2, 0, 0, 3, 4]);
    -
    1.0.0 · source

    pub fn connect<Separator>( +

    1.0.0 · source

    pub fn connect<Separator>( &self, sep: Separator -) -> <[T] as Join<Separator>>::Output where - [T]: Join<Separator>,

    👎Deprecated since 1.3.0: renamed to join

    Flattens a slice of T into a single value Self::Output, placing a +) -> <[T] as Join<Separator>>::Output

    where + [T]: Join<Separator>,
    👎Deprecated since 1.3.0: renamed to join

    Flattens a slice of T into a single value Self::Output, placing a given separator between each.

    Examples
    -
    assert_eq!(["hello", "world"].connect(" "), "hello world");
    +
    assert_eq!(["hello", "world"].connect(" "), "hello world");
     assert_eq!([[1, 2], [3, 4]].connect(&0), [1, 2, 0, 3, 4]);
    -
    1.23.0 · source

    pub fn to_ascii_uppercase(&self) -> Vec<u8>

    Returns a vector containing a copy of this slice where each byte +

    1.23.0 · source

    pub fn to_ascii_uppercase(&self) -> Vec<u8>

    Returns a vector containing a copy of this slice where each byte is mapped to its ASCII upper case equivalent.

    ASCII letters ‘a’ to ‘z’ are mapped to ‘A’ to ‘Z’, but non-ASCII letters are unchanged.

    -

    To uppercase the value in-place, use make_ascii_uppercase.

    -
    1.23.0 · source

    pub fn to_ascii_lowercase(&self) -> Vec<u8>

    Returns a vector containing a copy of this slice where each byte +

    To uppercase the value in-place, use make_ascii_uppercase.

    +
    1.23.0 · source

    pub fn to_ascii_lowercase(&self) -> Vec<u8>

    Returns a vector containing a copy of this slice where each byte is mapped to its ASCII lower case equivalent.

    ASCII letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’, but non-ASCII letters are unchanged.

    -

    To lowercase the value in-place, use make_ascii_lowercase.

    -

    Trait Implementations§

    source§

    impl AsMut<[u8]> for BytesMut

    source§

    fn as_mut(&mut self) -> &mut [u8]

    Converts this type into a mutable reference of the (usually inferred) input type.
    source§

    impl AsRef<[u8]> for BytesMut

    source§

    fn as_ref(&self) -> &[u8]

    Converts this type into a shared reference of the (usually inferred) input type.
    source§

    impl Borrow<[u8]> for BytesMut

    source§

    fn borrow(&self) -> &[u8]

    Immutably borrows from an owned value. Read more
    source§

    impl BorrowMut<[u8]> for BytesMut

    source§

    fn borrow_mut(&mut self) -> &mut [u8]

    Mutably borrows from an owned value. Read more
    source§

    impl Buf for BytesMut

    source§

    fn remaining(&self) -> usize

    Returns the number of bytes between the current position and the end of -the buffer. Read more
    source§

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

    Returns a slice starting at the current position and of length between 0 +

    To lowercase the value in-place, use make_ascii_lowercase.

    +

    Trait Implementations§

    source§

    impl AsMut<[u8]> for BytesMut

    source§

    fn as_mut(&mut self) -> &mut [u8]

    Converts this type into a mutable reference of the (usually inferred) input type.
    source§

    impl AsRef<[u8]> for BytesMut

    source§

    fn as_ref(&self) -> &[u8]

    Converts this type into a shared reference of the (usually inferred) input type.
    source§

    impl Borrow<[u8]> for BytesMut

    source§

    fn borrow(&self) -> &[u8]

    Immutably borrows from an owned value. Read more
    source§

    impl BorrowMut<[u8]> for BytesMut

    source§

    fn borrow_mut(&mut self) -> &mut [u8]

    Mutably borrows from an owned value. Read more
    source§

    impl Buf for BytesMut

    source§

    fn remaining(&self) -> usize

    Returns the number of bytes between the current position and the end of +the buffer. Read more
    source§

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

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

    fn advance(&mut self, cnt: usize)

    Advance the internal cursor of the Buf Read more
    source§

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

    Consumes len bytes inside self and returns new instance of Bytes -with this data. Read more
    source§

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

    Fills dst with potentially multiple slices starting at self’s -current position. Read more
    source§

    fn has_remaining(&self) -> bool

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

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

    Copies bytes from self into dst. Read more
    source§

    fn get_u8(&mut self) -> u8

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

    fn get_i8(&mut self) -> i8

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

    fn get_u16(&mut self) -> u16

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

    fn get_u16_le(&mut self) -> u16

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

    fn get_u16_ne(&mut self) -> u16

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

    fn get_i16(&mut self) -> i16

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

    fn get_i16_le(&mut self) -> i16

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

    fn get_i16_ne(&mut self) -> i16

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

    fn get_u32(&mut self) -> u32

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

    fn get_u32_le(&mut self) -> u32

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

    fn get_u32_ne(&mut self) -> u32

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

    fn get_i32(&mut self) -> i32

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

    fn get_i32_le(&mut self) -> i32

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

    fn get_i32_ne(&mut self) -> i32

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

    fn get_u64(&mut self) -> u64

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

    fn get_u64_le(&mut self) -> u64

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

    fn get_u64_ne(&mut self) -> u64

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

    fn get_i64(&mut self) -> i64

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

    fn get_i64_le(&mut self) -> i64

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

    fn get_i64_ne(&mut self) -> i64

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

    fn get_u128(&mut self) -> u128

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

    fn get_u128_le(&mut self) -> u128

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

    fn get_u128_ne(&mut self) -> u128

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

    fn get_i128(&mut self) -> i128

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

    fn get_i128_le(&mut self) -> i128

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

    fn get_i128_ne(&mut self) -> i128

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

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

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

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

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

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

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

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

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

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

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

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

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

    fn get_f32(&mut self) -> f32

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

    fn get_f32_le(&mut self) -> f32

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

    fn get_f32_ne(&mut self) -> f32

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

    fn get_f64(&mut self) -> f64

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

    fn get_f64_le(&mut self) -> f64

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

    fn get_f64_ne(&mut self) -> f64

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

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

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

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

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

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

    Creates an adaptor which implements the Read trait for self. Read more
    source§

    impl BufMut for BytesMut

    source§

    fn remaining_mut(&self) -> usize

    Returns the number of bytes that can be written from the current -position until the end of the buffer is reached. Read more
    source§

    unsafe fn advance_mut(&mut self, cnt: usize)

    Advance the internal cursor of the BufMut Read more
    source§

    fn chunk_mut(&mut self) -> &mut UninitSlice

    Returns a mutable slice starting at the current BufMut position and of +non-continuous internal representation). Read more
    source§

    fn advance(&mut self, cnt: usize)

    Advance the internal cursor of the Buf Read more
    source§

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

    Consumes len bytes inside self and returns new instance of Bytes +with this data. Read more
    source§

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

    Fills dst with potentially multiple slices starting at self’s +current position. Read more
    source§

    fn has_remaining(&self) -> bool

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

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

    Copies bytes from self into dst. Read more
    source§

    fn get_u8(&mut self) -> u8

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

    fn get_i8(&mut self) -> i8

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

    fn get_u16(&mut self) -> u16

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

    fn get_u16_le(&mut self) -> u16

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

    fn get_u16_ne(&mut self) -> u16

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

    fn get_i16(&mut self) -> i16

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

    fn get_i16_le(&mut self) -> i16

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

    fn get_i16_ne(&mut self) -> i16

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

    fn get_u32(&mut self) -> u32

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

    fn get_u32_le(&mut self) -> u32

    Gets an unsigned 32 bit integer from self in the little-endian byte order. Read more
    source§

    fn get_u32_ne(&mut self) -> u32

    Gets an unsigned 32 bit integer from self in native-endian byte order. Read more
    source§

    fn get_i32(&mut self) -> i32

    Gets a signed 32 bit integer from self in big-endian byte order. Read more
    source§

    fn get_i32_le(&mut self) -> i32

    Gets a signed 32 bit integer from self in little-endian byte order. Read more
    source§

    fn get_i32_ne(&mut self) -> i32

    Gets a signed 32 bit integer from self in native-endian byte order. Read more
    source§

    fn get_u64(&mut self) -> u64

    Gets an unsigned 64 bit integer from self in big-endian byte order. Read more
    source§

    fn get_u64_le(&mut self) -> u64

    Gets an unsigned 64 bit integer from self in little-endian byte order. Read more
    source§

    fn get_u64_ne(&mut self) -> u64

    Gets an unsigned 64 bit integer from self in native-endian byte order. Read more
    source§

    fn get_i64(&mut self) -> i64

    Gets a signed 64 bit integer from self in big-endian byte order. Read more
    source§

    fn get_i64_le(&mut self) -> i64

    Gets a signed 64 bit integer from self in little-endian byte order. Read more
    source§

    fn get_i64_ne(&mut self) -> i64

    Gets a signed 64 bit integer from self in native-endian byte order. Read more
    source§

    fn get_u128(&mut self) -> u128

    Gets an unsigned 128 bit integer from self in big-endian byte order. Read more
    source§

    fn get_u128_le(&mut self) -> u128

    Gets an unsigned 128 bit integer from self in little-endian byte order. Read more
    source§

    fn get_u128_ne(&mut self) -> u128

    Gets an unsigned 128 bit integer from self in native-endian byte order. Read more
    source§

    fn get_i128(&mut self) -> i128

    Gets a signed 128 bit integer from self in big-endian byte order. Read more
    source§

    fn get_i128_le(&mut self) -> i128

    Gets a signed 128 bit integer from self in little-endian byte order. Read more
    source§

    fn get_i128_ne(&mut self) -> i128

    Gets a signed 128 bit integer from self in native-endian byte order. Read more
    source§

    fn get_uint(&mut self, nbytes: usize) -> u64

    Gets an unsigned n-byte integer from self in big-endian byte order. Read more
    source§

    fn get_uint_le(&mut self, nbytes: usize) -> u64

    Gets an unsigned n-byte integer from self in little-endian byte order. Read more
    source§

    fn get_uint_ne(&mut self, nbytes: usize) -> u64

    Gets an unsigned n-byte integer from self in native-endian byte order. Read more
    source§

    fn get_int(&mut self, nbytes: usize) -> i64

    Gets a signed n-byte integer from self in big-endian byte order. Read more
    source§

    fn get_int_le(&mut self, nbytes: usize) -> i64

    Gets a signed n-byte integer from self in little-endian byte order. Read more
    source§

    fn get_int_ne(&mut self, nbytes: usize) -> i64

    Gets a signed n-byte integer from self in native-endian byte order. Read more
    source§

    fn get_f32(&mut self) -> f32

    Gets an IEEE754 single-precision (4 bytes) floating point number from +self in big-endian byte order. Read more
    source§

    fn get_f32_le(&mut self) -> f32

    Gets an IEEE754 single-precision (4 bytes) floating point number from +self in little-endian byte order. Read more
    source§

    fn get_f32_ne(&mut self) -> f32

    Gets an IEEE754 single-precision (4 bytes) floating point number from +self in native-endian byte order. Read more
    source§

    fn get_f64(&mut self) -> f64

    Gets an IEEE754 double-precision (8 bytes) floating point number from +self in big-endian byte order. Read more
    source§

    fn get_f64_le(&mut self) -> f64

    Gets an IEEE754 double-precision (8 bytes) floating point number from +self in little-endian byte order. Read more
    source§

    fn get_f64_ne(&mut self) -> f64

    Gets an IEEE754 double-precision (8 bytes) floating point number from +self in native-endian byte order. Read more
    source§

    fn take(self, limit: usize) -> Take<Self>
    where + Self: Sized,

    Creates an adaptor which will read at most limit bytes from self. Read more
    source§

    fn chain<U: Buf>(self, next: U) -> Chain<Self, U>
    where + Self: Sized,

    Creates an adaptor which will chain this buffer with another. Read more
    source§

    fn reader(self) -> Reader<Self>
    where + Self: Sized,

    Creates an adaptor which implements the Read trait for self. Read more
    source§

    impl BufMut for BytesMut

    source§

    fn remaining_mut(&self) -> usize

    Returns the number of bytes that can be written from the current +position until the end of the buffer is reached. Read more
    source§

    unsafe fn advance_mut(&mut self, cnt: usize)

    Advance the internal cursor of the BufMut Read more
    source§

    fn chunk_mut(&mut self) -> &mut UninitSlice

    Returns a mutable slice starting at the current BufMut position and of length between 0 and BufMut::remaining_mut(). Note that this can be shorter than the -whole remainder of the buffer (this allows non-continuous implementation). Read more
    source§

    fn put<T: Buf>(&mut self, src: T)where - Self: Sized,

    Transfer bytes into self from src and advance the cursor by the -number of bytes written. Read more
    source§

    fn put_slice(&mut self, src: &[u8])

    Transfer bytes into self from src and advance the cursor by the -number of bytes written. Read more
    source§

    fn put_bytes(&mut self, val: u8, cnt: usize)

    Put cnt bytes val into self. Read more
    source§

    fn has_remaining_mut(&self) -> bool

    Returns true if there is space in self for more bytes. Read more
    source§

    fn put_u8(&mut self, n: u8)

    Writes an unsigned 8 bit integer to self. Read more
    source§

    fn put_i8(&mut self, n: i8)

    Writes a signed 8 bit integer to self. Read more
    source§

    fn put_u16(&mut self, n: u16)

    Writes an unsigned 16 bit integer to self in big-endian byte order. Read more
    source§

    fn put_u16_le(&mut self, n: u16)

    Writes an unsigned 16 bit integer to self in little-endian byte order. Read more
    source§

    fn put_u16_ne(&mut self, n: u16)

    Writes an unsigned 16 bit integer to self in native-endian byte order. Read more
    source§

    fn put_i16(&mut self, n: i16)

    Writes a signed 16 bit integer to self in big-endian byte order. Read more
    source§

    fn put_i16_le(&mut self, n: i16)

    Writes a signed 16 bit integer to self in little-endian byte order. Read more
    source§

    fn put_i16_ne(&mut self, n: i16)

    Writes a signed 16 bit integer to self in native-endian byte order. Read more
    source§

    fn put_u32(&mut self, n: u32)

    Writes an unsigned 32 bit integer to self in big-endian byte order. Read more
    source§

    fn put_u32_le(&mut self, n: u32)

    Writes an unsigned 32 bit integer to self in little-endian byte order. Read more
    source§

    fn put_u32_ne(&mut self, n: u32)

    Writes an unsigned 32 bit integer to self in native-endian byte order. Read more
    source§

    fn put_i32(&mut self, n: i32)

    Writes a signed 32 bit integer to self in big-endian byte order. Read more
    source§

    fn put_i32_le(&mut self, n: i32)

    Writes a signed 32 bit integer to self in little-endian byte order. Read more
    source§

    fn put_i32_ne(&mut self, n: i32)

    Writes a signed 32 bit integer to self in native-endian byte order. Read more
    source§

    fn put_u64(&mut self, n: u64)

    Writes an unsigned 64 bit integer to self in the big-endian byte order. Read more
    source§

    fn put_u64_le(&mut self, n: u64)

    Writes an unsigned 64 bit integer to self in little-endian byte order. Read more
    source§

    fn put_u64_ne(&mut self, n: u64)

    Writes an unsigned 64 bit integer to self in native-endian byte order. Read more
    source§

    fn put_i64(&mut self, n: i64)

    Writes a signed 64 bit integer to self in the big-endian byte order. Read more
    source§

    fn put_i64_le(&mut self, n: i64)

    Writes a signed 64 bit integer to self in little-endian byte order. Read more
    source§

    fn put_i64_ne(&mut self, n: i64)

    Writes a signed 64 bit integer to self in native-endian byte order. Read more
    source§

    fn put_u128(&mut self, n: u128)

    Writes an unsigned 128 bit integer to self in the big-endian byte order. Read more
    source§

    fn put_u128_le(&mut self, n: u128)

    Writes an unsigned 128 bit integer to self in little-endian byte order. Read more
    source§

    fn put_u128_ne(&mut self, n: u128)

    Writes an unsigned 128 bit integer to self in native-endian byte order. Read more
    source§

    fn put_i128(&mut self, n: i128)

    Writes a signed 128 bit integer to self in the big-endian byte order. Read more
    source§

    fn put_i128_le(&mut self, n: i128)

    Writes a signed 128 bit integer to self in little-endian byte order. Read more
    source§

    fn put_i128_ne(&mut self, n: i128)

    Writes a signed 128 bit integer to self in native-endian byte order. Read more
    source§

    fn put_uint(&mut self, n: u64, nbytes: usize)

    Writes an unsigned n-byte integer to self in big-endian byte order. Read more
    source§

    fn put_uint_le(&mut self, n: u64, nbytes: usize)

    Writes an unsigned n-byte integer to self in the little-endian byte order. Read more
    source§

    fn put_uint_ne(&mut self, n: u64, nbytes: usize)

    Writes an unsigned n-byte integer to self in the native-endian byte order. Read more
    source§

    fn put_int(&mut self, n: i64, nbytes: usize)

    Writes low nbytes of a signed integer to self in big-endian byte order. Read more
    source§

    fn put_int_le(&mut self, n: i64, nbytes: usize)

    Writes low nbytes of a signed integer to self in little-endian byte order. Read more
    source§

    fn put_int_ne(&mut self, n: i64, nbytes: usize)

    Writes low nbytes of a signed integer to self in native-endian byte order. Read more
    source§

    fn put_f32(&mut self, n: f32)

    Writes an IEEE754 single-precision (4 bytes) floating point number to -self in big-endian byte order. Read more
    source§

    fn put_f32_le(&mut self, n: f32)

    Writes an IEEE754 single-precision (4 bytes) floating point number to -self in little-endian byte order. Read more
    source§

    fn put_f32_ne(&mut self, n: f32)

    Writes an IEEE754 single-precision (4 bytes) floating point number to -self in native-endian byte order. Read more
    source§

    fn put_f64(&mut self, n: f64)

    Writes an IEEE754 double-precision (8 bytes) floating point number to -self in big-endian byte order. Read more
    source§

    fn put_f64_le(&mut self, n: f64)

    Writes an IEEE754 double-precision (8 bytes) floating point number to -self in little-endian byte order. Read more
    source§

    fn put_f64_ne(&mut self, n: f64)

    Writes an IEEE754 double-precision (8 bytes) floating point number to -self in native-endian byte order. Read more
    source§

    fn limit(self, limit: usize) -> Limit<Self>where - Self: Sized,

    Creates an adaptor which can write at most limit bytes to self. Read more
    source§

    fn writer(self) -> Writer<Self> where - Self: Sized,

    Creates an adaptor which implements the Write trait for self. Read more
    source§

    fn chain_mut<U: BufMut>(self, next: U) -> Chain<Self, U>where - Self: Sized,

    Creates an adapter which will chain this buffer with another. Read more
    source§

    impl Clone for BytesMut

    source§

    fn clone(&self) -> BytesMut

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for BytesMut

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for BytesMut

    source§

    fn default() -> BytesMut

    Returns the “default value” for a type. Read more
    source§

    impl Deref for BytesMut

    §

    type Target = [u8]

    The resulting type after dereferencing.
    source§

    fn deref(&self) -> &[u8]

    Dereferences the value.
    source§

    impl DerefMut for BytesMut

    source§

    fn deref_mut(&mut self) -> &mut [u8]

    Mutably dereferences the value.
    source§

    impl Drop for BytesMut

    source§

    fn drop(&mut self)

    Executes the destructor for this type. Read more
    source§

    impl<'a> Extend<&'a u8> for BytesMut

    source§

    fn extend<T>(&mut self, iter: T)where - T: IntoIterator<Item = &'a u8>,

    Extends a collection with the contents of an iterator. Read more
    source§

    fn extend_one(&mut self, item: A)

    🔬This is a nightly-only experimental API. (extend_one)
    Extends a collection with exactly one element.
    source§

    fn extend_reserve(&mut self, additional: usize)

    🔬This is a nightly-only experimental API. (extend_one)
    Reserves capacity in a collection for the given number of additional elements. Read more
    source§

    impl Extend<Bytes> for BytesMut

    source§

    fn extend<T>(&mut self, iter: T)where - T: IntoIterator<Item = Bytes>,

    Extends a collection with the contents of an iterator. Read more
    source§

    fn extend_one(&mut self, item: A)

    🔬This is a nightly-only experimental API. (extend_one)
    Extends a collection with exactly one element.
    source§

    fn extend_reserve(&mut self, additional: usize)

    🔬This is a nightly-only experimental API. (extend_one)
    Reserves capacity in a collection for the given number of additional elements. Read more
    source§

    impl Extend<u8> for BytesMut

    source§

    fn extend<T>(&mut self, iter: T)where - T: IntoIterator<Item = u8>,

    Extends a collection with the contents of an iterator. Read more
    source§

    fn extend_one(&mut self, item: A)

    🔬This is a nightly-only experimental API. (extend_one)
    Extends a collection with exactly one element.
    source§

    fn extend_reserve(&mut self, additional: usize)

    🔬This is a nightly-only experimental API. (extend_one)
    Reserves capacity in a collection for the given number of additional elements. Read more
    source§

    impl<'a> From<&'a [u8]> for BytesMut

    source§

    fn from(src: &'a [u8]) -> BytesMut

    Converts to this type from the input type.
    source§

    impl<'a> From<&'a str> for BytesMut

    source§

    fn from(src: &'a str) -> BytesMut

    Converts to this type from the input type.
    source§

    impl From<BytesMut> for Bytes

    source§

    fn from(src: BytesMut) -> Bytes

    Converts to this type from the input type.
    source§

    impl From<BytesMut> for Vec<u8>

    source§

    fn from(bytes: BytesMut) -> Self

    Converts to this type from the input type.
    source§

    impl<'a> FromIterator<&'a u8> for BytesMut

    source§

    fn from_iter<T: IntoIterator<Item = &'a u8>>(into_iter: T) -> Self

    Creates a value from an iterator. Read more
    source§

    impl FromIterator<u8> for BytesMut

    source§

    fn from_iter<T: IntoIterator<Item = u8>>(into_iter: T) -> Self

    Creates a value from an iterator. Read more
    source§

    impl Hash for BytesMut

    source§

    fn hash<H>(&self, state: &mut H)where - H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)where - H: Hasher, - Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    source§

    impl<'a> IntoIterator for &'a BytesMut

    §

    type Item = &'a u8

    The type of the elements being iterated over.
    §

    type IntoIter = Iter<'a, u8>

    Which kind of iterator are we turning this into?
    source§

    fn into_iter(self) -> Self::IntoIter

    Creates an iterator from a value. Read more
    source§

    impl IntoIterator for BytesMut

    §

    type Item = u8

    The type of the elements being iterated over.
    §

    type IntoIter = IntoIter<BytesMut>

    Which kind of iterator are we turning this into?
    source§

    fn into_iter(self) -> Self::IntoIter

    Creates an iterator from a value. Read more
    source§

    impl LowerHex for BytesMut

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter.
    source§

    impl Ord for BytesMut

    source§

    fn cmp(&self, other: &BytesMut) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · source§

    fn max(self, other: Self) -> Selfwhere - Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · source§

    fn min(self, other: Self) -> Selfwhere - Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · source§

    fn clamp(self, min: Self, max: Self) -> Selfwhere - Self: Sized + PartialOrd,

    Restrict a value to a certain interval. Read more
    source§

    impl<'a, T: ?Sized> PartialEq<&'a T> for BytesMutwhere - BytesMut: PartialEq<T>,

    source§

    fn eq(&self, other: &&'a T) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl PartialEq<[u8]> for BytesMut

    source§

    fn eq(&self, other: &[u8]) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl PartialEq<Bytes> for BytesMut

    source§

    fn eq(&self, other: &Bytes) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl PartialEq<BytesMut> for &[u8]

    source§

    fn eq(&self, other: &BytesMut) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl PartialEq<BytesMut> for &str

    source§

    fn eq(&self, other: &BytesMut) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl PartialEq<BytesMut> for [u8]

    source§

    fn eq(&self, other: &BytesMut) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl PartialEq<BytesMut> for Bytes

    source§

    fn eq(&self, other: &BytesMut) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl PartialEq<BytesMut> for String

    source§

    fn eq(&self, other: &BytesMut) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl PartialEq<BytesMut> for Vec<u8>

    source§

    fn eq(&self, other: &BytesMut) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl PartialEq<BytesMut> for str

    source§

    fn eq(&self, other: &BytesMut) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl PartialEq<String> for BytesMut

    source§

    fn eq(&self, other: &String) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl PartialEq<Vec<u8>> for BytesMut

    source§

    fn eq(&self, other: &Vec<u8>) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl PartialEq<str> for BytesMut

    source§

    fn eq(&self, other: &str) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl PartialEq for BytesMut

    source§

    fn eq(&self, other: &BytesMut) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl<'a, T: ?Sized> PartialOrd<&'a T> for BytesMutwhere - BytesMut: PartialOrd<T>,

    source§

    fn partial_cmp(&self, other: &&'a T) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
    source§

    impl PartialOrd<[u8]> for BytesMut

    source§

    fn partial_cmp(&self, other: &[u8]) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
    source§

    impl PartialOrd<BytesMut> for &[u8]

    source§

    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 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
    source§

    impl PartialOrd<BytesMut> for &str

    source§

    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 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
    source§

    impl PartialOrd<BytesMut> for [u8]

    source§

    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 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
    source§

    impl PartialOrd<BytesMut> for String

    source§

    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 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
    source§

    impl PartialOrd<BytesMut> for Vec<u8>

    source§

    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 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
    source§

    impl PartialOrd<BytesMut> for str

    source§

    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 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
    source§

    impl PartialOrd<String> for BytesMut

    source§

    fn partial_cmp(&self, other: &String) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
    source§

    impl PartialOrd<Vec<u8>> for BytesMut

    source§

    fn partial_cmp(&self, other: &Vec<u8>) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
    source§

    impl PartialOrd<str> for BytesMut

    source§

    fn partial_cmp(&self, other: &str) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
    source§

    impl PartialOrd for BytesMut

    source§

    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 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= -operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
    source§

    impl UpperHex for BytesMut

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter.
    source§

    impl Write for BytesMut

    source§

    fn write_str(&mut self, s: &str) -> Result

    Writes a string slice into this writer, returning whether the write -succeeded. Read more
    source§

    fn write_fmt(&mut self, args: Arguments<'_>) -> Result

    Glue for usage of the write! macro with implementors of this trait. Read more
    1.1.0 · source§

    fn write_char(&mut self, c: char) -> Result<(), Error>

    Writes a char into this writer, returning whether the write succeeded. Read more
    source§

    impl Eq for BytesMut

    source§

    impl Send for BytesMut

    source§

    impl Sync for BytesMut

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +whole remainder of the buffer (this allows non-continuous implementation). Read more
    source§

    fn put<T: Buf>(&mut self, src: T)
    where + Self: Sized,

    Transfer bytes into self from src and advance the cursor by the +number of bytes written. Read more
    source§

    fn put_slice(&mut self, src: &[u8])

    Transfer bytes into self from src and advance the cursor by the +number of bytes written. Read more
    source§

    fn put_bytes(&mut self, val: u8, cnt: usize)

    Put cnt bytes val into self. Read more
    source§

    fn has_remaining_mut(&self) -> bool

    Returns true if there is space in self for more bytes. Read more
    source§

    fn put_u8(&mut self, n: u8)

    Writes an unsigned 8 bit integer to self. Read more
    source§

    fn put_i8(&mut self, n: i8)

    Writes a signed 8 bit integer to self. Read more
    source§

    fn put_u16(&mut self, n: u16)

    Writes an unsigned 16 bit integer to self in big-endian byte order. Read more
    source§

    fn put_u16_le(&mut self, n: u16)

    Writes an unsigned 16 bit integer to self in little-endian byte order. Read more
    source§

    fn put_u16_ne(&mut self, n: u16)

    Writes an unsigned 16 bit integer to self in native-endian byte order. Read more
    source§

    fn put_i16(&mut self, n: i16)

    Writes a signed 16 bit integer to self in big-endian byte order. Read more
    source§

    fn put_i16_le(&mut self, n: i16)

    Writes a signed 16 bit integer to self in little-endian byte order. Read more
    source§

    fn put_i16_ne(&mut self, n: i16)

    Writes a signed 16 bit integer to self in native-endian byte order. Read more
    source§

    fn put_u32(&mut self, n: u32)

    Writes an unsigned 32 bit integer to self in big-endian byte order. Read more
    source§

    fn put_u32_le(&mut self, n: u32)

    Writes an unsigned 32 bit integer to self in little-endian byte order. Read more
    source§

    fn put_u32_ne(&mut self, n: u32)

    Writes an unsigned 32 bit integer to self in native-endian byte order. Read more
    source§

    fn put_i32(&mut self, n: i32)

    Writes a signed 32 bit integer to self in big-endian byte order. Read more
    source§

    fn put_i32_le(&mut self, n: i32)

    Writes a signed 32 bit integer to self in little-endian byte order. Read more
    source§

    fn put_i32_ne(&mut self, n: i32)

    Writes a signed 32 bit integer to self in native-endian byte order. Read more
    source§

    fn put_u64(&mut self, n: u64)

    Writes an unsigned 64 bit integer to self in the big-endian byte order. Read more
    source§

    fn put_u64_le(&mut self, n: u64)

    Writes an unsigned 64 bit integer to self in little-endian byte order. Read more
    source§

    fn put_u64_ne(&mut self, n: u64)

    Writes an unsigned 64 bit integer to self in native-endian byte order. Read more
    source§

    fn put_i64(&mut self, n: i64)

    Writes a signed 64 bit integer to self in the big-endian byte order. Read more
    source§

    fn put_i64_le(&mut self, n: i64)

    Writes a signed 64 bit integer to self in little-endian byte order. Read more
    source§

    fn put_i64_ne(&mut self, n: i64)

    Writes a signed 64 bit integer to self in native-endian byte order. Read more
    source§

    fn put_u128(&mut self, n: u128)

    Writes an unsigned 128 bit integer to self in the big-endian byte order. Read more
    source§

    fn put_u128_le(&mut self, n: u128)

    Writes an unsigned 128 bit integer to self in little-endian byte order. Read more
    source§

    fn put_u128_ne(&mut self, n: u128)

    Writes an unsigned 128 bit integer to self in native-endian byte order. Read more
    source§

    fn put_i128(&mut self, n: i128)

    Writes a signed 128 bit integer to self in the big-endian byte order. Read more
    source§

    fn put_i128_le(&mut self, n: i128)

    Writes a signed 128 bit integer to self in little-endian byte order. Read more
    source§

    fn put_i128_ne(&mut self, n: i128)

    Writes a signed 128 bit integer to self in native-endian byte order. Read more
    source§

    fn put_uint(&mut self, n: u64, nbytes: usize)

    Writes an unsigned n-byte integer to self in big-endian byte order. Read more
    source§

    fn put_uint_le(&mut self, n: u64, nbytes: usize)

    Writes an unsigned n-byte integer to self in the little-endian byte order. Read more
    source§

    fn put_uint_ne(&mut self, n: u64, nbytes: usize)

    Writes an unsigned n-byte integer to self in the native-endian byte order. Read more
    source§

    fn put_int(&mut self, n: i64, nbytes: usize)

    Writes low nbytes of a signed integer to self in big-endian byte order. Read more
    source§

    fn put_int_le(&mut self, n: i64, nbytes: usize)

    Writes low nbytes of a signed integer to self in little-endian byte order. Read more
    source§

    fn put_int_ne(&mut self, n: i64, nbytes: usize)

    Writes low nbytes of a signed integer to self in native-endian byte order. Read more
    source§

    fn put_f32(&mut self, n: f32)

    Writes an IEEE754 single-precision (4 bytes) floating point number to +self in big-endian byte order. Read more
    source§

    fn put_f32_le(&mut self, n: f32)

    Writes an IEEE754 single-precision (4 bytes) floating point number to +self in little-endian byte order. Read more
    source§

    fn put_f32_ne(&mut self, n: f32)

    Writes an IEEE754 single-precision (4 bytes) floating point number to +self in native-endian byte order. Read more
    source§

    fn put_f64(&mut self, n: f64)

    Writes an IEEE754 double-precision (8 bytes) floating point number to +self in big-endian byte order. Read more
    source§

    fn put_f64_le(&mut self, n: f64)

    Writes an IEEE754 double-precision (8 bytes) floating point number to +self in little-endian byte order. Read more
    source§

    fn put_f64_ne(&mut self, n: f64)

    Writes an IEEE754 double-precision (8 bytes) floating point number to +self in native-endian byte order. Read more
    source§

    fn limit(self, limit: usize) -> Limit<Self>
    where + Self: Sized,

    Creates an adaptor which can write at most limit bytes to self. Read more
    source§

    fn writer(self) -> Writer<Self>
    where + Self: Sized,

    Creates an adaptor which implements the Write trait for self. Read more
    source§

    fn chain_mut<U: BufMut>(self, next: U) -> Chain<Self, U>
    where + Self: Sized,

    Creates an adapter which will chain this buffer with another. Read more
    source§

    impl Clone for BytesMut

    source§

    fn clone(&self) -> BytesMut

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for BytesMut

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for BytesMut

    source§

    fn default() -> BytesMut

    Returns the “default value” for a type. Read more
    source§

    impl Deref for BytesMut

    §

    type Target = [u8]

    The resulting type after dereferencing.
    source§

    fn deref(&self) -> &[u8]

    Dereferences the value.
    source§

    impl DerefMut for BytesMut

    source§

    fn deref_mut(&mut self) -> &mut [u8]

    Mutably dereferences the value.
    source§

    impl Drop for BytesMut

    source§

    fn drop(&mut self)

    Executes the destructor for this type. Read more
    source§

    impl<'a> Extend<&'a u8> for BytesMut

    source§

    fn extend<T>(&mut self, iter: T)
    where + T: IntoIterator<Item = &'a u8>,

    Extends a collection with the contents of an iterator. Read more
    source§

    fn extend_one(&mut self, item: A)

    🔬This is a nightly-only experimental API. (extend_one)
    Extends a collection with exactly one element.
    source§

    fn extend_reserve(&mut self, additional: usize)

    🔬This is a nightly-only experimental API. (extend_one)
    Reserves capacity in a collection for the given number of additional elements. Read more
    source§

    impl Extend<Bytes> for BytesMut

    source§

    fn extend<T>(&mut self, iter: T)
    where + T: IntoIterator<Item = Bytes>,

    Extends a collection with the contents of an iterator. Read more
    source§

    fn extend_one(&mut self, item: A)

    🔬This is a nightly-only experimental API. (extend_one)
    Extends a collection with exactly one element.
    source§

    fn extend_reserve(&mut self, additional: usize)

    🔬This is a nightly-only experimental API. (extend_one)
    Reserves capacity in a collection for the given number of additional elements. Read more
    source§

    impl Extend<u8> for BytesMut

    source§

    fn extend<T>(&mut self, iter: T)
    where + T: IntoIterator<Item = u8>,

    Extends a collection with the contents of an iterator. Read more
    source§

    fn extend_one(&mut self, item: A)

    🔬This is a nightly-only experimental API. (extend_one)
    Extends a collection with exactly one element.
    source§

    fn extend_reserve(&mut self, additional: usize)

    🔬This is a nightly-only experimental API. (extend_one)
    Reserves capacity in a collection for the given number of additional elements. Read more
    source§

    impl<'a> From<&'a [u8]> for BytesMut

    source§

    fn from(src: &'a [u8]) -> BytesMut

    Converts to this type from the input type.
    source§

    impl<'a> From<&'a str> for BytesMut

    source§

    fn from(src: &'a str) -> BytesMut

    Converts to this type from the input type.
    source§

    impl From<BytesMut> for Bytes

    source§

    fn from(src: BytesMut) -> Bytes

    Converts to this type from the input type.
    source§

    impl From<BytesMut> for Vec<u8>

    source§

    fn from(bytes: BytesMut) -> Self

    Converts to this type from the input type.
    source§

    impl<'a> FromIterator<&'a u8> for BytesMut

    source§

    fn from_iter<T: IntoIterator<Item = &'a u8>>(into_iter: T) -> Self

    Creates a value from an iterator. Read more
    source§

    impl FromIterator<u8> for BytesMut

    source§

    fn from_iter<T: IntoIterator<Item = u8>>(into_iter: T) -> Self

    Creates a value from an iterator. Read more
    source§

    impl Hash for BytesMut

    source§

    fn hash<H>(&self, state: &mut H)
    where + H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · source§

    fn hash_slice<H>(data: &[Self], state: &mut H)
    where + H: Hasher, + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    source§

    impl<'a> IntoIterator for &'a BytesMut

    §

    type Item = &'a u8

    The type of the elements being iterated over.
    §

    type IntoIter = Iter<'a, u8>

    Which kind of iterator are we turning this into?
    source§

    fn into_iter(self) -> Self::IntoIter

    Creates an iterator from a value. Read more
    source§

    impl IntoIterator for BytesMut

    §

    type Item = u8

    The type of the elements being iterated over.
    §

    type IntoIter = IntoIter<BytesMut>

    Which kind of iterator are we turning this into?
    source§

    fn into_iter(self) -> Self::IntoIter

    Creates an iterator from a value. Read more
    source§

    impl LowerHex for BytesMut

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter.
    source§

    impl Ord for BytesMut

    source§

    fn cmp(&self, other: &BytesMut) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · source§

    fn max(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · source§

    fn min(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · source§

    fn clamp(self, min: Self, max: Self) -> Self
    where + Self: Sized + PartialOrd,

    Restrict a value to a certain interval. Read more
    source§

    impl<'a, T: ?Sized> PartialEq<&'a T> for BytesMut
    where + BytesMut: PartialEq<T>,

    source§

    fn eq(&self, other: &&'a T) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl PartialEq<[u8]> for BytesMut

    source§

    fn eq(&self, other: &[u8]) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl PartialEq<Bytes> for BytesMut

    source§

    fn eq(&self, other: &Bytes) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl PartialEq<BytesMut> for &[u8]

    source§

    fn eq(&self, other: &BytesMut) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl PartialEq<BytesMut> for &str

    source§

    fn eq(&self, other: &BytesMut) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl PartialEq<BytesMut> for [u8]

    source§

    fn eq(&self, other: &BytesMut) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl PartialEq<BytesMut> for Bytes

    source§

    fn eq(&self, other: &BytesMut) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl PartialEq<BytesMut> for String

    source§

    fn eq(&self, other: &BytesMut) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl PartialEq<BytesMut> for Vec<u8>

    source§

    fn eq(&self, other: &BytesMut) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl PartialEq<BytesMut> for str

    source§

    fn eq(&self, other: &BytesMut) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl PartialEq<String> for BytesMut

    source§

    fn eq(&self, other: &String) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl PartialEq<Vec<u8>> for BytesMut

    source§

    fn eq(&self, other: &Vec<u8>) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl PartialEq<str> for BytesMut

    source§

    fn eq(&self, other: &str) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl PartialEq for BytesMut

    source§

    fn eq(&self, other: &BytesMut) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl<'a, T: ?Sized> PartialOrd<&'a T> for BytesMut
    where + BytesMut: PartialOrd<T>,

    source§

    fn partial_cmp(&self, other: &&'a T) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
    source§

    impl PartialOrd<[u8]> for BytesMut

    source§

    fn partial_cmp(&self, other: &[u8]) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
    source§

    impl PartialOrd<BytesMut> for &[u8]

    source§

    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 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
    source§

    impl PartialOrd<BytesMut> for &str

    source§

    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 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
    source§

    impl PartialOrd<BytesMut> for [u8]

    source§

    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 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
    source§

    impl PartialOrd<BytesMut> for String

    source§

    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 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
    source§

    impl PartialOrd<BytesMut> for Vec<u8>

    source§

    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 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
    source§

    impl PartialOrd<BytesMut> for str

    source§

    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 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
    source§

    impl PartialOrd<String> for BytesMut

    source§

    fn partial_cmp(&self, other: &String) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
    source§

    impl PartialOrd<Vec<u8>> for BytesMut

    source§

    fn partial_cmp(&self, other: &Vec<u8>) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
    source§

    impl PartialOrd<str> for BytesMut

    source§

    fn partial_cmp(&self, other: &str) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
    source§

    impl PartialOrd for BytesMut

    source§

    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 · source§

    fn lt(&self, other: &Rhs) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · source§

    fn le(&self, other: &Rhs) -> bool

    This method tests less than or equal to (for self and other) and is used by the <= +operator. Read more
    1.0.0 · source§

    fn gt(&self, other: &Rhs) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    1.0.0 · source§

    fn ge(&self, other: &Rhs) -> bool

    This method tests greater than or equal to (for self and other) and is used by the >= +operator. Read more
    source§

    impl UpperHex for BytesMut

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter.
    source§

    impl Write for BytesMut

    source§

    fn write_str(&mut self, s: &str) -> Result

    Writes a string slice into this writer, returning whether the write +succeeded. Read more
    source§

    fn write_fmt(&mut self, args: Arguments<'_>) -> Result

    Glue for usage of the write! macro with implementors of this trait. Read more
    1.1.0 · source§

    fn write_char(&mut self, c: char) -> Result<(), Error>

    Writes a char into this writer, returning whether the write succeeded. Read more
    source§

    impl Eq for BytesMut

    source§

    impl Send for BytesMut

    source§

    impl Sync for BytesMut

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/help.html b/help.html index e8c0577e7..f0534b9c4 100644 --- a/help.html +++ b/help.html @@ -1 +1,2 @@ -Help

    Rustdoc help

    Back
    \ No newline at end of file +Help +

    Rustdoc help

    Back
    \ No newline at end of file diff --git a/ping_rs/all.html b/ping_rs/all.html index 5adc0f8ad..4cdf27f95 100644 --- a/ping_rs/all.html +++ b/ping_rs/all.html @@ -1 +1,2 @@ -List of all items in this crate

    List of all items

    Structs

    Enums

    Traits

    Functions

    Constants

    \ No newline at end of file +List of all items in this crate +

    List of all items

    Structs

    Enums

    Traits

    Functions

    Constants

    \ No newline at end of file diff --git a/ping_rs/bluebps/enum.Messages.html b/ping_rs/bluebps/enum.Messages.html index 44010884a..576895dda 100644 --- a/ping_rs/bluebps/enum.Messages.html +++ b/ping_rs/bluebps/enum.Messages.html @@ -1,35 +1,36 @@ -Messages in ping_rs::bluebps - Rust
    pub enum Messages {
    -
    Show 20 variants CellVoltageMin(CellVoltageMinStruct), - SetTemperatureMax(SetTemperatureMaxStruct), - TemperatureTimeout(TemperatureTimeoutStruct), - Reboot(RebootStruct), - ResetDefaults(ResetDefaultsStruct), +Messages in ping_rs::bluebps - Rust +
    pub enum Messages {
    +
    Show 20 variants SetTemperatureMax(SetTemperatureMaxStruct), SetCellVoltageTimeout(SetCellVoltageTimeoutStruct), - State(StateStruct), - CurrentTimeout(CurrentTimeoutStruct), - SetLpfSetting(SetLpfSettingStruct), + CellTimeout(CellTimeoutStruct), + Reboot(RebootStruct), + TemperatureMax(TemperatureMaxStruct), + SetTemperatureTimeout(SetTemperatureTimeoutStruct), + SetCurrentTimeout(SetCurrentTimeoutStruct), + EraseFlash(EraseFlashStruct), + SetCurrentMax(SetCurrentMaxStruct), + TemperatureTimeout(TemperatureTimeoutStruct), SetStreamRate(SetStreamRateStruct), SetCellVoltageMinimum(SetCellVoltageMinimumStruct), + SetLpfSetting(SetLpfSettingStruct), + CellVoltageMin(CellVoltageMinStruct), + State(StateStruct), + CurrentTimeout(CurrentTimeoutStruct), + ResetDefaults(ResetDefaultsStruct), SetLpfSampleFrequency(SetLpfSampleFrequencyStruct), - SetCurrentTimeout(SetCurrentTimeoutStruct), - CellTimeout(CellTimeoutStruct), - EraseFlash(EraseFlashStruct), - SetTemperatureTimeout(SetTemperatureTimeoutStruct), - CurrentMax(CurrentMaxStruct), - TemperatureMax(TemperatureMaxStruct), Events(EventsStruct), - SetCurrentMax(SetCurrentMaxStruct), -
    }

    Variants§

    §

    CellVoltageMin(CellVoltageMinStruct)

    §

    SetTemperatureMax(SetTemperatureMaxStruct)

    §

    TemperatureTimeout(TemperatureTimeoutStruct)

    §

    Reboot(RebootStruct)

    §

    ResetDefaults(ResetDefaultsStruct)

    §

    SetCellVoltageTimeout(SetCellVoltageTimeoutStruct)

    §

    State(StateStruct)

    §

    CurrentTimeout(CurrentTimeoutStruct)

    §

    SetLpfSetting(SetLpfSettingStruct)

    §

    SetStreamRate(SetStreamRateStruct)

    §

    SetCellVoltageMinimum(SetCellVoltageMinimumStruct)

    §

    SetLpfSampleFrequency(SetLpfSampleFrequencyStruct)

    §

    SetCurrentTimeout(SetCurrentTimeoutStruct)

    §

    CellTimeout(CellTimeoutStruct)

    §

    EraseFlash(EraseFlashStruct)

    §

    SetTemperatureTimeout(SetTemperatureTimeoutStruct)

    §

    CurrentMax(CurrentMaxStruct)

    §

    TemperatureMax(TemperatureMaxStruct)

    §

    Events(EventsStruct)

    §

    SetCurrentMax(SetCurrentMaxStruct)

    Trait Implementations§

    source§

    impl Clone for Messages

    source§

    fn clone(&self) -> Messages

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for Messages

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl DeserializeGenericMessage for Messages

    source§

    fn deserialize(message_id: u16, payload: &[u8]) -> Result<Self, &'static str>

    source§

    impl PartialEq for Messages

    source§

    fn eq(&self, other: &Messages) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl PingMessage for Messages

    source§

    impl SerializePayload for Messages

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for Messages

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    + CurrentMax(CurrentMaxStruct), +
    }

    Variants§

    §

    SetTemperatureMax(SetTemperatureMaxStruct)

    §

    SetCellVoltageTimeout(SetCellVoltageTimeoutStruct)

    §

    CellTimeout(CellTimeoutStruct)

    §

    Reboot(RebootStruct)

    §

    TemperatureMax(TemperatureMaxStruct)

    §

    SetTemperatureTimeout(SetTemperatureTimeoutStruct)

    §

    SetCurrentTimeout(SetCurrentTimeoutStruct)

    §

    EraseFlash(EraseFlashStruct)

    §

    SetCurrentMax(SetCurrentMaxStruct)

    §

    TemperatureTimeout(TemperatureTimeoutStruct)

    §

    SetStreamRate(SetStreamRateStruct)

    §

    SetCellVoltageMinimum(SetCellVoltageMinimumStruct)

    §

    SetLpfSetting(SetLpfSettingStruct)

    §

    CellVoltageMin(CellVoltageMinStruct)

    §

    State(StateStruct)

    §

    CurrentTimeout(CurrentTimeoutStruct)

    §

    ResetDefaults(ResetDefaultsStruct)

    §

    SetLpfSampleFrequency(SetLpfSampleFrequencyStruct)

    §

    Events(EventsStruct)

    §

    CurrentMax(CurrentMaxStruct)

    Trait Implementations§

    source§

    impl Clone for Messages

    source§

    fn clone(&self) -> Messages

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for Messages

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl DeserializeGenericMessage for Messages

    source§

    fn deserialize(message_id: u16, payload: &[u8]) -> Result<Self, &'static str>

    source§

    impl PartialEq for Messages

    source§

    fn eq(&self, other: &Messages) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl PingMessage for Messages

    source§

    impl SerializePayload for Messages

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for Messages

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/bluebps/index.html b/ping_rs/bluebps/index.html index ae4e81709..2080228d4 100644 --- a/ping_rs/bluebps/index.html +++ b/ping_rs/bluebps/index.html @@ -1 +1,2 @@ -ping_rs::bluebps - Rust

    Module ping_rs::bluebps

    source ·

    Structs

    Enums

    \ No newline at end of file +ping_rs::bluebps - Rust +

    Module ping_rs::bluebps

    source ·

    Structs

    Enums

    \ No newline at end of file diff --git a/ping_rs/bluebps/struct.CellTimeoutStruct.html b/ping_rs/bluebps/struct.CellTimeoutStruct.html index bacec521a..855e82a88 100644 --- a/ping_rs/bluebps/struct.CellTimeoutStruct.html +++ b/ping_rs/bluebps/struct.CellTimeoutStruct.html @@ -1,18 +1,19 @@ -CellTimeoutStruct in ping_rs::bluebps - Rust
    pub struct CellTimeoutStruct {
    -    pub timeout: u16,
    +CellTimeoutStruct in ping_rs::bluebps - Rust
    +    
    pub struct CellTimeoutStruct {
    +    pub timeout: u16,
     }
    Expand description

    Get the undervoltage timeout

    -

    Fields§

    §timeout: u16

    If an individual cell exceeds the configured limit for this duration of time, the power will be locked-out

    -

    Trait Implementations§

    source§

    impl Clone for CellTimeoutStruct

    source§

    fn clone(&self) -> CellTimeoutStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for CellTimeoutStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for CellTimeoutStruct

    source§

    fn default() -> CellTimeoutStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for CellTimeoutStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for CellTimeoutStruct

    source§

    fn eq(&self, other: &CellTimeoutStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for CellTimeoutStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for CellTimeoutStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §timeout: u16

    If an individual cell exceeds the configured limit for this duration of time, the power will be locked-out

    +

    Trait Implementations§

    source§

    impl Clone for CellTimeoutStruct

    source§

    fn clone(&self) -> CellTimeoutStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for CellTimeoutStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for CellTimeoutStruct

    source§

    fn default() -> CellTimeoutStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for CellTimeoutStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for CellTimeoutStruct

    source§

    fn eq(&self, other: &CellTimeoutStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for CellTimeoutStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for CellTimeoutStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/bluebps/struct.CellVoltageMinStruct.html b/ping_rs/bluebps/struct.CellVoltageMinStruct.html index 3a5b8eb38..4b0ab25db 100644 --- a/ping_rs/bluebps/struct.CellVoltageMinStruct.html +++ b/ping_rs/bluebps/struct.CellVoltageMinStruct.html @@ -1,18 +1,19 @@ -CellVoltageMinStruct in ping_rs::bluebps - Rust
    pub struct CellVoltageMinStruct {
    -    pub limit: u16,
    +CellVoltageMinStruct in ping_rs::bluebps - Rust
    +    
    pub struct CellVoltageMinStruct {
    +    pub limit: u16,
     }
    Expand description

    Get the minimum allowed cell voltage

    -

    Fields§

    §limit: u16

    The minimum voltage allowed for any individual cell. 0~5000: 0~5V

    -

    Trait Implementations§

    source§

    impl Clone for CellVoltageMinStruct

    source§

    fn clone(&self) -> CellVoltageMinStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for CellVoltageMinStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for CellVoltageMinStruct

    source§

    fn default() -> CellVoltageMinStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for CellVoltageMinStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for CellVoltageMinStruct

    source§

    fn eq(&self, other: &CellVoltageMinStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for CellVoltageMinStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for CellVoltageMinStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §limit: u16

    The minimum voltage allowed for any individual cell. 0~5000: 0~5V

    +

    Trait Implementations§

    source§

    impl Clone for CellVoltageMinStruct

    source§

    fn clone(&self) -> CellVoltageMinStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for CellVoltageMinStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for CellVoltageMinStruct

    source§

    fn default() -> CellVoltageMinStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for CellVoltageMinStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for CellVoltageMinStruct

    source§

    fn eq(&self, other: &CellVoltageMinStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for CellVoltageMinStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for CellVoltageMinStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/bluebps/struct.CurrentMaxStruct.html b/ping_rs/bluebps/struct.CurrentMaxStruct.html index f19198984..c4995e657 100644 --- a/ping_rs/bluebps/struct.CurrentMaxStruct.html +++ b/ping_rs/bluebps/struct.CurrentMaxStruct.html @@ -1,18 +1,19 @@ -CurrentMaxStruct in ping_rs::bluebps - Rust
    pub struct CurrentMaxStruct {
    -    pub limit: u16,
    +CurrentMaxStruct in ping_rs::bluebps - Rust
    +    
    pub struct CurrentMaxStruct {
    +    pub limit: u16,
     }
    Expand description

    get the maximum allowed battery current

    -

    Fields§

    §limit: u16

    The maximum allowed battery current 0~20000 = 0~200A

    -

    Trait Implementations§

    source§

    impl Clone for CurrentMaxStruct

    source§

    fn clone(&self) -> CurrentMaxStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for CurrentMaxStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for CurrentMaxStruct

    source§

    fn default() -> CurrentMaxStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for CurrentMaxStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for CurrentMaxStruct

    source§

    fn eq(&self, other: &CurrentMaxStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for CurrentMaxStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for CurrentMaxStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §limit: u16

    The maximum allowed battery current 0~20000 = 0~200A

    +

    Trait Implementations§

    source§

    impl Clone for CurrentMaxStruct

    source§

    fn clone(&self) -> CurrentMaxStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for CurrentMaxStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for CurrentMaxStruct

    source§

    fn default() -> CurrentMaxStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for CurrentMaxStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for CurrentMaxStruct

    source§

    fn eq(&self, other: &CurrentMaxStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for CurrentMaxStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for CurrentMaxStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/bluebps/struct.CurrentTimeoutStruct.html b/ping_rs/bluebps/struct.CurrentTimeoutStruct.html index 06fe33baa..ebd479746 100644 --- a/ping_rs/bluebps/struct.CurrentTimeoutStruct.html +++ b/ping_rs/bluebps/struct.CurrentTimeoutStruct.html @@ -1,18 +1,19 @@ -CurrentTimeoutStruct in ping_rs::bluebps - Rust
    pub struct CurrentTimeoutStruct {
    -    pub timeout: u16,
    +CurrentTimeoutStruct in ping_rs::bluebps - Rust
    +    
    pub struct CurrentTimeoutStruct {
    +    pub timeout: u16,
     }
    Expand description

    Get the over-current timeout

    -

    Fields§

    §timeout: u16

    If the battery current exceeds the configured limit for this duration of time, the power will be locked-out

    -

    Trait Implementations§

    source§

    impl Clone for CurrentTimeoutStruct

    source§

    fn clone(&self) -> CurrentTimeoutStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for CurrentTimeoutStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for CurrentTimeoutStruct

    source§

    fn default() -> CurrentTimeoutStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for CurrentTimeoutStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for CurrentTimeoutStruct

    source§

    fn eq(&self, other: &CurrentTimeoutStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for CurrentTimeoutStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for CurrentTimeoutStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §timeout: u16

    If the battery current exceeds the configured limit for this duration of time, the power will be locked-out

    +

    Trait Implementations§

    source§

    impl Clone for CurrentTimeoutStruct

    source§

    fn clone(&self) -> CurrentTimeoutStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for CurrentTimeoutStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for CurrentTimeoutStruct

    source§

    fn default() -> CurrentTimeoutStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for CurrentTimeoutStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for CurrentTimeoutStruct

    source§

    fn eq(&self, other: &CurrentTimeoutStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for CurrentTimeoutStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for CurrentTimeoutStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/bluebps/struct.EraseFlashStruct.html b/ping_rs/bluebps/struct.EraseFlashStruct.html index 649cd0ea5..2ba41dd62 100644 --- a/ping_rs/bluebps/struct.EraseFlashStruct.html +++ b/ping_rs/bluebps/struct.EraseFlashStruct.html @@ -1,15 +1,16 @@ -EraseFlashStruct in ping_rs::bluebps - Rust
    pub struct EraseFlashStruct {}
    Expand description

    Erase flash, including parameter configuration and event counters. The mcu has a limited number of write/erase cycles (1k)!

    -

    Trait Implementations§

    source§

    impl Clone for EraseFlashStruct

    source§

    fn clone(&self) -> EraseFlashStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for EraseFlashStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for EraseFlashStruct

    source§

    fn default() -> EraseFlashStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for EraseFlashStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for EraseFlashStruct

    source§

    fn eq(&self, other: &EraseFlashStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for EraseFlashStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for EraseFlashStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +EraseFlashStruct in ping_rs::bluebps - Rust +
    pub struct EraseFlashStruct {}
    Expand description

    Erase flash, including parameter configuration and event counters. The mcu has a limited number of write/erase cycles (1k)!

    +

    Trait Implementations§

    source§

    impl Clone for EraseFlashStruct

    source§

    fn clone(&self) -> EraseFlashStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for EraseFlashStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for EraseFlashStruct

    source§

    fn default() -> EraseFlashStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for EraseFlashStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for EraseFlashStruct

    source§

    fn eq(&self, other: &EraseFlashStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for EraseFlashStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for EraseFlashStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/bluebps/struct.EventsStruct.html b/ping_rs/bluebps/struct.EventsStruct.html index bed85a3b9..a1aa033b3 100644 --- a/ping_rs/bluebps/struct.EventsStruct.html +++ b/ping_rs/bluebps/struct.EventsStruct.html @@ -1,22 +1,23 @@ -EventsStruct in ping_rs::bluebps - Rust
    pub struct EventsStruct {
    -    pub voltage: u16,
    -    pub current: u16,
    -    pub temperature: u16,
    +EventsStruct in ping_rs::bluebps - Rust
    +    
    pub struct EventsStruct {
    +    pub voltage: u16,
    +    pub current: u16,
    +    pub temperature: u16,
     }
    Expand description

    A record of events causing a power lock-out. These numbers are non-volatile and reset only with the erase_flash control message.

    -

    Fields§

    §voltage: u16

    The number of under-voltage events

    -
    §current: u16

    The number of over-current events

    -
    §temperature: u16

    The number of over-temperature events

    -

    Trait Implementations§

    source§

    impl Clone for EventsStruct

    source§

    fn clone(&self) -> EventsStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for EventsStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for EventsStruct

    source§

    fn default() -> EventsStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for EventsStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for EventsStruct

    source§

    fn eq(&self, other: &EventsStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for EventsStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for EventsStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §voltage: u16

    The number of under-voltage events

    +
    §current: u16

    The number of over-current events

    +
    §temperature: u16

    The number of over-temperature events

    +

    Trait Implementations§

    source§

    impl Clone for EventsStruct

    source§

    fn clone(&self) -> EventsStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for EventsStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for EventsStruct

    source§

    fn default() -> EventsStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for EventsStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for EventsStruct

    source§

    fn eq(&self, other: &EventsStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for EventsStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for EventsStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/bluebps/struct.PingProtocolHead.html b/ping_rs/bluebps/struct.PingProtocolHead.html index 614c2d6cb..de7fb3dd2 100644 --- a/ping_rs/bluebps/struct.PingProtocolHead.html +++ b/ping_rs/bluebps/struct.PingProtocolHead.html @@ -1,17 +1,18 @@ -PingProtocolHead in ping_rs::bluebps - Rust
    pub struct PingProtocolHead {
    -    pub source_device_id: u8,
    -    pub destiny_device_id: u8,
    -}

    Fields§

    §source_device_id: u8§destiny_device_id: u8

    Trait Implementations§

    source§

    impl Clone for PingProtocolHead

    source§

    fn clone(&self) -> PingProtocolHead

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for PingProtocolHead

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for PingProtocolHead

    source§

    fn default() -> PingProtocolHead

    Returns the “default value” for a type. Read more
    source§

    impl PartialEq for PingProtocolHead

    source§

    fn eq(&self, other: &PingProtocolHead) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl StructuralPartialEq for PingProtocolHead

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +PingProtocolHead in ping_rs::bluebps - Rust +
    pub struct PingProtocolHead {
    +    pub source_device_id: u8,
    +    pub destiny_device_id: u8,
    +}

    Fields§

    §source_device_id: u8§destiny_device_id: u8

    Trait Implementations§

    source§

    impl Clone for PingProtocolHead

    source§

    fn clone(&self) -> PingProtocolHead

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for PingProtocolHead

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for PingProtocolHead

    source§

    fn default() -> PingProtocolHead

    Returns the “default value” for a type. Read more
    source§

    impl PartialEq for PingProtocolHead

    source§

    fn eq(&self, other: &PingProtocolHead) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl StructuralPartialEq for PingProtocolHead

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/bluebps/struct.RebootStruct.html b/ping_rs/bluebps/struct.RebootStruct.html index 02217050e..33ee07366 100644 --- a/ping_rs/bluebps/struct.RebootStruct.html +++ b/ping_rs/bluebps/struct.RebootStruct.html @@ -1,18 +1,19 @@ -RebootStruct in ping_rs::bluebps - Rust
    pub struct RebootStruct {
    -    pub goto_bootloader: u8,
    +RebootStruct in ping_rs::bluebps - Rust
    +    
    pub struct RebootStruct {
    +    pub goto_bootloader: u8,
     }
    Expand description

    reboot the system

    -

    Fields§

    §goto_bootloader: u8

    0 = normal reboot, run main application after reboot 1 = hold the device in bootloader after reboot

    -

    Trait Implementations§

    source§

    impl Clone for RebootStruct

    source§

    fn clone(&self) -> RebootStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for RebootStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for RebootStruct

    source§

    fn default() -> RebootStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for RebootStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for RebootStruct

    source§

    fn eq(&self, other: &RebootStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for RebootStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for RebootStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §goto_bootloader: u8

    0 = normal reboot, run main application after reboot 1 = hold the device in bootloader after reboot

    +

    Trait Implementations§

    source§

    impl Clone for RebootStruct

    source§

    fn clone(&self) -> RebootStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for RebootStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for RebootStruct

    source§

    fn default() -> RebootStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for RebootStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for RebootStruct

    source§

    fn eq(&self, other: &RebootStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for RebootStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for RebootStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/bluebps/struct.ResetDefaultsStruct.html b/ping_rs/bluebps/struct.ResetDefaultsStruct.html index ae0b3515a..45ae3d363 100644 --- a/ping_rs/bluebps/struct.ResetDefaultsStruct.html +++ b/ping_rs/bluebps/struct.ResetDefaultsStruct.html @@ -1,15 +1,16 @@ -ResetDefaultsStruct in ping_rs::bluebps - Rust
    pub struct ResetDefaultsStruct {}
    Expand description

    Reset parameter configuration to default values.

    -

    Trait Implementations§

    source§

    impl Clone for ResetDefaultsStruct

    source§

    fn clone(&self) -> ResetDefaultsStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for ResetDefaultsStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for ResetDefaultsStruct

    source§

    fn default() -> ResetDefaultsStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for ResetDefaultsStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for ResetDefaultsStruct

    source§

    fn eq(&self, other: &ResetDefaultsStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for ResetDefaultsStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for ResetDefaultsStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +ResetDefaultsStruct in ping_rs::bluebps - Rust +
    pub struct ResetDefaultsStruct {}
    Expand description

    Reset parameter configuration to default values.

    +

    Trait Implementations§

    source§

    impl Clone for ResetDefaultsStruct

    source§

    fn clone(&self) -> ResetDefaultsStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for ResetDefaultsStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for ResetDefaultsStruct

    source§

    fn default() -> ResetDefaultsStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for ResetDefaultsStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for ResetDefaultsStruct

    source§

    fn eq(&self, other: &ResetDefaultsStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for ResetDefaultsStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for ResetDefaultsStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/bluebps/struct.SetCellVoltageMinimumStruct.html b/ping_rs/bluebps/struct.SetCellVoltageMinimumStruct.html index af5194616..ade7ebb0f 100644 --- a/ping_rs/bluebps/struct.SetCellVoltageMinimumStruct.html +++ b/ping_rs/bluebps/struct.SetCellVoltageMinimumStruct.html @@ -1,18 +1,19 @@ -SetCellVoltageMinimumStruct in ping_rs::bluebps - Rust
    pub struct SetCellVoltageMinimumStruct {
    -    pub limit: u16,
    +SetCellVoltageMinimumStruct in ping_rs::bluebps - Rust
    +    
    pub struct SetCellVoltageMinimumStruct {
    +    pub limit: u16,
     }
    Expand description

    Set the minimum allowed cell voltage

    -

    Fields§

    §limit: u16

    The minimum voltage allowed for any individual cell. 0~5000: 0~5V

    -

    Trait Implementations§

    source§

    impl Clone for SetCellVoltageMinimumStruct

    source§

    fn clone(&self) -> SetCellVoltageMinimumStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetCellVoltageMinimumStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetCellVoltageMinimumStruct

    source§

    fn default() -> SetCellVoltageMinimumStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetCellVoltageMinimumStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetCellVoltageMinimumStruct

    source§

    fn eq(&self, other: &SetCellVoltageMinimumStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetCellVoltageMinimumStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetCellVoltageMinimumStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §limit: u16

    The minimum voltage allowed for any individual cell. 0~5000: 0~5V

    +

    Trait Implementations§

    source§

    impl Clone for SetCellVoltageMinimumStruct

    source§

    fn clone(&self) -> SetCellVoltageMinimumStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetCellVoltageMinimumStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetCellVoltageMinimumStruct

    source§

    fn default() -> SetCellVoltageMinimumStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetCellVoltageMinimumStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetCellVoltageMinimumStruct

    source§

    fn eq(&self, other: &SetCellVoltageMinimumStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetCellVoltageMinimumStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetCellVoltageMinimumStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/bluebps/struct.SetCellVoltageTimeoutStruct.html b/ping_rs/bluebps/struct.SetCellVoltageTimeoutStruct.html index 7b4de0832..1b1c3bfdf 100644 --- a/ping_rs/bluebps/struct.SetCellVoltageTimeoutStruct.html +++ b/ping_rs/bluebps/struct.SetCellVoltageTimeoutStruct.html @@ -1,18 +1,19 @@ -SetCellVoltageTimeoutStruct in ping_rs::bluebps - Rust
    pub struct SetCellVoltageTimeoutStruct {
    -    pub timeout: u16,
    +SetCellVoltageTimeoutStruct in ping_rs::bluebps - Rust
    +    
    pub struct SetCellVoltageTimeoutStruct {
    +    pub timeout: u16,
     }
    Expand description

    Set the under-voltage timeout

    -

    Fields§

    §timeout: u16

    If an individual cell exceeds the configured limit for this duration of time, the power will be locked-out

    -

    Trait Implementations§

    source§

    impl Clone for SetCellVoltageTimeoutStruct

    source§

    fn clone(&self) -> SetCellVoltageTimeoutStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetCellVoltageTimeoutStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetCellVoltageTimeoutStruct

    source§

    fn default() -> SetCellVoltageTimeoutStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetCellVoltageTimeoutStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetCellVoltageTimeoutStruct

    source§

    fn eq(&self, other: &SetCellVoltageTimeoutStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetCellVoltageTimeoutStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetCellVoltageTimeoutStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §timeout: u16

    If an individual cell exceeds the configured limit for this duration of time, the power will be locked-out

    +

    Trait Implementations§

    source§

    impl Clone for SetCellVoltageTimeoutStruct

    source§

    fn clone(&self) -> SetCellVoltageTimeoutStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetCellVoltageTimeoutStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetCellVoltageTimeoutStruct

    source§

    fn default() -> SetCellVoltageTimeoutStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetCellVoltageTimeoutStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetCellVoltageTimeoutStruct

    source§

    fn eq(&self, other: &SetCellVoltageTimeoutStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetCellVoltageTimeoutStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetCellVoltageTimeoutStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/bluebps/struct.SetCurrentMaxStruct.html b/ping_rs/bluebps/struct.SetCurrentMaxStruct.html index 5f9787777..85e5f67f1 100644 --- a/ping_rs/bluebps/struct.SetCurrentMaxStruct.html +++ b/ping_rs/bluebps/struct.SetCurrentMaxStruct.html @@ -1,18 +1,19 @@ -SetCurrentMaxStruct in ping_rs::bluebps - Rust
    pub struct SetCurrentMaxStruct {
    -    pub limit: u16,
    +SetCurrentMaxStruct in ping_rs::bluebps - Rust
    +    
    pub struct SetCurrentMaxStruct {
    +    pub limit: u16,
     }
    Expand description

    Set the maximum allowed battery current

    -

    Fields§

    §limit: u16

    The maximum allowed battery current 0~20000 = 0~200A

    -

    Trait Implementations§

    source§

    impl Clone for SetCurrentMaxStruct

    source§

    fn clone(&self) -> SetCurrentMaxStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetCurrentMaxStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetCurrentMaxStruct

    source§

    fn default() -> SetCurrentMaxStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetCurrentMaxStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetCurrentMaxStruct

    source§

    fn eq(&self, other: &SetCurrentMaxStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetCurrentMaxStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetCurrentMaxStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §limit: u16

    The maximum allowed battery current 0~20000 = 0~200A

    +

    Trait Implementations§

    source§

    impl Clone for SetCurrentMaxStruct

    source§

    fn clone(&self) -> SetCurrentMaxStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetCurrentMaxStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetCurrentMaxStruct

    source§

    fn default() -> SetCurrentMaxStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetCurrentMaxStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetCurrentMaxStruct

    source§

    fn eq(&self, other: &SetCurrentMaxStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetCurrentMaxStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetCurrentMaxStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/bluebps/struct.SetCurrentTimeoutStruct.html b/ping_rs/bluebps/struct.SetCurrentTimeoutStruct.html index 4617d73c9..3e3c49cd2 100644 --- a/ping_rs/bluebps/struct.SetCurrentTimeoutStruct.html +++ b/ping_rs/bluebps/struct.SetCurrentTimeoutStruct.html @@ -1,18 +1,19 @@ -SetCurrentTimeoutStruct in ping_rs::bluebps - Rust
    pub struct SetCurrentTimeoutStruct {
    -    pub timeout: u16,
    +SetCurrentTimeoutStruct in ping_rs::bluebps - Rust
    +    
    pub struct SetCurrentTimeoutStruct {
    +    pub timeout: u16,
     }
    Expand description

    Set the over-current timeout

    -

    Fields§

    §timeout: u16

    If the battery current exceeds the configured limit for this duration of time, the power will be locked-out

    -

    Trait Implementations§

    source§

    impl Clone for SetCurrentTimeoutStruct

    source§

    fn clone(&self) -> SetCurrentTimeoutStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetCurrentTimeoutStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetCurrentTimeoutStruct

    source§

    fn default() -> SetCurrentTimeoutStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetCurrentTimeoutStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetCurrentTimeoutStruct

    source§

    fn eq(&self, other: &SetCurrentTimeoutStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetCurrentTimeoutStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetCurrentTimeoutStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §timeout: u16

    If the battery current exceeds the configured limit for this duration of time, the power will be locked-out

    +

    Trait Implementations§

    source§

    impl Clone for SetCurrentTimeoutStruct

    source§

    fn clone(&self) -> SetCurrentTimeoutStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetCurrentTimeoutStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetCurrentTimeoutStruct

    source§

    fn default() -> SetCurrentTimeoutStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetCurrentTimeoutStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetCurrentTimeoutStruct

    source§

    fn eq(&self, other: &SetCurrentTimeoutStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetCurrentTimeoutStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetCurrentTimeoutStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/bluebps/struct.SetLpfSampleFrequencyStruct.html b/ping_rs/bluebps/struct.SetLpfSampleFrequencyStruct.html index 07a61b558..02afd8043 100644 --- a/ping_rs/bluebps/struct.SetLpfSampleFrequencyStruct.html +++ b/ping_rs/bluebps/struct.SetLpfSampleFrequencyStruct.html @@ -1,18 +1,19 @@ -SetLpfSampleFrequencyStruct in ping_rs::bluebps - Rust
    pub struct SetLpfSampleFrequencyStruct {
    -    pub sample_frequency: u32,
    +SetLpfSampleFrequencyStruct in ping_rs::bluebps - Rust
    +    
    pub struct SetLpfSampleFrequencyStruct {
    +    pub sample_frequency: u32,
     }
    Expand description

    the frequency to take adc samples and run the filter.

    -

    Fields§

    §sample_frequency: u32

    sample frequency in Hz. 1~100000

    -

    Trait Implementations§

    source§

    impl Clone for SetLpfSampleFrequencyStruct

    source§

    fn clone(&self) -> SetLpfSampleFrequencyStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetLpfSampleFrequencyStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetLpfSampleFrequencyStruct

    source§

    fn default() -> SetLpfSampleFrequencyStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetLpfSampleFrequencyStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetLpfSampleFrequencyStruct

    source§

    fn eq(&self, other: &SetLpfSampleFrequencyStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetLpfSampleFrequencyStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetLpfSampleFrequencyStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §sample_frequency: u32

    sample frequency in Hz. 1~100000

    +

    Trait Implementations§

    source§

    impl Clone for SetLpfSampleFrequencyStruct

    source§

    fn clone(&self) -> SetLpfSampleFrequencyStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetLpfSampleFrequencyStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetLpfSampleFrequencyStruct

    source§

    fn default() -> SetLpfSampleFrequencyStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetLpfSampleFrequencyStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetLpfSampleFrequencyStruct

    source§

    fn eq(&self, other: &SetLpfSampleFrequencyStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetLpfSampleFrequencyStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetLpfSampleFrequencyStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/bluebps/struct.SetLpfSettingStruct.html b/ping_rs/bluebps/struct.SetLpfSettingStruct.html index 92f7a78ef..e414e5faa 100644 --- a/ping_rs/bluebps/struct.SetLpfSettingStruct.html +++ b/ping_rs/bluebps/struct.SetLpfSettingStruct.html @@ -1,18 +1,19 @@ -SetLpfSettingStruct in ping_rs::bluebps - Rust
    pub struct SetLpfSettingStruct {
    -    pub setting: u16,
    +SetLpfSettingStruct in ping_rs::bluebps - Rust
    +    
    pub struct SetLpfSettingStruct {
    +    pub setting: u16,
     }
    Expand description

    Low pass filter setting. This value represents x in the equation value = value * x + sample * (1-x). 0.0 = no filtering, 0.99 = heavy filtering.

    -

    Fields§

    §setting: u16

    0~999: x = 0~0.999

    -

    Trait Implementations§

    source§

    impl Clone for SetLpfSettingStruct

    source§

    fn clone(&self) -> SetLpfSettingStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetLpfSettingStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetLpfSettingStruct

    source§

    fn default() -> SetLpfSettingStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetLpfSettingStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetLpfSettingStruct

    source§

    fn eq(&self, other: &SetLpfSettingStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetLpfSettingStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetLpfSettingStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §setting: u16

    0~999: x = 0~0.999

    +

    Trait Implementations§

    source§

    impl Clone for SetLpfSettingStruct

    source§

    fn clone(&self) -> SetLpfSettingStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetLpfSettingStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetLpfSettingStruct

    source§

    fn default() -> SetLpfSettingStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetLpfSettingStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetLpfSettingStruct

    source§

    fn eq(&self, other: &SetLpfSettingStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetLpfSettingStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetLpfSettingStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/bluebps/struct.SetStreamRateStruct.html b/ping_rs/bluebps/struct.SetStreamRateStruct.html index d2655f962..7f14f39d9 100644 --- a/ping_rs/bluebps/struct.SetStreamRateStruct.html +++ b/ping_rs/bluebps/struct.SetStreamRateStruct.html @@ -1,18 +1,19 @@ -SetStreamRateStruct in ping_rs::bluebps - Rust
    pub struct SetStreamRateStruct {
    -    pub rate: u32,
    +SetStreamRateStruct in ping_rs::bluebps - Rust
    +    
    pub struct SetStreamRateStruct {
    +    pub rate: u32,
     }
    Expand description

    Set the frequency to automatically output state messages.

    -

    Fields§

    §rate: u32

    Rate to stream state messages. 0~100000Hz

    -

    Trait Implementations§

    source§

    impl Clone for SetStreamRateStruct

    source§

    fn clone(&self) -> SetStreamRateStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetStreamRateStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetStreamRateStruct

    source§

    fn default() -> SetStreamRateStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetStreamRateStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetStreamRateStruct

    source§

    fn eq(&self, other: &SetStreamRateStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetStreamRateStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetStreamRateStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §rate: u32

    Rate to stream state messages. 0~100000Hz

    +

    Trait Implementations§

    source§

    impl Clone for SetStreamRateStruct

    source§

    fn clone(&self) -> SetStreamRateStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetStreamRateStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetStreamRateStruct

    source§

    fn default() -> SetStreamRateStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetStreamRateStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetStreamRateStruct

    source§

    fn eq(&self, other: &SetStreamRateStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetStreamRateStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetStreamRateStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/bluebps/struct.SetTemperatureMaxStruct.html b/ping_rs/bluebps/struct.SetTemperatureMaxStruct.html index 3490574d9..7b6b9917d 100644 --- a/ping_rs/bluebps/struct.SetTemperatureMaxStruct.html +++ b/ping_rs/bluebps/struct.SetTemperatureMaxStruct.html @@ -1,18 +1,19 @@ -SetTemperatureMaxStruct in ping_rs::bluebps - Rust
    pub struct SetTemperatureMaxStruct {
    -    pub limit: u16,
    +SetTemperatureMaxStruct in ping_rs::bluebps - Rust
    +    
    pub struct SetTemperatureMaxStruct {
    +    pub limit: u16,
     }
    Expand description

    Set the maximum allowed battery temperature

    -

    Fields§

    §limit: u16

    The maximum temperature allowed at the thermistor probe installed on the battery. 0~5000: 0~5V

    -

    Trait Implementations§

    source§

    impl Clone for SetTemperatureMaxStruct

    source§

    fn clone(&self) -> SetTemperatureMaxStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetTemperatureMaxStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetTemperatureMaxStruct

    source§

    fn default() -> SetTemperatureMaxStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetTemperatureMaxStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetTemperatureMaxStruct

    source§

    fn eq(&self, other: &SetTemperatureMaxStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetTemperatureMaxStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetTemperatureMaxStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §limit: u16

    The maximum temperature allowed at the thermistor probe installed on the battery. 0~5000: 0~5V

    +

    Trait Implementations§

    source§

    impl Clone for SetTemperatureMaxStruct

    source§

    fn clone(&self) -> SetTemperatureMaxStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetTemperatureMaxStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetTemperatureMaxStruct

    source§

    fn default() -> SetTemperatureMaxStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetTemperatureMaxStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetTemperatureMaxStruct

    source§

    fn eq(&self, other: &SetTemperatureMaxStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetTemperatureMaxStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetTemperatureMaxStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/bluebps/struct.SetTemperatureTimeoutStruct.html b/ping_rs/bluebps/struct.SetTemperatureTimeoutStruct.html index 7e57416f2..c27b780df 100644 --- a/ping_rs/bluebps/struct.SetTemperatureTimeoutStruct.html +++ b/ping_rs/bluebps/struct.SetTemperatureTimeoutStruct.html @@ -1,18 +1,19 @@ -SetTemperatureTimeoutStruct in ping_rs::bluebps - Rust
    pub struct SetTemperatureTimeoutStruct {
    -    pub timeout: u16,
    +SetTemperatureTimeoutStruct in ping_rs::bluebps - Rust
    +    
    pub struct SetTemperatureTimeoutStruct {
    +    pub timeout: u16,
     }
    Expand description

    Set the over-temperature timeout

    -

    Fields§

    §timeout: u16

    If the battery temperature exceeds the configured limit for this duration of time, the power will be locked-out

    -

    Trait Implementations§

    source§

    impl Clone for SetTemperatureTimeoutStruct

    source§

    fn clone(&self) -> SetTemperatureTimeoutStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetTemperatureTimeoutStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetTemperatureTimeoutStruct

    source§

    fn default() -> SetTemperatureTimeoutStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetTemperatureTimeoutStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetTemperatureTimeoutStruct

    source§

    fn eq(&self, other: &SetTemperatureTimeoutStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetTemperatureTimeoutStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetTemperatureTimeoutStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §timeout: u16

    If the battery temperature exceeds the configured limit for this duration of time, the power will be locked-out

    +

    Trait Implementations§

    source§

    impl Clone for SetTemperatureTimeoutStruct

    source§

    fn clone(&self) -> SetTemperatureTimeoutStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetTemperatureTimeoutStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetTemperatureTimeoutStruct

    source§

    fn default() -> SetTemperatureTimeoutStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetTemperatureTimeoutStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetTemperatureTimeoutStruct

    source§

    fn eq(&self, other: &SetTemperatureTimeoutStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetTemperatureTimeoutStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetTemperatureTimeoutStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/bluebps/struct.StateStruct.html b/ping_rs/bluebps/struct.StateStruct.html index ba0492f1a..03319c58d 100644 --- a/ping_rs/bluebps/struct.StateStruct.html +++ b/ping_rs/bluebps/struct.StateStruct.html @@ -1,29 +1,30 @@ -StateStruct in ping_rs::bluebps - Rust
    pub struct StateStruct {
    -    pub battery_voltage: u16,
    -    pub battery_current: u16,
    -    pub battery_temperature: u16,
    -    pub cpu_temperature: u16,
    -    pub flags: u8,
    -    pub cell_voltages_length: u8,
    -    pub cell_voltages: Vec<u16>,
    +StateStruct in ping_rs::bluebps - Rust
    +    
    pub struct StateStruct {
    +    pub battery_voltage: u16,
    +    pub battery_current: u16,
    +    pub battery_temperature: u16,
    +    pub cpu_temperature: u16,
    +    pub flags: u8,
    +    pub cell_voltages_length: u8,
    +    pub cell_voltages: Vec<u16>,
     }
    Expand description

    Get the current state of the device

    -

    Fields§

    §battery_voltage: u16

    The main battery voltage

    -
    §battery_current: u16

    The current measurement

    -
    §battery_temperature: u16

    The battery temperature

    -
    §cpu_temperature: u16

    The cpu temperature

    -
    §flags: u8

    flags indicating if any of the configured limits are currently exceeded

    -
    §cell_voltages_length: u8

    Array containing cell voltages

    -
    §cell_voltages: Vec<u16>

    Trait Implementations§

    source§

    impl Clone for StateStruct

    source§

    fn clone(&self) -> StateStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for StateStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for StateStruct

    source§

    fn default() -> StateStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for StateStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for StateStruct

    source§

    fn eq(&self, other: &StateStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for StateStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for StateStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §battery_voltage: u16

    The main battery voltage

    +
    §battery_current: u16

    The current measurement

    +
    §battery_temperature: u16

    The battery temperature

    +
    §cpu_temperature: u16

    The cpu temperature

    +
    §flags: u8

    flags indicating if any of the configured limits are currently exceeded

    +
    §cell_voltages_length: u8

    Array containing cell voltages

    +
    §cell_voltages: Vec<u16>

    Trait Implementations§

    source§

    impl Clone for StateStruct

    source§

    fn clone(&self) -> StateStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for StateStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for StateStruct

    source§

    fn default() -> StateStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for StateStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for StateStruct

    source§

    fn eq(&self, other: &StateStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for StateStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for StateStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/bluebps/struct.TemperatureMaxStruct.html b/ping_rs/bluebps/struct.TemperatureMaxStruct.html index 1706867b9..fe4ad886d 100644 --- a/ping_rs/bluebps/struct.TemperatureMaxStruct.html +++ b/ping_rs/bluebps/struct.TemperatureMaxStruct.html @@ -1,18 +1,19 @@ -TemperatureMaxStruct in ping_rs::bluebps - Rust
    pub struct TemperatureMaxStruct {
    -    pub limit: u16,
    +TemperatureMaxStruct in ping_rs::bluebps - Rust
    +    
    pub struct TemperatureMaxStruct {
    +    pub limit: u16,
     }
    Expand description

    Get the maximum allowed battery temperature

    -

    Fields§

    §limit: u16

    The minimum voltage allowed for any individual cell. 0~5000: 0~5V

    -

    Trait Implementations§

    source§

    impl Clone for TemperatureMaxStruct

    source§

    fn clone(&self) -> TemperatureMaxStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for TemperatureMaxStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for TemperatureMaxStruct

    source§

    fn default() -> TemperatureMaxStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for TemperatureMaxStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for TemperatureMaxStruct

    source§

    fn eq(&self, other: &TemperatureMaxStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for TemperatureMaxStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for TemperatureMaxStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §limit: u16

    The minimum voltage allowed for any individual cell. 0~5000: 0~5V

    +

    Trait Implementations§

    source§

    impl Clone for TemperatureMaxStruct

    source§

    fn clone(&self) -> TemperatureMaxStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for TemperatureMaxStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for TemperatureMaxStruct

    source§

    fn default() -> TemperatureMaxStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for TemperatureMaxStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for TemperatureMaxStruct

    source§

    fn eq(&self, other: &TemperatureMaxStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for TemperatureMaxStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for TemperatureMaxStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/bluebps/struct.TemperatureTimeoutStruct.html b/ping_rs/bluebps/struct.TemperatureTimeoutStruct.html index c64aaed02..760ad27f3 100644 --- a/ping_rs/bluebps/struct.TemperatureTimeoutStruct.html +++ b/ping_rs/bluebps/struct.TemperatureTimeoutStruct.html @@ -1,18 +1,19 @@ -TemperatureTimeoutStruct in ping_rs::bluebps - Rust
    pub struct TemperatureTimeoutStruct {
    -    pub timeout: u16,
    +TemperatureTimeoutStruct in ping_rs::bluebps - Rust
    +    
    pub struct TemperatureTimeoutStruct {
    +    pub timeout: u16,
     }
    Expand description

    Get the over-temperature timeout

    -

    Fields§

    §timeout: u16

    If the battery temperature exceeds the configured limit for this duration of time, the power will be locked-out

    -

    Trait Implementations§

    source§

    impl Clone for TemperatureTimeoutStruct

    source§

    fn clone(&self) -> TemperatureTimeoutStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for TemperatureTimeoutStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for TemperatureTimeoutStruct

    source§

    fn default() -> TemperatureTimeoutStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for TemperatureTimeoutStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for TemperatureTimeoutStruct

    source§

    fn eq(&self, other: &TemperatureTimeoutStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for TemperatureTimeoutStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for TemperatureTimeoutStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §timeout: u16

    If the battery temperature exceeds the configured limit for this duration of time, the power will be locked-out

    +

    Trait Implementations§

    source§

    impl Clone for TemperatureTimeoutStruct

    source§

    fn clone(&self) -> TemperatureTimeoutStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for TemperatureTimeoutStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for TemperatureTimeoutStruct

    source§

    fn default() -> TemperatureTimeoutStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for TemperatureTimeoutStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for TemperatureTimeoutStruct

    source§

    fn eq(&self, other: &TemperatureTimeoutStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for TemperatureTimeoutStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for TemperatureTimeoutStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/common/enum.Messages.html b/ping_rs/common/enum.Messages.html index b0aabd9b8..f9ae7bb91 100644 --- a/ping_rs/common/enum.Messages.html +++ b/ping_rs/common/enum.Messages.html @@ -1,22 +1,23 @@ -Messages in ping_rs::common - Rust

    Enum ping_rs::common::Messages

    source ·
    pub enum Messages {
    +Messages in ping_rs::common - Rust
    +    

    Enum ping_rs::common::Messages

    source ·
    pub enum Messages {
         Nack(NackStruct),
         AsciiText(AsciiTextStruct),
    +    DeviceInformation(DeviceInformationStruct),
         ProtocolVersion(ProtocolVersionStruct),
    +    Ack(AckStruct),
         GeneralRequest(GeneralRequestStruct),
         SetDeviceId(SetDeviceIdStruct),
    -    Ack(AckStruct),
    -    DeviceInformation(DeviceInformationStruct),
    -}

    Variants§

    §

    Nack(NackStruct)

    §

    AsciiText(AsciiTextStruct)

    §

    ProtocolVersion(ProtocolVersionStruct)

    §

    GeneralRequest(GeneralRequestStruct)

    §

    SetDeviceId(SetDeviceIdStruct)

    §

    Ack(AckStruct)

    §

    DeviceInformation(DeviceInformationStruct)

    Trait Implementations§

    source§

    impl Clone for Messages

    source§

    fn clone(&self) -> Messages

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for Messages

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl DeserializeGenericMessage for Messages

    source§

    fn deserialize(message_id: u16, payload: &[u8]) -> Result<Self, &'static str>

    source§

    impl PartialEq for Messages

    source§

    fn eq(&self, other: &Messages) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl PingMessage for Messages

    source§

    impl SerializePayload for Messages

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for Messages

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +}

    Variants§

    §

    Nack(NackStruct)

    §

    AsciiText(AsciiTextStruct)

    §

    DeviceInformation(DeviceInformationStruct)

    §

    ProtocolVersion(ProtocolVersionStruct)

    §

    Ack(AckStruct)

    §

    GeneralRequest(GeneralRequestStruct)

    §

    SetDeviceId(SetDeviceIdStruct)

    Trait Implementations§

    source§

    impl Clone for Messages

    source§

    fn clone(&self) -> Messages

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for Messages

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl DeserializeGenericMessage for Messages

    source§

    fn deserialize(message_id: u16, payload: &[u8]) -> Result<Self, &'static str>

    source§

    impl PartialEq for Messages

    source§

    fn eq(&self, other: &Messages) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl PingMessage for Messages

    source§

    impl SerializePayload for Messages

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for Messages

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/common/index.html b/ping_rs/common/index.html index 420034871..37e50cfa1 100644 --- a/ping_rs/common/index.html +++ b/ping_rs/common/index.html @@ -1 +1,2 @@ -ping_rs::common - Rust

    Module ping_rs::common

    source ·

    Structs

    Enums

    \ No newline at end of file +ping_rs::common - Rust +

    Module ping_rs::common

    source ·

    Structs

    Enums

    \ No newline at end of file diff --git a/ping_rs/common/struct.AckStruct.html b/ping_rs/common/struct.AckStruct.html index 25397c8a6..8aa962445 100644 --- a/ping_rs/common/struct.AckStruct.html +++ b/ping_rs/common/struct.AckStruct.html @@ -1,18 +1,19 @@ -AckStruct in ping_rs::common - Rust

    Struct ping_rs::common::AckStruct

    source ·
    pub struct AckStruct {
    -    pub acked_id: u16,
    +AckStruct in ping_rs::common - Rust
    +    

    Struct ping_rs::common::AckStruct

    source ·
    pub struct AckStruct {
    +    pub acked_id: u16,
     }
    Expand description

    Acknowledged.

    -

    Fields§

    §acked_id: u16

    The message ID that is ACKnowledged.

    -

    Trait Implementations§

    source§

    impl Clone for AckStruct

    source§

    fn clone(&self) -> AckStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for AckStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for AckStruct

    source§

    fn default() -> AckStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for AckStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for AckStruct

    source§

    fn eq(&self, other: &AckStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for AckStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for AckStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §acked_id: u16

    The message ID that is ACKnowledged.

    +

    Trait Implementations§

    source§

    impl Clone for AckStruct

    source§

    fn clone(&self) -> AckStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for AckStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for AckStruct

    source§

    fn default() -> AckStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for AckStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for AckStruct

    source§

    fn eq(&self, other: &AckStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for AckStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for AckStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/common/struct.AsciiTextStruct.html b/ping_rs/common/struct.AsciiTextStruct.html index c159ac3e5..51d6e0f05 100644 --- a/ping_rs/common/struct.AsciiTextStruct.html +++ b/ping_rs/common/struct.AsciiTextStruct.html @@ -1,18 +1,19 @@ -AsciiTextStruct in ping_rs::common - Rust
    pub struct AsciiTextStruct {
    -    pub ascii_message: String,
    +AsciiTextStruct in ping_rs::common - Rust
    +    
    pub struct AsciiTextStruct {
    +    pub ascii_message: String,
     }
    Expand description

    A message for transmitting text data.

    -

    Fields§

    §ascii_message: String

    ASCII text message. (not necessarily NULL terminated)

    -

    Trait Implementations§

    source§

    impl Clone for AsciiTextStruct

    source§

    fn clone(&self) -> AsciiTextStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for AsciiTextStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for AsciiTextStruct

    source§

    fn default() -> AsciiTextStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for AsciiTextStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for AsciiTextStruct

    source§

    fn eq(&self, other: &AsciiTextStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for AsciiTextStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for AsciiTextStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §ascii_message: String

    ASCII text message. (not necessarily NULL terminated)

    +

    Trait Implementations§

    source§

    impl Clone for AsciiTextStruct

    source§

    fn clone(&self) -> AsciiTextStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for AsciiTextStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for AsciiTextStruct

    source§

    fn default() -> AsciiTextStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for AsciiTextStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for AsciiTextStruct

    source§

    fn eq(&self, other: &AsciiTextStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for AsciiTextStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for AsciiTextStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/common/struct.DeviceInformationStruct.html b/ping_rs/common/struct.DeviceInformationStruct.html index 746ca06d3..43cf37a33 100644 --- a/ping_rs/common/struct.DeviceInformationStruct.html +++ b/ping_rs/common/struct.DeviceInformationStruct.html @@ -1,28 +1,29 @@ -DeviceInformationStruct in ping_rs::common - Rust
    pub struct DeviceInformationStruct {
    -    pub device_type: u8,
    -    pub device_revision: u8,
    -    pub firmware_version_major: u8,
    -    pub firmware_version_minor: u8,
    -    pub firmware_version_patch: u8,
    -    pub reserved: u8,
    +DeviceInformationStruct in ping_rs::common - Rust
    +    
    pub struct DeviceInformationStruct {
    +    pub device_type: u8,
    +    pub device_revision: u8,
    +    pub firmware_version_major: u8,
    +    pub firmware_version_minor: u8,
    +    pub firmware_version_patch: u8,
    +    pub reserved: u8,
     }
    Expand description

    Device information

    -

    Fields§

    §device_type: u8

    Device type. 0: Unknown; 1: Ping Echosounder; 2: Ping360

    -
    §device_revision: u8

    device-specific hardware revision

    -
    §firmware_version_major: u8

    Firmware version major number.

    -
    §firmware_version_minor: u8

    Firmware version minor number.

    -
    §firmware_version_patch: u8

    Firmware version patch number.

    -
    §reserved: u8

    reserved

    -

    Trait Implementations§

    source§

    impl Clone for DeviceInformationStruct

    source§

    fn clone(&self) -> DeviceInformationStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for DeviceInformationStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for DeviceInformationStruct

    source§

    fn default() -> DeviceInformationStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for DeviceInformationStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for DeviceInformationStruct

    source§

    fn eq(&self, other: &DeviceInformationStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for DeviceInformationStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for DeviceInformationStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §device_type: u8

    Device type. 0: Unknown; 1: Ping Echosounder; 2: Ping360

    +
    §device_revision: u8

    device-specific hardware revision

    +
    §firmware_version_major: u8

    Firmware version major number.

    +
    §firmware_version_minor: u8

    Firmware version minor number.

    +
    §firmware_version_patch: u8

    Firmware version patch number.

    +
    §reserved: u8

    reserved

    +

    Trait Implementations§

    source§

    impl Clone for DeviceInformationStruct

    source§

    fn clone(&self) -> DeviceInformationStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for DeviceInformationStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for DeviceInformationStruct

    source§

    fn default() -> DeviceInformationStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for DeviceInformationStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for DeviceInformationStruct

    source§

    fn eq(&self, other: &DeviceInformationStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for DeviceInformationStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for DeviceInformationStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/common/struct.GeneralRequestStruct.html b/ping_rs/common/struct.GeneralRequestStruct.html index 184c7ad06..2b0b4af19 100644 --- a/ping_rs/common/struct.GeneralRequestStruct.html +++ b/ping_rs/common/struct.GeneralRequestStruct.html @@ -1,18 +1,19 @@ -GeneralRequestStruct in ping_rs::common - Rust
    pub struct GeneralRequestStruct {
    -    pub requested_id: u16,
    +GeneralRequestStruct in ping_rs::common - Rust
    +    
    pub struct GeneralRequestStruct {
    +    pub requested_id: u16,
     }
    Expand description

    Requests a specific message to be sent from the sonar to the host. Command timeout should be set to 50 msec.

    -

    Fields§

    §requested_id: u16

    Message ID to be requested.

    -

    Trait Implementations§

    source§

    impl Clone for GeneralRequestStruct

    source§

    fn clone(&self) -> GeneralRequestStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for GeneralRequestStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for GeneralRequestStruct

    source§

    fn default() -> GeneralRequestStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for GeneralRequestStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for GeneralRequestStruct

    source§

    fn eq(&self, other: &GeneralRequestStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for GeneralRequestStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for GeneralRequestStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §requested_id: u16

    Message ID to be requested.

    +

    Trait Implementations§

    source§

    impl Clone for GeneralRequestStruct

    source§

    fn clone(&self) -> GeneralRequestStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for GeneralRequestStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for GeneralRequestStruct

    source§

    fn default() -> GeneralRequestStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for GeneralRequestStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for GeneralRequestStruct

    source§

    fn eq(&self, other: &GeneralRequestStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for GeneralRequestStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for GeneralRequestStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/common/struct.NackStruct.html b/ping_rs/common/struct.NackStruct.html index 3efec88aa..c8ed0a47d 100644 --- a/ping_rs/common/struct.NackStruct.html +++ b/ping_rs/common/struct.NackStruct.html @@ -1,20 +1,21 @@ -NackStruct in ping_rs::common - Rust

    Struct ping_rs::common::NackStruct

    source ·
    pub struct NackStruct {
    -    pub nacked_id: u16,
    -    pub nack_message: String,
    +NackStruct in ping_rs::common - Rust
    +    

    Struct ping_rs::common::NackStruct

    source ·
    pub struct NackStruct {
    +    pub nacked_id: u16,
    +    pub nack_message: String,
     }
    Expand description

    Not acknowledged.

    -

    Fields§

    §nacked_id: u16

    The message ID that is Not ACKnowledged.

    -
    §nack_message: String

    ASCII text message indicating NACK condition. (not necessarily NULL terminated)

    -

    Trait Implementations§

    source§

    impl Clone for NackStruct

    source§

    fn clone(&self) -> NackStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for NackStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for NackStruct

    source§

    fn default() -> NackStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for NackStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for NackStruct

    source§

    fn eq(&self, other: &NackStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for NackStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for NackStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §nacked_id: u16

    The message ID that is Not ACKnowledged.

    +
    §nack_message: String

    ASCII text message indicating NACK condition. (not necessarily NULL terminated)

    +

    Trait Implementations§

    source§

    impl Clone for NackStruct

    source§

    fn clone(&self) -> NackStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for NackStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for NackStruct

    source§

    fn default() -> NackStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for NackStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for NackStruct

    source§

    fn eq(&self, other: &NackStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for NackStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for NackStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/common/struct.PingProtocolHead.html b/ping_rs/common/struct.PingProtocolHead.html index 1140c7462..ab99a7ff9 100644 --- a/ping_rs/common/struct.PingProtocolHead.html +++ b/ping_rs/common/struct.PingProtocolHead.html @@ -1,17 +1,18 @@ -PingProtocolHead in ping_rs::common - Rust
    pub struct PingProtocolHead {
    -    pub source_device_id: u8,
    -    pub destiny_device_id: u8,
    -}

    Fields§

    §source_device_id: u8§destiny_device_id: u8

    Trait Implementations§

    source§

    impl Clone for PingProtocolHead

    source§

    fn clone(&self) -> PingProtocolHead

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for PingProtocolHead

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for PingProtocolHead

    source§

    fn default() -> PingProtocolHead

    Returns the “default value” for a type. Read more
    source§

    impl PartialEq for PingProtocolHead

    source§

    fn eq(&self, other: &PingProtocolHead) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl StructuralPartialEq for PingProtocolHead

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +PingProtocolHead in ping_rs::common - Rust +
    pub struct PingProtocolHead {
    +    pub source_device_id: u8,
    +    pub destiny_device_id: u8,
    +}

    Fields§

    §source_device_id: u8§destiny_device_id: u8

    Trait Implementations§

    source§

    impl Clone for PingProtocolHead

    source§

    fn clone(&self) -> PingProtocolHead

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for PingProtocolHead

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for PingProtocolHead

    source§

    fn default() -> PingProtocolHead

    Returns the “default value” for a type. Read more
    source§

    impl PartialEq for PingProtocolHead

    source§

    fn eq(&self, other: &PingProtocolHead) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl StructuralPartialEq for PingProtocolHead

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/common/struct.ProtocolVersionStruct.html b/ping_rs/common/struct.ProtocolVersionStruct.html index 1f28f1c3a..44770a5b5 100644 --- a/ping_rs/common/struct.ProtocolVersionStruct.html +++ b/ping_rs/common/struct.ProtocolVersionStruct.html @@ -1,24 +1,25 @@ -ProtocolVersionStruct in ping_rs::common - Rust
    pub struct ProtocolVersionStruct {
    -    pub version_major: u8,
    -    pub version_minor: u8,
    -    pub version_patch: u8,
    -    pub reserved: u8,
    +ProtocolVersionStruct in ping_rs::common - Rust
    +    
    pub struct ProtocolVersionStruct {
    +    pub version_major: u8,
    +    pub version_minor: u8,
    +    pub version_patch: u8,
    +    pub reserved: u8,
     }
    Expand description

    The protocol version

    -

    Fields§

    §version_major: u8

    Protocol version major number.

    -
    §version_minor: u8

    Protocol version minor number.

    -
    §version_patch: u8

    Protocol version patch number.

    -
    §reserved: u8

    reserved

    -

    Trait Implementations§

    source§

    impl Clone for ProtocolVersionStruct

    source§

    fn clone(&self) -> ProtocolVersionStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for ProtocolVersionStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for ProtocolVersionStruct

    source§

    fn default() -> ProtocolVersionStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for ProtocolVersionStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for ProtocolVersionStruct

    source§

    fn eq(&self, other: &ProtocolVersionStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for ProtocolVersionStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for ProtocolVersionStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §version_major: u8

    Protocol version major number.

    +
    §version_minor: u8

    Protocol version minor number.

    +
    §version_patch: u8

    Protocol version patch number.

    +
    §reserved: u8

    reserved

    +

    Trait Implementations§

    source§

    impl Clone for ProtocolVersionStruct

    source§

    fn clone(&self) -> ProtocolVersionStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for ProtocolVersionStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for ProtocolVersionStruct

    source§

    fn default() -> ProtocolVersionStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for ProtocolVersionStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for ProtocolVersionStruct

    source§

    fn eq(&self, other: &ProtocolVersionStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for ProtocolVersionStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for ProtocolVersionStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/common/struct.SetDeviceIdStruct.html b/ping_rs/common/struct.SetDeviceIdStruct.html index b3c56d2d9..c7b37ca65 100644 --- a/ping_rs/common/struct.SetDeviceIdStruct.html +++ b/ping_rs/common/struct.SetDeviceIdStruct.html @@ -1,18 +1,19 @@ -SetDeviceIdStruct in ping_rs::common - Rust
    pub struct SetDeviceIdStruct {
    -    pub device_id: u8,
    +SetDeviceIdStruct in ping_rs::common - Rust
    +    
    pub struct SetDeviceIdStruct {
    +    pub device_id: u8,
     }
    Expand description

    Set the device ID.

    -

    Fields§

    §device_id: u8

    Device ID (1-254). 0 is unknown and 255 is reserved for broadcast messages.

    -

    Trait Implementations§

    source§

    impl Clone for SetDeviceIdStruct

    source§

    fn clone(&self) -> SetDeviceIdStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetDeviceIdStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetDeviceIdStruct

    source§

    fn default() -> SetDeviceIdStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetDeviceIdStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetDeviceIdStruct

    source§

    fn eq(&self, other: &SetDeviceIdStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetDeviceIdStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetDeviceIdStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §device_id: u8

    Device ID (1-254). 0 is unknown and 255 is reserved for broadcast messages.

    +

    Trait Implementations§

    source§

    impl Clone for SetDeviceIdStruct

    source§

    fn clone(&self) -> SetDeviceIdStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetDeviceIdStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetDeviceIdStruct

    source§

    fn default() -> SetDeviceIdStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetDeviceIdStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetDeviceIdStruct

    source§

    fn eq(&self, other: &SetDeviceIdStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetDeviceIdStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetDeviceIdStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/decoder/enum.DecoderResult.html b/ping_rs/decoder/enum.DecoderResult.html index 441bb9f5b..de7962579 100644 --- a/ping_rs/decoder/enum.DecoderResult.html +++ b/ping_rs/decoder/enum.DecoderResult.html @@ -1,15 +1,16 @@ -DecoderResult in ping_rs::decoder - Rust
    pub enum DecoderResult {
    +DecoderResult in ping_rs::decoder - Rust
    +    
    pub enum DecoderResult {
         Success(ProtocolMessage),
         InProgress,
         Error(ParseError),
    -}

    Variants§

    §

    Success(ProtocolMessage)

    §

    InProgress

    §

    Error(ParseError)

    Trait Implementations§

    source§

    impl Debug for DecoderResult

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +}

    Variants§

    §

    Success(ProtocolMessage)

    §

    InProgress

    §

    Error(ParseError)

    Trait Implementations§

    source§

    impl Debug for DecoderResult

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/decoder/enum.DecoderState.html b/ping_rs/decoder/enum.DecoderState.html index 27cb44d39..7c8d52dac 100644 --- a/ping_rs/decoder/enum.DecoderState.html +++ b/ping_rs/decoder/enum.DecoderState.html @@ -1,17 +1,18 @@ -DecoderState in ping_rs::decoder - Rust
    pub enum DecoderState {
    +DecoderState in ping_rs::decoder - Rust
    +    
    pub enum DecoderState {
         AwaitingStart1,
         AwaitingStart2,
         ReadingHeader,
         ReadingPayload,
         ReadingChecksum,
    -}

    Variants§

    §

    AwaitingStart1

    §

    AwaitingStart2

    §

    ReadingHeader

    §

    ReadingPayload

    §

    ReadingChecksum

    Trait Implementations§

    source§

    impl Debug for DecoderState

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +}

    Variants§

    §

    AwaitingStart1

    §

    AwaitingStart2

    §

    ReadingHeader

    §

    ReadingPayload

    §

    ReadingChecksum

    Trait Implementations§

    source§

    impl Debug for DecoderState

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/decoder/enum.ParseError.html b/ping_rs/decoder/enum.ParseError.html index b3f8a88c1..471f18db4 100644 --- a/ping_rs/decoder/enum.ParseError.html +++ b/ping_rs/decoder/enum.ParseError.html @@ -1,15 +1,16 @@ -ParseError in ping_rs::decoder - Rust
    pub enum ParseError {
    +ParseError in ping_rs::decoder - Rust
    +    
    pub enum ParseError {
         InvalidStartByte,
         IncompleteData,
         ChecksumError,
    -}

    Variants§

    §

    InvalidStartByte

    §

    IncompleteData

    §

    ChecksumError

    Trait Implementations§

    source§

    impl Debug for ParseError

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +}

    Variants§

    §

    InvalidStartByte

    §

    IncompleteData

    §

    ChecksumError

    Trait Implementations§

    source§

    impl Debug for ParseError

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/decoder/index.html b/ping_rs/decoder/index.html index f14e11efb..7c7fcfaed 100644 --- a/ping_rs/decoder/index.html +++ b/ping_rs/decoder/index.html @@ -1 +1,2 @@ -ping_rs::decoder - Rust
    \ No newline at end of file +ping_rs::decoder - Rust +
    \ No newline at end of file diff --git a/ping_rs/decoder/struct.Decoder.html b/ping_rs/decoder/struct.Decoder.html index 161817f35..b81ea51d6 100644 --- a/ping_rs/decoder/struct.Decoder.html +++ b/ping_rs/decoder/struct.Decoder.html @@ -1,14 +1,15 @@ -Decoder in ping_rs::decoder - Rust

    Struct ping_rs::decoder::Decoder

    source ·
    pub struct Decoder {
    +Decoder in ping_rs::decoder - Rust
    +    

    Struct ping_rs::decoder::Decoder

    source ·
    pub struct Decoder {
         pub state: DecoderState,
    -    /* private fields */
    -}

    Fields§

    §state: DecoderState

    Implementations§

    source§

    impl Decoder

    source

    pub fn new() -> Self

    source

    pub fn parse_byte(&mut self, byte: u8) -> DecoderResult

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    + /* private fields */ +}

    Fields§

    §state: DecoderState

    Implementations§

    source§

    impl Decoder

    source

    pub fn new() -> Self

    source

    pub fn parse_byte(&mut self, byte: u8) -> DecoderResult

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/enum.Messages.html b/ping_rs/enum.Messages.html index a9155daf2..a7c2273e9 100644 --- a/ping_rs/enum.Messages.html +++ b/ping_rs/enum.Messages.html @@ -1,16 +1,17 @@ -Messages in ping_rs - Rust

    Enum ping_rs::Messages

    source ·
    pub enum Messages {
    -    Bluebps(Messages),
    +Messages in ping_rs - Rust
    +    

    Enum ping_rs::Messages

    source ·
    pub enum Messages {
         Ping360(Messages),
    -    Common(Messages),
         Ping1D(Messages),
    -}

    Variants§

    §

    Bluebps(Messages)

    §

    Ping360(Messages)

    §

    Common(Messages)

    §

    Ping1D(Messages)

    Trait Implementations§

    source§

    impl TryFrom<&ProtocolMessage> for Messages

    §

    type Error = String

    The type returned in the event of a conversion error.
    source§

    fn try_from(message: &ProtocolMessage) -> Result<Self, Self::Error>

    Performs the conversion.
    source§

    impl TryFrom<&Vec<u8>> for Messages

    §

    type Error = String

    The type returned in the event of a conversion error.
    source§

    fn try_from(buffer: &Vec<u8>) -> Result<Self, Self::Error>

    Performs the conversion.

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    + Common(Messages), + Bluebps(Messages), +}

    Variants§

    §

    Ping360(Messages)

    §

    Ping1D(Messages)

    §

    Common(Messages)

    §

    Bluebps(Messages)

    Trait Implementations§

    source§

    impl TryFrom<&ProtocolMessage> for Messages

    §

    type Error = String

    The type returned in the event of a conversion error.
    source§

    fn try_from(message: &ProtocolMessage) -> Result<Self, Self::Error>

    Performs the conversion.
    source§

    impl TryFrom<&Vec<u8>> for Messages

    §

    type Error = String

    The type returned in the event of a conversion error.
    source§

    fn try_from(buffer: &Vec<u8>) -> Result<Self, Self::Error>

    Performs the conversion.

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/fn.calculate_crc.html b/ping_rs/fn.calculate_crc.html index 6e9be9635..0e8e6d292 100644 --- a/ping_rs/fn.calculate_crc.html +++ b/ping_rs/fn.calculate_crc.html @@ -1 +1,2 @@ -calculate_crc in ping_rs - Rust

    Function ping_rs::calculate_crc

    source ·
    pub fn calculate_crc(pack_without_payload: &[u8]) -> u16
    \ No newline at end of file +calculate_crc in ping_rs - Rust +

    Function ping_rs::calculate_crc

    source ·
    pub fn calculate_crc(pack_without_payload: &[u8]) -> u16
    \ No newline at end of file diff --git a/ping_rs/index.html b/ping_rs/index.html index fb202ac3d..7ad875adb 100644 --- a/ping_rs/index.html +++ b/ping_rs/index.html @@ -1,2 +1,3 @@ -ping_rs - Rust
    \ No newline at end of file +ping_rs - Rust +
    \ No newline at end of file diff --git a/ping_rs/message/constant.HEADER.html b/ping_rs/message/constant.HEADER.html index ee32cdfe6..8f07ea2ad 100644 --- a/ping_rs/message/constant.HEADER.html +++ b/ping_rs/message/constant.HEADER.html @@ -1 +1,2 @@ -HEADER in ping_rs::message - Rust

    Constant ping_rs::message::HEADER

    source ·
    pub const HEADER: [u8; 2];
    \ No newline at end of file +HEADER in ping_rs::message - Rust +

    Constant ping_rs::message::HEADER

    source ·
    pub const HEADER: [u8; 2];
    \ No newline at end of file diff --git a/ping_rs/message/index.html b/ping_rs/message/index.html index 91a576ab8..d2e222ab7 100644 --- a/ping_rs/message/index.html +++ b/ping_rs/message/index.html @@ -1 +1,2 @@ -ping_rs::message - Rust
    \ No newline at end of file +ping_rs::message - Rust +
    \ No newline at end of file diff --git a/ping_rs/message/struct.ProtocolMessage.html b/ping_rs/message/struct.ProtocolMessage.html index 542d08ffe..fe8711dce 100644 --- a/ping_rs/message/struct.ProtocolMessage.html +++ b/ping_rs/message/struct.ProtocolMessage.html @@ -1,11 +1,12 @@ -ProtocolMessage in ping_rs::message - Rust
    pub struct ProtocolMessage {
    -    pub payload_length: u16,
    -    pub message_id: u16,
    -    pub src_device_id: u8,
    -    pub dst_device_id: u8,
    -    pub payload: Vec<u8>,
    -    pub checksum: u16,
    -}

    Fields§

    §payload_length: u16§message_id: u16§src_device_id: u8§dst_device_id: u8§payload: Vec<u8>§checksum: u16

    Implementations§

    source§

    impl ProtocolMessage

    source

    pub fn new() -> Self

    Message Format

    +ProtocolMessage in ping_rs::message - Rust +
    pub struct ProtocolMessage {
    +    pub payload_length: u16,
    +    pub message_id: u16,
    +    pub src_device_id: u8,
    +    pub dst_device_id: u8,
    +    pub payload: Vec<u8>,
    +    pub checksum: u16,
    +}

    Fields§

    §payload_length: u16§message_id: u16§src_device_id: u8§dst_device_id: u8§payload: Vec<u8>§checksum: u16

    Implementations§

    source§

    impl ProtocolMessage

    source

    pub fn new() -> Self

    Message Format

    Each message consists of a header, optional payload, and checksum. The binary format is specified as follows:

    @@ -17,15 +18,15 @@
    ByteTypeNameDescription
    0u8start1Start frame identifier, ASCII ‘B’
    8-nu8[]payloadThe message payload.
    (n+1)-(n+2)u16checksumThe message checksum. The checksum is calculated as the sum of all the non-checksum bytes in the message.
    -
    source

    pub fn set_message(&mut self, message: &impl PingMessage)

    source

    pub fn set_src_device_id(&mut self, src_device_id: u8)

    source

    pub fn dst_device_id(&self) -> u8

    source

    pub fn set_dst_device_id(&mut self, dst_device_id: u8)

    source

    pub fn payload(&self) -> &[u8]

    source

    pub fn checksum(&self) -> u16

    source

    pub fn update_checksum(&mut self)

    source

    pub fn calculate_crc(&self) -> u16

    source

    pub fn has_valid_crc(&self) -> bool

    source

    pub fn length(&self) -> usize

    source

    pub fn write(&self, writer: &mut dyn Write) -> Result<usize>

    source

    pub fn serialized(&self) -> Vec<u8>

    Trait Implementations§

    source§

    impl Clone for ProtocolMessage

    source§

    fn clone(&self) -> ProtocolMessage

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for ProtocolMessage

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for ProtocolMessage

    source§

    fn default() -> ProtocolMessage

    Returns the “default value” for a type. Read more
    source§

    impl TryFrom<&ProtocolMessage> for Messages

    §

    type Error = String

    The type returned in the event of a conversion error.
    source§

    fn try_from(message: &ProtocolMessage) -> Result<Self, Self::Error>

    Performs the conversion.

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +
    source

    pub fn set_message(&mut self, message: &impl PingMessage)

    source

    pub fn set_src_device_id(&mut self, src_device_id: u8)

    source

    pub fn dst_device_id(&self) -> u8

    source

    pub fn set_dst_device_id(&mut self, dst_device_id: u8)

    source

    pub fn payload(&self) -> &[u8]

    source

    pub fn checksum(&self) -> u16

    source

    pub fn update_checksum(&mut self)

    source

    pub fn calculate_crc(&self) -> u16

    source

    pub fn has_valid_crc(&self) -> bool

    source

    pub fn length(&self) -> usize

    source

    pub fn write(&self, writer: &mut dyn Write) -> Result<usize>

    source

    pub fn serialized(&self) -> Vec<u8>

    Trait Implementations§

    source§

    impl Clone for ProtocolMessage

    source§

    fn clone(&self) -> ProtocolMessage

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for ProtocolMessage

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for ProtocolMessage

    source§

    fn default() -> ProtocolMessage

    Returns the “default value” for a type. Read more
    source§

    impl TryFrom<&ProtocolMessage> for Messages

    §

    type Error = String

    The type returned in the event of a conversion error.
    source§

    fn try_from(message: &ProtocolMessage) -> Result<Self, Self::Error>

    Performs the conversion.

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/message/trait.DeserializeGenericMessage.html b/ping_rs/message/trait.DeserializeGenericMessage.html index 00dc78765..6392a8e3d 100644 --- a/ping_rs/message/trait.DeserializeGenericMessage.html +++ b/ping_rs/message/trait.DeserializeGenericMessage.html @@ -1,8 +1,9 @@ -DeserializeGenericMessage in ping_rs::message - Rust
    pub trait DeserializeGenericMessagewhere
    -    Self: Sized,{
    +DeserializeGenericMessage in ping_rs::message - Rust
    +    
    pub trait DeserializeGenericMessage
    where + Self: Sized,
    { // Required method fn deserialize( - message_id: u16, - payload: &[u8] - ) -> Result<Self, &'static str>; -}

    Required Methods§

    source

    fn deserialize(message_id: u16, payload: &[u8]) -> Result<Self, &'static str>

    Object Safety§

    This trait is not object safe.

    Implementors§

    source§

    impl DeserializeGenericMessage for ping_rs::bluebps::Messages

    source§

    impl DeserializeGenericMessage for ping_rs::common::Messages

    source§

    impl DeserializeGenericMessage for ping_rs::ping1d::Messages

    source§

    impl DeserializeGenericMessage for ping_rs::ping360::Messages

    \ No newline at end of file + message_id: u16, + payload: &[u8] + ) -> Result<Self, &'static str>; +}

    Required Methods§

    source

    fn deserialize(message_id: u16, payload: &[u8]) -> Result<Self, &'static str>

    Object Safety§

    This trait is not object safe.

    Implementors§

    source§

    impl DeserializeGenericMessage for ping_rs::bluebps::Messages

    source§

    impl DeserializeGenericMessage for ping_rs::common::Messages

    source§

    impl DeserializeGenericMessage for ping_rs::ping1d::Messages

    source§

    impl DeserializeGenericMessage for ping_rs::ping360::Messages

    \ No newline at end of file diff --git a/ping_rs/message/trait.DeserializePayload.html b/ping_rs/message/trait.DeserializePayload.html index 385cf4e7f..ecf055756 100644 --- a/ping_rs/message/trait.DeserializePayload.html +++ b/ping_rs/message/trait.DeserializePayload.html @@ -1,4 +1,5 @@ -DeserializePayload in ping_rs::message - Rust
    pub trait DeserializePayload {
    +DeserializePayload in ping_rs::message - Rust
    +    
    pub trait DeserializePayload {
         // Required method
    -    fn deserialize(payload: &[u8]) -> Self;
    -}

    Required Methods§

    source

    fn deserialize(payload: &[u8]) -> Self

    Object Safety§

    This trait is not object safe.

    Implementors§

    source§

    impl DeserializePayload for CellTimeoutStruct

    source§

    impl DeserializePayload for CellVoltageMinStruct

    source§

    impl DeserializePayload for CurrentMaxStruct

    source§

    impl DeserializePayload for CurrentTimeoutStruct

    source§

    impl DeserializePayload for EraseFlashStruct

    source§

    impl DeserializePayload for EventsStruct

    source§

    impl DeserializePayload for RebootStruct

    source§

    impl DeserializePayload for ResetDefaultsStruct

    source§

    impl DeserializePayload for SetCellVoltageMinimumStruct

    source§

    impl DeserializePayload for SetCellVoltageTimeoutStruct

    source§

    impl DeserializePayload for SetCurrentMaxStruct

    source§

    impl DeserializePayload for SetCurrentTimeoutStruct

    source§

    impl DeserializePayload for SetLpfSampleFrequencyStruct

    source§

    impl DeserializePayload for SetLpfSettingStruct

    source§

    impl DeserializePayload for SetStreamRateStruct

    source§

    impl DeserializePayload for SetTemperatureMaxStruct

    source§

    impl DeserializePayload for SetTemperatureTimeoutStruct

    source§

    impl DeserializePayload for StateStruct

    source§

    impl DeserializePayload for TemperatureMaxStruct

    source§

    impl DeserializePayload for TemperatureTimeoutStruct

    source§

    impl DeserializePayload for AckStruct

    source§

    impl DeserializePayload for AsciiTextStruct

    source§

    impl DeserializePayload for DeviceInformationStruct

    source§

    impl DeserializePayload for GeneralRequestStruct

    source§

    impl DeserializePayload for NackStruct

    source§

    impl DeserializePayload for ProtocolVersionStruct

    source§

    impl DeserializePayload for ping_rs::common::SetDeviceIdStruct

    source§

    impl DeserializePayload for ContinuousStartStruct

    source§

    impl DeserializePayload for ContinuousStopStruct

    source§

    impl DeserializePayload for ping_rs::ping1d::DeviceIdStruct

    source§

    impl DeserializePayload for DistanceSimpleStruct

    source§

    impl DeserializePayload for DistanceStruct

    source§

    impl DeserializePayload for FirmwareVersionStruct

    source§

    impl DeserializePayload for GainSettingStruct

    source§

    impl DeserializePayload for GeneralInfoStruct

    source§

    impl DeserializePayload for GotoBootloaderStruct

    source§

    impl DeserializePayload for ModeAutoStruct

    source§

    impl DeserializePayload for PcbTemperatureStruct

    source§

    impl DeserializePayload for PingEnableStruct

    source§

    impl DeserializePayload for PingIntervalStruct

    source§

    impl DeserializePayload for ProcessorTemperatureStruct

    source§

    impl DeserializePayload for ProfileStruct

    source§

    impl DeserializePayload for RangeStruct

    source§

    impl DeserializePayload for ping_rs::ping1d::SetDeviceIdStruct

    source§

    impl DeserializePayload for SetGainSettingStruct

    source§

    impl DeserializePayload for SetModeAutoStruct

    source§

    impl DeserializePayload for SetPingEnableStruct

    source§

    impl DeserializePayload for SetPingIntervalStruct

    source§

    impl DeserializePayload for SetRangeStruct

    source§

    impl DeserializePayload for SetSpeedOfSoundStruct

    source§

    impl DeserializePayload for SpeedOfSoundStruct

    source§

    impl DeserializePayload for TransmitDurationStruct

    source§

    impl DeserializePayload for Voltage5Struct

    source§

    impl DeserializePayload for AutoDeviceDataStruct

    source§

    impl DeserializePayload for AutoTransmitStruct

    source§

    impl DeserializePayload for DeviceDataStruct

    source§

    impl DeserializePayload for ping_rs::ping360::DeviceIdStruct

    source§

    impl DeserializePayload for MotorOffStruct

    source§

    impl DeserializePayload for ResetStruct

    source§

    impl DeserializePayload for TransducerStruct

    \ No newline at end of file + fn deserialize(payload: &[u8]) -> Self; +}

    Required Methods§

    source

    fn deserialize(payload: &[u8]) -> Self

    Object Safety§

    This trait is not object safe.

    Implementors§

    source§

    impl DeserializePayload for CellTimeoutStruct

    source§

    impl DeserializePayload for CellVoltageMinStruct

    source§

    impl DeserializePayload for CurrentMaxStruct

    source§

    impl DeserializePayload for CurrentTimeoutStruct

    source§

    impl DeserializePayload for EraseFlashStruct

    source§

    impl DeserializePayload for EventsStruct

    source§

    impl DeserializePayload for RebootStruct

    source§

    impl DeserializePayload for ResetDefaultsStruct

    source§

    impl DeserializePayload for SetCellVoltageMinimumStruct

    source§

    impl DeserializePayload for SetCellVoltageTimeoutStruct

    source§

    impl DeserializePayload for SetCurrentMaxStruct

    source§

    impl DeserializePayload for SetCurrentTimeoutStruct

    source§

    impl DeserializePayload for SetLpfSampleFrequencyStruct

    source§

    impl DeserializePayload for SetLpfSettingStruct

    source§

    impl DeserializePayload for SetStreamRateStruct

    source§

    impl DeserializePayload for SetTemperatureMaxStruct

    source§

    impl DeserializePayload for SetTemperatureTimeoutStruct

    source§

    impl DeserializePayload for StateStruct

    source§

    impl DeserializePayload for TemperatureMaxStruct

    source§

    impl DeserializePayload for TemperatureTimeoutStruct

    source§

    impl DeserializePayload for AckStruct

    source§

    impl DeserializePayload for AsciiTextStruct

    source§

    impl DeserializePayload for DeviceInformationStruct

    source§

    impl DeserializePayload for GeneralRequestStruct

    source§

    impl DeserializePayload for NackStruct

    source§

    impl DeserializePayload for ProtocolVersionStruct

    source§

    impl DeserializePayload for ping_rs::common::SetDeviceIdStruct

    source§

    impl DeserializePayload for ContinuousStartStruct

    source§

    impl DeserializePayload for ContinuousStopStruct

    source§

    impl DeserializePayload for ping_rs::ping1d::DeviceIdStruct

    source§

    impl DeserializePayload for DistanceSimpleStruct

    source§

    impl DeserializePayload for DistanceStruct

    source§

    impl DeserializePayload for FirmwareVersionStruct

    source§

    impl DeserializePayload for GainSettingStruct

    source§

    impl DeserializePayload for GeneralInfoStruct

    source§

    impl DeserializePayload for GotoBootloaderStruct

    source§

    impl DeserializePayload for ModeAutoStruct

    source§

    impl DeserializePayload for PcbTemperatureStruct

    source§

    impl DeserializePayload for PingEnableStruct

    source§

    impl DeserializePayload for PingIntervalStruct

    source§

    impl DeserializePayload for ProcessorTemperatureStruct

    source§

    impl DeserializePayload for ProfileStruct

    source§

    impl DeserializePayload for RangeStruct

    source§

    impl DeserializePayload for ping_rs::ping1d::SetDeviceIdStruct

    source§

    impl DeserializePayload for SetGainSettingStruct

    source§

    impl DeserializePayload for SetModeAutoStruct

    source§

    impl DeserializePayload for SetPingEnableStruct

    source§

    impl DeserializePayload for SetPingIntervalStruct

    source§

    impl DeserializePayload for SetRangeStruct

    source§

    impl DeserializePayload for SetSpeedOfSoundStruct

    source§

    impl DeserializePayload for SpeedOfSoundStruct

    source§

    impl DeserializePayload for TransmitDurationStruct

    source§

    impl DeserializePayload for Voltage5Struct

    source§

    impl DeserializePayload for AutoDeviceDataStruct

    source§

    impl DeserializePayload for AutoTransmitStruct

    source§

    impl DeserializePayload for DeviceDataStruct

    source§

    impl DeserializePayload for ping_rs::ping360::DeviceIdStruct

    source§

    impl DeserializePayload for MotorOffStruct

    source§

    impl DeserializePayload for ResetStruct

    source§

    impl DeserializePayload for TransducerStruct

    \ No newline at end of file diff --git a/ping_rs/message/trait.PingMessage.html b/ping_rs/message/trait.PingMessage.html index 224922ee2..c951dcd3e 100644 --- a/ping_rs/message/trait.PingMessage.html +++ b/ping_rs/message/trait.PingMessage.html @@ -1,7 +1,8 @@ -PingMessage in ping_rs::message - Rust
    pub trait PingMessagewhere
    -    Self: Sized + SerializePayload,{
    +PingMessage in ping_rs::message - Rust
    +    
    pub trait PingMessage
    where + Self: Sized + SerializePayload,
    { // Required methods - fn message_id(&self) -> u16; - fn message_name(&self) -> &'static str; - fn message_id_from_name(name: &str) -> Result<u16, String>; -}

    Required Methods§

    source

    fn message_id(&self) -> u16

    source

    fn message_name(&self) -> &'static str

    source

    fn message_id_from_name(name: &str) -> Result<u16, String>

    Object Safety§

    This trait is not object safe.

    Implementors§

    source§

    impl PingMessage for ping_rs::bluebps::Messages

    source§

    impl PingMessage for ping_rs::common::Messages

    source§

    impl PingMessage for ping_rs::ping1d::Messages

    source§

    impl PingMessage for ping_rs::ping360::Messages

    \ No newline at end of file + fn message_id(&self) -> u16; + fn message_name(&self) -> &'static str; + fn message_id_from_name(name: &str) -> Result<u16, String>; +}

    Required Methods§

    source

    fn message_id(&self) -> u16

    source

    fn message_name(&self) -> &'static str

    source

    fn message_id_from_name(name: &str) -> Result<u16, String>

    Object Safety§

    This trait is not object safe.

    Implementors§

    source§

    impl PingMessage for ping_rs::bluebps::Messages

    source§

    impl PingMessage for ping_rs::common::Messages

    source§

    impl PingMessage for ping_rs::ping1d::Messages

    source§

    impl PingMessage for ping_rs::ping360::Messages

    \ No newline at end of file diff --git a/ping_rs/message/trait.SerializePayload.html b/ping_rs/message/trait.SerializePayload.html index 5a7e41189..4a9afc258 100644 --- a/ping_rs/message/trait.SerializePayload.html +++ b/ping_rs/message/trait.SerializePayload.html @@ -1,4 +1,5 @@ -SerializePayload in ping_rs::message - Rust
    pub trait SerializePayload {
    +SerializePayload in ping_rs::message - Rust
    +    
    pub trait SerializePayload {
         // Required method
    -    fn serialize(&self) -> Vec<u8>;
    -}

    Required Methods§

    source

    fn serialize(&self) -> Vec<u8>

    Implementors§

    source§

    impl SerializePayload for ping_rs::bluebps::Messages

    source§

    impl SerializePayload for ping_rs::common::Messages

    source§

    impl SerializePayload for ping_rs::ping1d::Messages

    source§

    impl SerializePayload for ping_rs::ping360::Messages

    source§

    impl SerializePayload for CellTimeoutStruct

    source§

    impl SerializePayload for CellVoltageMinStruct

    source§

    impl SerializePayload for CurrentMaxStruct

    source§

    impl SerializePayload for CurrentTimeoutStruct

    source§

    impl SerializePayload for EraseFlashStruct

    source§

    impl SerializePayload for EventsStruct

    source§

    impl SerializePayload for RebootStruct

    source§

    impl SerializePayload for ResetDefaultsStruct

    source§

    impl SerializePayload for SetCellVoltageMinimumStruct

    source§

    impl SerializePayload for SetCellVoltageTimeoutStruct

    source§

    impl SerializePayload for SetCurrentMaxStruct

    source§

    impl SerializePayload for SetCurrentTimeoutStruct

    source§

    impl SerializePayload for SetLpfSampleFrequencyStruct

    source§

    impl SerializePayload for SetLpfSettingStruct

    source§

    impl SerializePayload for SetStreamRateStruct

    source§

    impl SerializePayload for SetTemperatureMaxStruct

    source§

    impl SerializePayload for SetTemperatureTimeoutStruct

    source§

    impl SerializePayload for StateStruct

    source§

    impl SerializePayload for TemperatureMaxStruct

    source§

    impl SerializePayload for TemperatureTimeoutStruct

    source§

    impl SerializePayload for AckStruct

    source§

    impl SerializePayload for AsciiTextStruct

    source§

    impl SerializePayload for DeviceInformationStruct

    source§

    impl SerializePayload for GeneralRequestStruct

    source§

    impl SerializePayload for NackStruct

    source§

    impl SerializePayload for ProtocolVersionStruct

    source§

    impl SerializePayload for ping_rs::common::SetDeviceIdStruct

    source§

    impl SerializePayload for ContinuousStartStruct

    source§

    impl SerializePayload for ContinuousStopStruct

    source§

    impl SerializePayload for ping_rs::ping1d::DeviceIdStruct

    source§

    impl SerializePayload for DistanceSimpleStruct

    source§

    impl SerializePayload for DistanceStruct

    source§

    impl SerializePayload for FirmwareVersionStruct

    source§

    impl SerializePayload for GainSettingStruct

    source§

    impl SerializePayload for GeneralInfoStruct

    source§

    impl SerializePayload for GotoBootloaderStruct

    source§

    impl SerializePayload for ModeAutoStruct

    source§

    impl SerializePayload for PcbTemperatureStruct

    source§

    impl SerializePayload for PingEnableStruct

    source§

    impl SerializePayload for PingIntervalStruct

    source§

    impl SerializePayload for ProcessorTemperatureStruct

    source§

    impl SerializePayload for ProfileStruct

    source§

    impl SerializePayload for RangeStruct

    source§

    impl SerializePayload for ping_rs::ping1d::SetDeviceIdStruct

    source§

    impl SerializePayload for SetGainSettingStruct

    source§

    impl SerializePayload for SetModeAutoStruct

    source§

    impl SerializePayload for SetPingEnableStruct

    source§

    impl SerializePayload for SetPingIntervalStruct

    source§

    impl SerializePayload for SetRangeStruct

    source§

    impl SerializePayload for SetSpeedOfSoundStruct

    source§

    impl SerializePayload for SpeedOfSoundStruct

    source§

    impl SerializePayload for TransmitDurationStruct

    source§

    impl SerializePayload for Voltage5Struct

    source§

    impl SerializePayload for AutoDeviceDataStruct

    source§

    impl SerializePayload for AutoTransmitStruct

    source§

    impl SerializePayload for DeviceDataStruct

    source§

    impl SerializePayload for ping_rs::ping360::DeviceIdStruct

    source§

    impl SerializePayload for MotorOffStruct

    source§

    impl SerializePayload for ResetStruct

    source§

    impl SerializePayload for TransducerStruct

    \ No newline at end of file + fn serialize(&self) -> Vec<u8>; +}

    Required Methods§

    source

    fn serialize(&self) -> Vec<u8>

    Implementors§

    source§

    impl SerializePayload for ping_rs::bluebps::Messages

    source§

    impl SerializePayload for ping_rs::common::Messages

    source§

    impl SerializePayload for ping_rs::ping1d::Messages

    source§

    impl SerializePayload for ping_rs::ping360::Messages

    source§

    impl SerializePayload for CellTimeoutStruct

    source§

    impl SerializePayload for CellVoltageMinStruct

    source§

    impl SerializePayload for CurrentMaxStruct

    source§

    impl SerializePayload for CurrentTimeoutStruct

    source§

    impl SerializePayload for EraseFlashStruct

    source§

    impl SerializePayload for EventsStruct

    source§

    impl SerializePayload for RebootStruct

    source§

    impl SerializePayload for ResetDefaultsStruct

    source§

    impl SerializePayload for SetCellVoltageMinimumStruct

    source§

    impl SerializePayload for SetCellVoltageTimeoutStruct

    source§

    impl SerializePayload for SetCurrentMaxStruct

    source§

    impl SerializePayload for SetCurrentTimeoutStruct

    source§

    impl SerializePayload for SetLpfSampleFrequencyStruct

    source§

    impl SerializePayload for SetLpfSettingStruct

    source§

    impl SerializePayload for SetStreamRateStruct

    source§

    impl SerializePayload for SetTemperatureMaxStruct

    source§

    impl SerializePayload for SetTemperatureTimeoutStruct

    source§

    impl SerializePayload for StateStruct

    source§

    impl SerializePayload for TemperatureMaxStruct

    source§

    impl SerializePayload for TemperatureTimeoutStruct

    source§

    impl SerializePayload for AckStruct

    source§

    impl SerializePayload for AsciiTextStruct

    source§

    impl SerializePayload for DeviceInformationStruct

    source§

    impl SerializePayload for GeneralRequestStruct

    source§

    impl SerializePayload for NackStruct

    source§

    impl SerializePayload for ProtocolVersionStruct

    source§

    impl SerializePayload for ping_rs::common::SetDeviceIdStruct

    source§

    impl SerializePayload for ContinuousStartStruct

    source§

    impl SerializePayload for ContinuousStopStruct

    source§

    impl SerializePayload for ping_rs::ping1d::DeviceIdStruct

    source§

    impl SerializePayload for DistanceSimpleStruct

    source§

    impl SerializePayload for DistanceStruct

    source§

    impl SerializePayload for FirmwareVersionStruct

    source§

    impl SerializePayload for GainSettingStruct

    source§

    impl SerializePayload for GeneralInfoStruct

    source§

    impl SerializePayload for GotoBootloaderStruct

    source§

    impl SerializePayload for ModeAutoStruct

    source§

    impl SerializePayload for PcbTemperatureStruct

    source§

    impl SerializePayload for PingEnableStruct

    source§

    impl SerializePayload for PingIntervalStruct

    source§

    impl SerializePayload for ProcessorTemperatureStruct

    source§

    impl SerializePayload for ProfileStruct

    source§

    impl SerializePayload for RangeStruct

    source§

    impl SerializePayload for ping_rs::ping1d::SetDeviceIdStruct

    source§

    impl SerializePayload for SetGainSettingStruct

    source§

    impl SerializePayload for SetModeAutoStruct

    source§

    impl SerializePayload for SetPingEnableStruct

    source§

    impl SerializePayload for SetPingIntervalStruct

    source§

    impl SerializePayload for SetRangeStruct

    source§

    impl SerializePayload for SetSpeedOfSoundStruct

    source§

    impl SerializePayload for SpeedOfSoundStruct

    source§

    impl SerializePayload for TransmitDurationStruct

    source§

    impl SerializePayload for Voltage5Struct

    source§

    impl SerializePayload for AutoDeviceDataStruct

    source§

    impl SerializePayload for AutoTransmitStruct

    source§

    impl SerializePayload for DeviceDataStruct

    source§

    impl SerializePayload for ping_rs::ping360::DeviceIdStruct

    source§

    impl SerializePayload for MotorOffStruct

    source§

    impl SerializePayload for ResetStruct

    source§

    impl SerializePayload for TransducerStruct

    \ No newline at end of file diff --git a/ping_rs/ping1d/enum.Messages.html b/ping_rs/ping1d/enum.Messages.html index 7e0675d16..680645075 100644 --- a/ping_rs/ping1d/enum.Messages.html +++ b/ping_rs/ping1d/enum.Messages.html @@ -1,41 +1,42 @@ -Messages in ping_rs::ping1d - Rust

    Enum ping_rs::ping1d::Messages

    source ·
    pub enum Messages {
    -
    Show 26 variants SetGainSetting(SetGainSettingStruct), - ContinuousStart(ContinuousStartStruct), - ProcessorTemperature(ProcessorTemperatureStruct), - FirmwareVersion(FirmwareVersionStruct), - PingEnable(PingEnableStruct), - SetPingEnable(SetPingEnableStruct), - DistanceSimple(DistanceSimpleStruct), - GeneralInfo(GeneralInfoStruct), - SetSpeedOfSound(SetSpeedOfSoundStruct), +Messages in ping_rs::ping1d - Rust +

    Enum ping_rs::ping1d::Messages

    source ·
    pub enum Messages {
    +
    Show 26 variants SetPingEnable(SetPingEnableStruct), PcbTemperature(PcbTemperatureStruct), - GotoBootloader(GotoBootloaderStruct), - ModeAuto(ModeAutoStruct), - SetDeviceId(SetDeviceIdStruct), + SpeedOfSound(SpeedOfSoundStruct), + Distance(DistanceStruct), + ProcessorTemperature(ProcessorTemperatureStruct), + Range(RangeStruct), ContinuousStop(ContinuousStopStruct), + PingInterval(PingIntervalStruct), + ContinuousStart(ContinuousStartStruct), + SetDeviceId(SetDeviceIdStruct), + GotoBootloader(GotoBootloaderStruct), + SetPingInterval(SetPingIntervalStruct), DeviceId(DeviceIdStruct), + Profile(ProfileStruct), + FirmwareVersion(FirmwareVersionStruct), + TransmitDuration(TransmitDurationStruct), SetRange(SetRangeStruct), + SetModeAuto(SetModeAutoStruct), Voltage5(Voltage5Struct), - Profile(ProfileStruct), + ModeAuto(ModeAutoStruct), + SetSpeedOfSound(SetSpeedOfSoundStruct), GainSetting(GainSettingStruct), - Range(RangeStruct), - Distance(DistanceStruct), - SpeedOfSound(SpeedOfSoundStruct), - SetModeAuto(SetModeAutoStruct), - TransmitDuration(TransmitDurationStruct), - PingInterval(PingIntervalStruct), - SetPingInterval(SetPingIntervalStruct), -
    }

    Variants§

    §

    SetGainSetting(SetGainSettingStruct)

    §

    ContinuousStart(ContinuousStartStruct)

    §

    ProcessorTemperature(ProcessorTemperatureStruct)

    §

    FirmwareVersion(FirmwareVersionStruct)

    §

    PingEnable(PingEnableStruct)

    §

    SetPingEnable(SetPingEnableStruct)

    §

    DistanceSimple(DistanceSimpleStruct)

    §

    GeneralInfo(GeneralInfoStruct)

    §

    SetSpeedOfSound(SetSpeedOfSoundStruct)

    §

    PcbTemperature(PcbTemperatureStruct)

    §

    GotoBootloader(GotoBootloaderStruct)

    §

    ModeAuto(ModeAutoStruct)

    §

    SetDeviceId(SetDeviceIdStruct)

    §

    ContinuousStop(ContinuousStopStruct)

    §

    DeviceId(DeviceIdStruct)

    §

    SetRange(SetRangeStruct)

    §

    Voltage5(Voltage5Struct)

    §

    Profile(ProfileStruct)

    §

    GainSetting(GainSettingStruct)

    §

    Range(RangeStruct)

    §

    Distance(DistanceStruct)

    §

    SpeedOfSound(SpeedOfSoundStruct)

    §

    SetModeAuto(SetModeAutoStruct)

    §

    TransmitDuration(TransmitDurationStruct)

    §

    PingInterval(PingIntervalStruct)

    §

    SetPingInterval(SetPingIntervalStruct)

    Trait Implementations§

    source§

    impl Clone for Messages

    source§

    fn clone(&self) -> Messages

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for Messages

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl DeserializeGenericMessage for Messages

    source§

    fn deserialize(message_id: u16, payload: &[u8]) -> Result<Self, &'static str>

    source§

    impl PartialEq for Messages

    source§

    fn eq(&self, other: &Messages) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl PingMessage for Messages

    source§

    impl SerializePayload for Messages

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for Messages

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    + PingEnable(PingEnableStruct), + DistanceSimple(DistanceSimpleStruct), + SetGainSetting(SetGainSettingStruct), + GeneralInfo(GeneralInfoStruct), +
    }

    Variants§

    §

    SetPingEnable(SetPingEnableStruct)

    §

    PcbTemperature(PcbTemperatureStruct)

    §

    SpeedOfSound(SpeedOfSoundStruct)

    §

    Distance(DistanceStruct)

    §

    ProcessorTemperature(ProcessorTemperatureStruct)

    §

    Range(RangeStruct)

    §

    ContinuousStop(ContinuousStopStruct)

    §

    PingInterval(PingIntervalStruct)

    §

    ContinuousStart(ContinuousStartStruct)

    §

    SetDeviceId(SetDeviceIdStruct)

    §

    GotoBootloader(GotoBootloaderStruct)

    §

    SetPingInterval(SetPingIntervalStruct)

    §

    DeviceId(DeviceIdStruct)

    §

    Profile(ProfileStruct)

    §

    FirmwareVersion(FirmwareVersionStruct)

    §

    TransmitDuration(TransmitDurationStruct)

    §

    SetRange(SetRangeStruct)

    §

    SetModeAuto(SetModeAutoStruct)

    §

    Voltage5(Voltage5Struct)

    §

    ModeAuto(ModeAutoStruct)

    §

    SetSpeedOfSound(SetSpeedOfSoundStruct)

    §

    GainSetting(GainSettingStruct)

    §

    PingEnable(PingEnableStruct)

    §

    DistanceSimple(DistanceSimpleStruct)

    §

    SetGainSetting(SetGainSettingStruct)

    §

    GeneralInfo(GeneralInfoStruct)

    Trait Implementations§

    source§

    impl Clone for Messages

    source§

    fn clone(&self) -> Messages

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for Messages

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl DeserializeGenericMessage for Messages

    source§

    fn deserialize(message_id: u16, payload: &[u8]) -> Result<Self, &'static str>

    source§

    impl PartialEq for Messages

    source§

    fn eq(&self, other: &Messages) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl PingMessage for Messages

    source§

    impl SerializePayload for Messages

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for Messages

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/index.html b/ping_rs/ping1d/index.html index 5ff42203f..c4b462c11 100644 --- a/ping_rs/ping1d/index.html +++ b/ping_rs/ping1d/index.html @@ -1 +1,2 @@ -ping_rs::ping1d - Rust

    Module ping_rs::ping1d

    source ·

    Structs

    Enums

    \ No newline at end of file +ping_rs::ping1d - Rust +

    Module ping_rs::ping1d

    source ·

    Structs

    Enums

    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.ContinuousStartStruct.html b/ping_rs/ping1d/struct.ContinuousStartStruct.html index d1e8b5c4c..15eb81e3a 100644 --- a/ping_rs/ping1d/struct.ContinuousStartStruct.html +++ b/ping_rs/ping1d/struct.ContinuousStartStruct.html @@ -1,18 +1,19 @@ -ContinuousStartStruct in ping_rs::ping1d - Rust
    pub struct ContinuousStartStruct {
    -    pub id: u16,
    +ContinuousStartStruct in ping_rs::ping1d - Rust
    +    
    pub struct ContinuousStartStruct {
    +    pub id: u16,
     }
    Expand description

    Command to initiate continuous data stream of profile messages.

    -

    Fields§

    §id: u16

    The message id to stream. 1300: profile

    -

    Trait Implementations§

    source§

    impl Clone for ContinuousStartStruct

    source§

    fn clone(&self) -> ContinuousStartStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for ContinuousStartStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for ContinuousStartStruct

    source§

    fn default() -> ContinuousStartStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for ContinuousStartStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for ContinuousStartStruct

    source§

    fn eq(&self, other: &ContinuousStartStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for ContinuousStartStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for ContinuousStartStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §id: u16

    The message id to stream. 1300: profile

    +

    Trait Implementations§

    source§

    impl Clone for ContinuousStartStruct

    source§

    fn clone(&self) -> ContinuousStartStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for ContinuousStartStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for ContinuousStartStruct

    source§

    fn default() -> ContinuousStartStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for ContinuousStartStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for ContinuousStartStruct

    source§

    fn eq(&self, other: &ContinuousStartStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for ContinuousStartStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for ContinuousStartStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.ContinuousStopStruct.html b/ping_rs/ping1d/struct.ContinuousStopStruct.html index c4b9ca2fd..91c2b3fc4 100644 --- a/ping_rs/ping1d/struct.ContinuousStopStruct.html +++ b/ping_rs/ping1d/struct.ContinuousStopStruct.html @@ -1,18 +1,19 @@ -ContinuousStopStruct in ping_rs::ping1d - Rust
    pub struct ContinuousStopStruct {
    -    pub id: u16,
    +ContinuousStopStruct in ping_rs::ping1d - Rust
    +    
    pub struct ContinuousStopStruct {
    +    pub id: u16,
     }
    Expand description

    Command to stop the continuous data stream of profile messages.

    -

    Fields§

    §id: u16

    The message id to stop streaming. 1300: profile

    -

    Trait Implementations§

    source§

    impl Clone for ContinuousStopStruct

    source§

    fn clone(&self) -> ContinuousStopStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for ContinuousStopStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for ContinuousStopStruct

    source§

    fn default() -> ContinuousStopStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for ContinuousStopStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for ContinuousStopStruct

    source§

    fn eq(&self, other: &ContinuousStopStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for ContinuousStopStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for ContinuousStopStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §id: u16

    The message id to stop streaming. 1300: profile

    +

    Trait Implementations§

    source§

    impl Clone for ContinuousStopStruct

    source§

    fn clone(&self) -> ContinuousStopStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for ContinuousStopStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for ContinuousStopStruct

    source§

    fn default() -> ContinuousStopStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for ContinuousStopStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for ContinuousStopStruct

    source§

    fn eq(&self, other: &ContinuousStopStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for ContinuousStopStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for ContinuousStopStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.DeviceIdStruct.html b/ping_rs/ping1d/struct.DeviceIdStruct.html index 4c86541e9..705c400ac 100644 --- a/ping_rs/ping1d/struct.DeviceIdStruct.html +++ b/ping_rs/ping1d/struct.DeviceIdStruct.html @@ -1,18 +1,19 @@ -DeviceIdStruct in ping_rs::ping1d - Rust
    pub struct DeviceIdStruct {
    -    pub device_id: u8,
    +DeviceIdStruct in ping_rs::ping1d - Rust
    +    
    pub struct DeviceIdStruct {
    +    pub device_id: u8,
     }
    Expand description

    The device ID.

    -

    Fields§

    §device_id: u8

    The device ID (0-254). 255 is reserved for broadcast messages.

    -

    Trait Implementations§

    source§

    impl Clone for DeviceIdStruct

    source§

    fn clone(&self) -> DeviceIdStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for DeviceIdStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for DeviceIdStruct

    source§

    fn default() -> DeviceIdStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for DeviceIdStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for DeviceIdStruct

    source§

    fn eq(&self, other: &DeviceIdStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for DeviceIdStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for DeviceIdStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §device_id: u8

    The device ID (0-254). 255 is reserved for broadcast messages.

    +

    Trait Implementations§

    source§

    impl Clone for DeviceIdStruct

    source§

    fn clone(&self) -> DeviceIdStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for DeviceIdStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for DeviceIdStruct

    source§

    fn default() -> DeviceIdStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for DeviceIdStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for DeviceIdStruct

    source§

    fn eq(&self, other: &DeviceIdStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for DeviceIdStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for DeviceIdStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.DistanceSimpleStruct.html b/ping_rs/ping1d/struct.DistanceSimpleStruct.html index 834b97e47..f2b711add 100644 --- a/ping_rs/ping1d/struct.DistanceSimpleStruct.html +++ b/ping_rs/ping1d/struct.DistanceSimpleStruct.html @@ -1,20 +1,21 @@ -DistanceSimpleStruct in ping_rs::ping1d - Rust
    pub struct DistanceSimpleStruct {
    -    pub distance: u32,
    -    pub confidence: u8,
    +DistanceSimpleStruct in ping_rs::ping1d - Rust
    +    
    pub struct DistanceSimpleStruct {
    +    pub distance: u32,
    +    pub confidence: u8,
     }
    Expand description

    The distance to target with confidence estimate.

    -

    Fields§

    §distance: u32

    Distance to the target.

    -
    §confidence: u8

    Confidence in the distance measurement.

    -

    Trait Implementations§

    source§

    impl Clone for DistanceSimpleStruct

    source§

    fn clone(&self) -> DistanceSimpleStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for DistanceSimpleStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for DistanceSimpleStruct

    source§

    fn default() -> DistanceSimpleStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for DistanceSimpleStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for DistanceSimpleStruct

    source§

    fn eq(&self, other: &DistanceSimpleStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for DistanceSimpleStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for DistanceSimpleStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §distance: u32

    Distance to the target.

    +
    §confidence: u8

    Confidence in the distance measurement.

    +

    Trait Implementations§

    source§

    impl Clone for DistanceSimpleStruct

    source§

    fn clone(&self) -> DistanceSimpleStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for DistanceSimpleStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for DistanceSimpleStruct

    source§

    fn default() -> DistanceSimpleStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for DistanceSimpleStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for DistanceSimpleStruct

    source§

    fn eq(&self, other: &DistanceSimpleStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for DistanceSimpleStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for DistanceSimpleStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.DistanceStruct.html b/ping_rs/ping1d/struct.DistanceStruct.html index 473dc67c0..9426af056 100644 --- a/ping_rs/ping1d/struct.DistanceStruct.html +++ b/ping_rs/ping1d/struct.DistanceStruct.html @@ -1,30 +1,31 @@ -DistanceStruct in ping_rs::ping1d - Rust
    pub struct DistanceStruct {
    -    pub distance: u32,
    -    pub confidence: u16,
    -    pub transmit_duration: u16,
    -    pub ping_number: u32,
    -    pub scan_start: u32,
    -    pub scan_length: u32,
    -    pub gain_setting: u32,
    +DistanceStruct in ping_rs::ping1d - Rust
    +    
    pub struct DistanceStruct {
    +    pub distance: u32,
    +    pub confidence: u16,
    +    pub transmit_duration: u16,
    +    pub ping_number: u32,
    +    pub scan_start: u32,
    +    pub scan_length: u32,
    +    pub gain_setting: u32,
     }
    Expand description

    The distance to target with confidence estimate. Relevant device parameters during the measurement are also provided.

    -

    Fields§

    §distance: u32

    The current return distance determined for the most recent acoustic measurement.

    -
    §confidence: u16

    Confidence in the most recent range measurement.

    -
    §transmit_duration: u16

    The acoustic pulse length during acoustic transmission/activation.

    -
    §ping_number: u32

    The pulse/measurement count since boot.

    -
    §scan_start: u32

    The beginning of the scan region in mm from the transducer.

    -
    §scan_length: u32

    The length of the scan region.

    -
    §gain_setting: u32

    The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, 4: 30.2, 5: 66.1, 6: 144

    -

    Trait Implementations§

    source§

    impl Clone for DistanceStruct

    source§

    fn clone(&self) -> DistanceStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for DistanceStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for DistanceStruct

    source§

    fn default() -> DistanceStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for DistanceStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for DistanceStruct

    source§

    fn eq(&self, other: &DistanceStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for DistanceStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for DistanceStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §distance: u32

    The current return distance determined for the most recent acoustic measurement.

    +
    §confidence: u16

    Confidence in the most recent range measurement.

    +
    §transmit_duration: u16

    The acoustic pulse length during acoustic transmission/activation.

    +
    §ping_number: u32

    The pulse/measurement count since boot.

    +
    §scan_start: u32

    The beginning of the scan region in mm from the transducer.

    +
    §scan_length: u32

    The length of the scan region.

    +
    §gain_setting: u32

    The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, 4: 30.2, 5: 66.1, 6: 144

    +

    Trait Implementations§

    source§

    impl Clone for DistanceStruct

    source§

    fn clone(&self) -> DistanceStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for DistanceStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for DistanceStruct

    source§

    fn default() -> DistanceStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for DistanceStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for DistanceStruct

    source§

    fn eq(&self, other: &DistanceStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for DistanceStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for DistanceStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.FirmwareVersionStruct.html b/ping_rs/ping1d/struct.FirmwareVersionStruct.html index 987877892..e7cf84e2d 100644 --- a/ping_rs/ping1d/struct.FirmwareVersionStruct.html +++ b/ping_rs/ping1d/struct.FirmwareVersionStruct.html @@ -1,24 +1,25 @@ -FirmwareVersionStruct in ping_rs::ping1d - Rust
    pub struct FirmwareVersionStruct {
    -    pub device_type: u8,
    -    pub device_model: u8,
    -    pub firmware_version_major: u16,
    -    pub firmware_version_minor: u16,
    +FirmwareVersionStruct in ping_rs::ping1d - Rust
    +    
    pub struct FirmwareVersionStruct {
    +    pub device_type: u8,
    +    pub device_model: u8,
    +    pub firmware_version_major: u16,
    +    pub firmware_version_minor: u16,
     }
    Expand description

    Device information

    -

    Fields§

    §device_type: u8

    Device type. 0: Unknown; 1: Echosounder

    -
    §device_model: u8

    Device model. 0: Unknown; 1: Ping1D

    -
    §firmware_version_major: u16

    Firmware version major number.

    -
    §firmware_version_minor: u16

    Firmware version minor number.

    -

    Trait Implementations§

    source§

    impl Clone for FirmwareVersionStruct

    source§

    fn clone(&self) -> FirmwareVersionStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for FirmwareVersionStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for FirmwareVersionStruct

    source§

    fn default() -> FirmwareVersionStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for FirmwareVersionStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for FirmwareVersionStruct

    source§

    fn eq(&self, other: &FirmwareVersionStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for FirmwareVersionStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for FirmwareVersionStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §device_type: u8

    Device type. 0: Unknown; 1: Echosounder

    +
    §device_model: u8

    Device model. 0: Unknown; 1: Ping1D

    +
    §firmware_version_major: u16

    Firmware version major number.

    +
    §firmware_version_minor: u16

    Firmware version minor number.

    +

    Trait Implementations§

    source§

    impl Clone for FirmwareVersionStruct

    source§

    fn clone(&self) -> FirmwareVersionStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for FirmwareVersionStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for FirmwareVersionStruct

    source§

    fn default() -> FirmwareVersionStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for FirmwareVersionStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for FirmwareVersionStruct

    source§

    fn eq(&self, other: &FirmwareVersionStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for FirmwareVersionStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for FirmwareVersionStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.GainSettingStruct.html b/ping_rs/ping1d/struct.GainSettingStruct.html index 823815e05..1b7cd4819 100644 --- a/ping_rs/ping1d/struct.GainSettingStruct.html +++ b/ping_rs/ping1d/struct.GainSettingStruct.html @@ -1,18 +1,19 @@ -GainSettingStruct in ping_rs::ping1d - Rust
    pub struct GainSettingStruct {
    -    pub gain_setting: u32,
    +GainSettingStruct in ping_rs::ping1d - Rust
    +    
    pub struct GainSettingStruct {
    +    pub gain_setting: u32,
     }
    Expand description

    The current gain setting.

    -

    Fields§

    §gain_setting: u32

    The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, 4: 30.2, 5: 66.1, 6: 144

    -

    Trait Implementations§

    source§

    impl Clone for GainSettingStruct

    source§

    fn clone(&self) -> GainSettingStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for GainSettingStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for GainSettingStruct

    source§

    fn default() -> GainSettingStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for GainSettingStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for GainSettingStruct

    source§

    fn eq(&self, other: &GainSettingStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for GainSettingStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for GainSettingStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §gain_setting: u32

    The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, 4: 30.2, 5: 66.1, 6: 144

    +

    Trait Implementations§

    source§

    impl Clone for GainSettingStruct

    source§

    fn clone(&self) -> GainSettingStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for GainSettingStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for GainSettingStruct

    source§

    fn default() -> GainSettingStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for GainSettingStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for GainSettingStruct

    source§

    fn eq(&self, other: &GainSettingStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for GainSettingStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for GainSettingStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.GeneralInfoStruct.html b/ping_rs/ping1d/struct.GeneralInfoStruct.html index 1cf376453..781c00e33 100644 --- a/ping_rs/ping1d/struct.GeneralInfoStruct.html +++ b/ping_rs/ping1d/struct.GeneralInfoStruct.html @@ -1,28 +1,29 @@ -GeneralInfoStruct in ping_rs::ping1d - Rust
    pub struct GeneralInfoStruct {
    -    pub firmware_version_major: u16,
    -    pub firmware_version_minor: u16,
    -    pub voltage_5: u16,
    -    pub ping_interval: u16,
    -    pub gain_setting: u8,
    -    pub mode_auto: u8,
    +GeneralInfoStruct in ping_rs::ping1d - Rust
    +    
    pub struct GeneralInfoStruct {
    +    pub firmware_version_major: u16,
    +    pub firmware_version_minor: u16,
    +    pub voltage_5: u16,
    +    pub ping_interval: u16,
    +    pub gain_setting: u8,
    +    pub mode_auto: u8,
     }
    Expand description

    General information.

    -

    Fields§

    §firmware_version_major: u16

    Firmware major version.

    -
    §firmware_version_minor: u16

    Firmware minor version.

    -
    §voltage_5: u16

    Device supply voltage.

    -
    §ping_interval: u16

    The interval between acoustic measurements.

    -
    §gain_setting: u8

    The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, 4: 30.2, 5: 66.1, 6: 144

    -
    §mode_auto: u8

    The current operating mode of the device. 0: manual mode, 1: auto mode

    -

    Trait Implementations§

    source§

    impl Clone for GeneralInfoStruct

    source§

    fn clone(&self) -> GeneralInfoStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for GeneralInfoStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for GeneralInfoStruct

    source§

    fn default() -> GeneralInfoStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for GeneralInfoStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for GeneralInfoStruct

    source§

    fn eq(&self, other: &GeneralInfoStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for GeneralInfoStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for GeneralInfoStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §firmware_version_major: u16

    Firmware major version.

    +
    §firmware_version_minor: u16

    Firmware minor version.

    +
    §voltage_5: u16

    Device supply voltage.

    +
    §ping_interval: u16

    The interval between acoustic measurements.

    +
    §gain_setting: u8

    The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, 4: 30.2, 5: 66.1, 6: 144

    +
    §mode_auto: u8

    The current operating mode of the device. 0: manual mode, 1: auto mode

    +

    Trait Implementations§

    source§

    impl Clone for GeneralInfoStruct

    source§

    fn clone(&self) -> GeneralInfoStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for GeneralInfoStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for GeneralInfoStruct

    source§

    fn default() -> GeneralInfoStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for GeneralInfoStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for GeneralInfoStruct

    source§

    fn eq(&self, other: &GeneralInfoStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for GeneralInfoStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for GeneralInfoStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.GotoBootloaderStruct.html b/ping_rs/ping1d/struct.GotoBootloaderStruct.html index effa67d85..0036ebc1a 100644 --- a/ping_rs/ping1d/struct.GotoBootloaderStruct.html +++ b/ping_rs/ping1d/struct.GotoBootloaderStruct.html @@ -1,15 +1,16 @@ -GotoBootloaderStruct in ping_rs::ping1d - Rust
    pub struct GotoBootloaderStruct {}
    Expand description

    Send the device into the bootloader. This is useful for firmware updates.

    -

    Trait Implementations§

    source§

    impl Clone for GotoBootloaderStruct

    source§

    fn clone(&self) -> GotoBootloaderStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for GotoBootloaderStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for GotoBootloaderStruct

    source§

    fn default() -> GotoBootloaderStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for GotoBootloaderStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for GotoBootloaderStruct

    source§

    fn eq(&self, other: &GotoBootloaderStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for GotoBootloaderStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for GotoBootloaderStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +GotoBootloaderStruct in ping_rs::ping1d - Rust +
    pub struct GotoBootloaderStruct {}
    Expand description

    Send the device into the bootloader. This is useful for firmware updates.

    +

    Trait Implementations§

    source§

    impl Clone for GotoBootloaderStruct

    source§

    fn clone(&self) -> GotoBootloaderStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for GotoBootloaderStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for GotoBootloaderStruct

    source§

    fn default() -> GotoBootloaderStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for GotoBootloaderStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for GotoBootloaderStruct

    source§

    fn eq(&self, other: &GotoBootloaderStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for GotoBootloaderStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for GotoBootloaderStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.ModeAutoStruct.html b/ping_rs/ping1d/struct.ModeAutoStruct.html index 6de65d6dd..e31d847b2 100644 --- a/ping_rs/ping1d/struct.ModeAutoStruct.html +++ b/ping_rs/ping1d/struct.ModeAutoStruct.html @@ -1,18 +1,19 @@ -ModeAutoStruct in ping_rs::ping1d - Rust
    pub struct ModeAutoStruct {
    -    pub mode_auto: u8,
    +ModeAutoStruct in ping_rs::ping1d - Rust
    +    
    pub struct ModeAutoStruct {
    +    pub mode_auto: u8,
     }
    Expand description

    The current operating mode of the device. Manual mode allows for manual selection of the gain and scan range.

    -

    Fields§

    §mode_auto: u8

    0: manual mode, 1: auto mode

    -

    Trait Implementations§

    source§

    impl Clone for ModeAutoStruct

    source§

    fn clone(&self) -> ModeAutoStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for ModeAutoStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for ModeAutoStruct

    source§

    fn default() -> ModeAutoStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for ModeAutoStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for ModeAutoStruct

    source§

    fn eq(&self, other: &ModeAutoStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for ModeAutoStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for ModeAutoStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §mode_auto: u8

    0: manual mode, 1: auto mode

    +

    Trait Implementations§

    source§

    impl Clone for ModeAutoStruct

    source§

    fn clone(&self) -> ModeAutoStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for ModeAutoStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for ModeAutoStruct

    source§

    fn default() -> ModeAutoStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for ModeAutoStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for ModeAutoStruct

    source§

    fn eq(&self, other: &ModeAutoStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for ModeAutoStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for ModeAutoStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.PcbTemperatureStruct.html b/ping_rs/ping1d/struct.PcbTemperatureStruct.html index 664d64b43..807bc8721 100644 --- a/ping_rs/ping1d/struct.PcbTemperatureStruct.html +++ b/ping_rs/ping1d/struct.PcbTemperatureStruct.html @@ -1,18 +1,19 @@ -PcbTemperatureStruct in ping_rs::ping1d - Rust
    pub struct PcbTemperatureStruct {
    -    pub pcb_temperature: u16,
    +PcbTemperatureStruct in ping_rs::ping1d - Rust
    +    
    pub struct PcbTemperatureStruct {
    +    pub pcb_temperature: u16,
     }
    Expand description

    Temperature of the on-board thermistor.

    -

    Fields§

    §pcb_temperature: u16

    The temperature in centi-degrees Centigrade (100 * degrees C).

    -

    Trait Implementations§

    source§

    impl Clone for PcbTemperatureStruct

    source§

    fn clone(&self) -> PcbTemperatureStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for PcbTemperatureStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for PcbTemperatureStruct

    source§

    fn default() -> PcbTemperatureStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for PcbTemperatureStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for PcbTemperatureStruct

    source§

    fn eq(&self, other: &PcbTemperatureStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for PcbTemperatureStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for PcbTemperatureStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §pcb_temperature: u16

    The temperature in centi-degrees Centigrade (100 * degrees C).

    +

    Trait Implementations§

    source§

    impl Clone for PcbTemperatureStruct

    source§

    fn clone(&self) -> PcbTemperatureStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for PcbTemperatureStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for PcbTemperatureStruct

    source§

    fn default() -> PcbTemperatureStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for PcbTemperatureStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for PcbTemperatureStruct

    source§

    fn eq(&self, other: &PcbTemperatureStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for PcbTemperatureStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for PcbTemperatureStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.PingEnableStruct.html b/ping_rs/ping1d/struct.PingEnableStruct.html index 7cbdd56b1..08f970a9d 100644 --- a/ping_rs/ping1d/struct.PingEnableStruct.html +++ b/ping_rs/ping1d/struct.PingEnableStruct.html @@ -1,18 +1,19 @@ -PingEnableStruct in ping_rs::ping1d - Rust
    pub struct PingEnableStruct {
    -    pub ping_enabled: u8,
    +PingEnableStruct in ping_rs::ping1d - Rust
    +    
    pub struct PingEnableStruct {
    +    pub ping_enabled: u8,
     }
    Expand description

    Acoustic output enabled state.

    -

    Fields§

    §ping_enabled: u8

    The state of the acoustic output. 0: disabled, 1:enabled

    -

    Trait Implementations§

    source§

    impl Clone for PingEnableStruct

    source§

    fn clone(&self) -> PingEnableStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for PingEnableStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for PingEnableStruct

    source§

    fn default() -> PingEnableStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for PingEnableStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for PingEnableStruct

    source§

    fn eq(&self, other: &PingEnableStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for PingEnableStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for PingEnableStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §ping_enabled: u8

    The state of the acoustic output. 0: disabled, 1:enabled

    +

    Trait Implementations§

    source§

    impl Clone for PingEnableStruct

    source§

    fn clone(&self) -> PingEnableStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for PingEnableStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for PingEnableStruct

    source§

    fn default() -> PingEnableStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for PingEnableStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for PingEnableStruct

    source§

    fn eq(&self, other: &PingEnableStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for PingEnableStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for PingEnableStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.PingIntervalStruct.html b/ping_rs/ping1d/struct.PingIntervalStruct.html index e76994941..f1e37639e 100644 --- a/ping_rs/ping1d/struct.PingIntervalStruct.html +++ b/ping_rs/ping1d/struct.PingIntervalStruct.html @@ -1,18 +1,19 @@ -PingIntervalStruct in ping_rs::ping1d - Rust
    pub struct PingIntervalStruct {
    -    pub ping_interval: u16,
    +PingIntervalStruct in ping_rs::ping1d - Rust
    +    
    pub struct PingIntervalStruct {
    +    pub ping_interval: u16,
     }
    Expand description

    The interval between acoustic measurements.

    -

    Fields§

    §ping_interval: u16

    The minimum interval between acoustic measurements. The actual interval may be longer.

    -

    Trait Implementations§

    source§

    impl Clone for PingIntervalStruct

    source§

    fn clone(&self) -> PingIntervalStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for PingIntervalStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for PingIntervalStruct

    source§

    fn default() -> PingIntervalStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for PingIntervalStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for PingIntervalStruct

    source§

    fn eq(&self, other: &PingIntervalStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for PingIntervalStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for PingIntervalStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §ping_interval: u16

    The minimum interval between acoustic measurements. The actual interval may be longer.

    +

    Trait Implementations§

    source§

    impl Clone for PingIntervalStruct

    source§

    fn clone(&self) -> PingIntervalStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for PingIntervalStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for PingIntervalStruct

    source§

    fn default() -> PingIntervalStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for PingIntervalStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for PingIntervalStruct

    source§

    fn eq(&self, other: &PingIntervalStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for PingIntervalStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for PingIntervalStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.PingProtocolHead.html b/ping_rs/ping1d/struct.PingProtocolHead.html index 855ba26f3..274b10648 100644 --- a/ping_rs/ping1d/struct.PingProtocolHead.html +++ b/ping_rs/ping1d/struct.PingProtocolHead.html @@ -1,17 +1,18 @@ -PingProtocolHead in ping_rs::ping1d - Rust
    pub struct PingProtocolHead {
    -    pub source_device_id: u8,
    -    pub destiny_device_id: u8,
    -}

    Fields§

    §source_device_id: u8§destiny_device_id: u8

    Trait Implementations§

    source§

    impl Clone for PingProtocolHead

    source§

    fn clone(&self) -> PingProtocolHead

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for PingProtocolHead

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for PingProtocolHead

    source§

    fn default() -> PingProtocolHead

    Returns the “default value” for a type. Read more
    source§

    impl PartialEq for PingProtocolHead

    source§

    fn eq(&self, other: &PingProtocolHead) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl StructuralPartialEq for PingProtocolHead

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +PingProtocolHead in ping_rs::ping1d - Rust +
    pub struct PingProtocolHead {
    +    pub source_device_id: u8,
    +    pub destiny_device_id: u8,
    +}

    Fields§

    §source_device_id: u8§destiny_device_id: u8

    Trait Implementations§

    source§

    impl Clone for PingProtocolHead

    source§

    fn clone(&self) -> PingProtocolHead

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for PingProtocolHead

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for PingProtocolHead

    source§

    fn default() -> PingProtocolHead

    Returns the “default value” for a type. Read more
    source§

    impl PartialEq for PingProtocolHead

    source§

    fn eq(&self, other: &PingProtocolHead) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl StructuralPartialEq for PingProtocolHead

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.ProcessorTemperatureStruct.html b/ping_rs/ping1d/struct.ProcessorTemperatureStruct.html index 48becd30a..1a48c69f7 100644 --- a/ping_rs/ping1d/struct.ProcessorTemperatureStruct.html +++ b/ping_rs/ping1d/struct.ProcessorTemperatureStruct.html @@ -1,18 +1,19 @@ -ProcessorTemperatureStruct in ping_rs::ping1d - Rust
    pub struct ProcessorTemperatureStruct {
    -    pub processor_temperature: u16,
    +ProcessorTemperatureStruct in ping_rs::ping1d - Rust
    +    
    pub struct ProcessorTemperatureStruct {
    +    pub processor_temperature: u16,
     }
    Expand description

    Temperature of the device cpu.

    -

    Fields§

    §processor_temperature: u16

    The temperature in centi-degrees Centigrade (100 * degrees C).

    -

    Trait Implementations§

    source§

    impl Clone for ProcessorTemperatureStruct

    source§

    fn clone(&self) -> ProcessorTemperatureStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for ProcessorTemperatureStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for ProcessorTemperatureStruct

    source§

    fn default() -> ProcessorTemperatureStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for ProcessorTemperatureStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for ProcessorTemperatureStruct

    source§

    fn eq(&self, other: &ProcessorTemperatureStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for ProcessorTemperatureStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for ProcessorTemperatureStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §processor_temperature: u16

    The temperature in centi-degrees Centigrade (100 * degrees C).

    +

    Trait Implementations§

    source§

    impl Clone for ProcessorTemperatureStruct

    source§

    fn clone(&self) -> ProcessorTemperatureStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for ProcessorTemperatureStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for ProcessorTemperatureStruct

    source§

    fn default() -> ProcessorTemperatureStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for ProcessorTemperatureStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for ProcessorTemperatureStruct

    source§

    fn eq(&self, other: &ProcessorTemperatureStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for ProcessorTemperatureStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for ProcessorTemperatureStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.ProfileStruct.html b/ping_rs/ping1d/struct.ProfileStruct.html index 02995e451..2276f4434 100644 --- a/ping_rs/ping1d/struct.ProfileStruct.html +++ b/ping_rs/ping1d/struct.ProfileStruct.html @@ -1,33 +1,34 @@ -ProfileStruct in ping_rs::ping1d - Rust
    pub struct ProfileStruct {
    -    pub distance: u32,
    -    pub confidence: u16,
    -    pub transmit_duration: u16,
    -    pub ping_number: u32,
    -    pub scan_start: u32,
    -    pub scan_length: u32,
    -    pub gain_setting: u32,
    -    pub profile_data_length: u16,
    -    pub profile_data: Vec<u8>,
    +ProfileStruct in ping_rs::ping1d - Rust
    +    
    pub struct ProfileStruct {
    +    pub distance: u32,
    +    pub confidence: u16,
    +    pub transmit_duration: u16,
    +    pub ping_number: u32,
    +    pub scan_start: u32,
    +    pub scan_length: u32,
    +    pub gain_setting: u32,
    +    pub profile_data_length: u16,
    +    pub profile_data: Vec<u8>,
     }
    Expand description

    A profile produced from a single acoustic measurement. The data returned is an array of response strength at even intervals across the scan region. The scan region is defined as the region between <scan_start> and <scan_start + scan_length> millimeters away from the transducer. A distance measurement to the target is also provided.

    -

    Fields§

    §distance: u32

    The current return distance determined for the most recent acoustic measurement.

    -
    §confidence: u16

    Confidence in the most recent range measurement.

    -
    §transmit_duration: u16

    The acoustic pulse length during acoustic transmission/activation.

    -
    §ping_number: u32

    The pulse/measurement count since boot.

    -
    §scan_start: u32

    The beginning of the scan region in mm from the transducer.

    -
    §scan_length: u32

    The length of the scan region.

    -
    §gain_setting: u32

    The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, 4: 30.2, 5: 66.1, 6: 144

    -
    §profile_data_length: u16

    An array of return strength measurements taken at regular intervals across the scan region.

    -
    §profile_data: Vec<u8>

    Trait Implementations§

    source§

    impl Clone for ProfileStruct

    source§

    fn clone(&self) -> ProfileStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for ProfileStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for ProfileStruct

    source§

    fn default() -> ProfileStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for ProfileStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for ProfileStruct

    source§

    fn eq(&self, other: &ProfileStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for ProfileStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for ProfileStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §distance: u32

    The current return distance determined for the most recent acoustic measurement.

    +
    §confidence: u16

    Confidence in the most recent range measurement.

    +
    §transmit_duration: u16

    The acoustic pulse length during acoustic transmission/activation.

    +
    §ping_number: u32

    The pulse/measurement count since boot.

    +
    §scan_start: u32

    The beginning of the scan region in mm from the transducer.

    +
    §scan_length: u32

    The length of the scan region.

    +
    §gain_setting: u32

    The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, 4: 30.2, 5: 66.1, 6: 144

    +
    §profile_data_length: u16

    An array of return strength measurements taken at regular intervals across the scan region.

    +
    §profile_data: Vec<u8>

    Trait Implementations§

    source§

    impl Clone for ProfileStruct

    source§

    fn clone(&self) -> ProfileStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for ProfileStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for ProfileStruct

    source§

    fn default() -> ProfileStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for ProfileStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for ProfileStruct

    source§

    fn eq(&self, other: &ProfileStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for ProfileStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for ProfileStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.RangeStruct.html b/ping_rs/ping1d/struct.RangeStruct.html index 004a5829f..911a8d0f8 100644 --- a/ping_rs/ping1d/struct.RangeStruct.html +++ b/ping_rs/ping1d/struct.RangeStruct.html @@ -1,20 +1,21 @@ -RangeStruct in ping_rs::ping1d - Rust

    Struct ping_rs::ping1d::RangeStruct

    source ·
    pub struct RangeStruct {
    -    pub scan_start: u32,
    -    pub scan_length: u32,
    +RangeStruct in ping_rs::ping1d - Rust
    +    

    Struct ping_rs::ping1d::RangeStruct

    source ·
    pub struct RangeStruct {
    +    pub scan_start: u32,
    +    pub scan_length: u32,
     }
    Expand description

    The scan range for acoustic measurements. Measurements returned by the device will lie in the range (scan_start, scan_start + scan_length).

    -

    Fields§

    §scan_start: u32

    The beginning of the scan range in mm from the transducer.

    -
    §scan_length: u32

    The length of the scan range.

    -

    Trait Implementations§

    source§

    impl Clone for RangeStruct

    source§

    fn clone(&self) -> RangeStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for RangeStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for RangeStruct

    source§

    fn default() -> RangeStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for RangeStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for RangeStruct

    source§

    fn eq(&self, other: &RangeStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for RangeStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for RangeStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §scan_start: u32

    The beginning of the scan range in mm from the transducer.

    +
    §scan_length: u32

    The length of the scan range.

    +

    Trait Implementations§

    source§

    impl Clone for RangeStruct

    source§

    fn clone(&self) -> RangeStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for RangeStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for RangeStruct

    source§

    fn default() -> RangeStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for RangeStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for RangeStruct

    source§

    fn eq(&self, other: &RangeStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for RangeStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for RangeStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.SetDeviceIdStruct.html b/ping_rs/ping1d/struct.SetDeviceIdStruct.html index a764bb4f8..d57f8cb74 100644 --- a/ping_rs/ping1d/struct.SetDeviceIdStruct.html +++ b/ping_rs/ping1d/struct.SetDeviceIdStruct.html @@ -1,18 +1,19 @@ -SetDeviceIdStruct in ping_rs::ping1d - Rust
    pub struct SetDeviceIdStruct {
    -    pub device_id: u8,
    +SetDeviceIdStruct in ping_rs::ping1d - Rust
    +    
    pub struct SetDeviceIdStruct {
    +    pub device_id: u8,
     }
    Expand description

    Set the device ID.

    -

    Fields§

    §device_id: u8

    Device ID (0-254). 255 is reserved for broadcast messages.

    -

    Trait Implementations§

    source§

    impl Clone for SetDeviceIdStruct

    source§

    fn clone(&self) -> SetDeviceIdStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetDeviceIdStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetDeviceIdStruct

    source§

    fn default() -> SetDeviceIdStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetDeviceIdStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetDeviceIdStruct

    source§

    fn eq(&self, other: &SetDeviceIdStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetDeviceIdStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetDeviceIdStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §device_id: u8

    Device ID (0-254). 255 is reserved for broadcast messages.

    +

    Trait Implementations§

    source§

    impl Clone for SetDeviceIdStruct

    source§

    fn clone(&self) -> SetDeviceIdStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetDeviceIdStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetDeviceIdStruct

    source§

    fn default() -> SetDeviceIdStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetDeviceIdStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetDeviceIdStruct

    source§

    fn eq(&self, other: &SetDeviceIdStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetDeviceIdStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetDeviceIdStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.SetGainSettingStruct.html b/ping_rs/ping1d/struct.SetGainSettingStruct.html index 7ceb6c3a0..1d5d3a10d 100644 --- a/ping_rs/ping1d/struct.SetGainSettingStruct.html +++ b/ping_rs/ping1d/struct.SetGainSettingStruct.html @@ -1,18 +1,19 @@ -SetGainSettingStruct in ping_rs::ping1d - Rust
    pub struct SetGainSettingStruct {
    -    pub gain_setting: u8,
    +SetGainSettingStruct in ping_rs::ping1d - Rust
    +    
    pub struct SetGainSettingStruct {
    +    pub gain_setting: u8,
     }
    Expand description

    Set the current gain setting.

    -

    Fields§

    §gain_setting: u8

    The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, 4: 30.2, 5: 66.1, 6: 144

    -

    Trait Implementations§

    source§

    impl Clone for SetGainSettingStruct

    source§

    fn clone(&self) -> SetGainSettingStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetGainSettingStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetGainSettingStruct

    source§

    fn default() -> SetGainSettingStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetGainSettingStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetGainSettingStruct

    source§

    fn eq(&self, other: &SetGainSettingStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetGainSettingStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetGainSettingStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §gain_setting: u8

    The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, 4: 30.2, 5: 66.1, 6: 144

    +

    Trait Implementations§

    source§

    impl Clone for SetGainSettingStruct

    source§

    fn clone(&self) -> SetGainSettingStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetGainSettingStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetGainSettingStruct

    source§

    fn default() -> SetGainSettingStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetGainSettingStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetGainSettingStruct

    source§

    fn eq(&self, other: &SetGainSettingStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetGainSettingStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetGainSettingStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.SetModeAutoStruct.html b/ping_rs/ping1d/struct.SetModeAutoStruct.html index d99f3643e..8bcf59d8c 100644 --- a/ping_rs/ping1d/struct.SetModeAutoStruct.html +++ b/ping_rs/ping1d/struct.SetModeAutoStruct.html @@ -1,18 +1,19 @@ -SetModeAutoStruct in ping_rs::ping1d - Rust
    pub struct SetModeAutoStruct {
    -    pub mode_auto: u8,
    +SetModeAutoStruct in ping_rs::ping1d - Rust
    +    
    pub struct SetModeAutoStruct {
    +    pub mode_auto: u8,
     }
    Expand description

    Set automatic or manual mode. Manual mode allows for manual selection of the gain and scan range.

    -

    Fields§

    §mode_auto: u8

    0: manual mode. 1: auto mode.

    -

    Trait Implementations§

    source§

    impl Clone for SetModeAutoStruct

    source§

    fn clone(&self) -> SetModeAutoStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetModeAutoStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetModeAutoStruct

    source§

    fn default() -> SetModeAutoStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetModeAutoStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetModeAutoStruct

    source§

    fn eq(&self, other: &SetModeAutoStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetModeAutoStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetModeAutoStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §mode_auto: u8

    0: manual mode. 1: auto mode.

    +

    Trait Implementations§

    source§

    impl Clone for SetModeAutoStruct

    source§

    fn clone(&self) -> SetModeAutoStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetModeAutoStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetModeAutoStruct

    source§

    fn default() -> SetModeAutoStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetModeAutoStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetModeAutoStruct

    source§

    fn eq(&self, other: &SetModeAutoStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetModeAutoStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetModeAutoStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.SetPingEnableStruct.html b/ping_rs/ping1d/struct.SetPingEnableStruct.html index d600b238e..a8f266060 100644 --- a/ping_rs/ping1d/struct.SetPingEnableStruct.html +++ b/ping_rs/ping1d/struct.SetPingEnableStruct.html @@ -1,18 +1,19 @@ -SetPingEnableStruct in ping_rs::ping1d - Rust
    pub struct SetPingEnableStruct {
    -    pub ping_enabled: u8,
    +SetPingEnableStruct in ping_rs::ping1d - Rust
    +    
    pub struct SetPingEnableStruct {
    +    pub ping_enabled: u8,
     }
    Expand description

    Enable or disable acoustic measurements.

    -

    Fields§

    §ping_enabled: u8

    0: Disable, 1: Enable.

    -

    Trait Implementations§

    source§

    impl Clone for SetPingEnableStruct

    source§

    fn clone(&self) -> SetPingEnableStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetPingEnableStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetPingEnableStruct

    source§

    fn default() -> SetPingEnableStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetPingEnableStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetPingEnableStruct

    source§

    fn eq(&self, other: &SetPingEnableStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetPingEnableStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetPingEnableStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §ping_enabled: u8

    0: Disable, 1: Enable.

    +

    Trait Implementations§

    source§

    impl Clone for SetPingEnableStruct

    source§

    fn clone(&self) -> SetPingEnableStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetPingEnableStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetPingEnableStruct

    source§

    fn default() -> SetPingEnableStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetPingEnableStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetPingEnableStruct

    source§

    fn eq(&self, other: &SetPingEnableStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetPingEnableStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetPingEnableStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.SetPingIntervalStruct.html b/ping_rs/ping1d/struct.SetPingIntervalStruct.html index 787ecf63d..b12293f22 100644 --- a/ping_rs/ping1d/struct.SetPingIntervalStruct.html +++ b/ping_rs/ping1d/struct.SetPingIntervalStruct.html @@ -1,18 +1,19 @@ -SetPingIntervalStruct in ping_rs::ping1d - Rust
    pub struct SetPingIntervalStruct {
    -    pub ping_interval: u16,
    +SetPingIntervalStruct in ping_rs::ping1d - Rust
    +    
    pub struct SetPingIntervalStruct {
    +    pub ping_interval: u16,
     }
    Expand description

    The interval between acoustic measurements.

    -

    Fields§

    §ping_interval: u16

    The interval between acoustic measurements.

    -

    Trait Implementations§

    source§

    impl Clone for SetPingIntervalStruct

    source§

    fn clone(&self) -> SetPingIntervalStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetPingIntervalStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetPingIntervalStruct

    source§

    fn default() -> SetPingIntervalStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetPingIntervalStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetPingIntervalStruct

    source§

    fn eq(&self, other: &SetPingIntervalStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetPingIntervalStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetPingIntervalStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §ping_interval: u16

    The interval between acoustic measurements.

    +

    Trait Implementations§

    source§

    impl Clone for SetPingIntervalStruct

    source§

    fn clone(&self) -> SetPingIntervalStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetPingIntervalStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetPingIntervalStruct

    source§

    fn default() -> SetPingIntervalStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetPingIntervalStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetPingIntervalStruct

    source§

    fn eq(&self, other: &SetPingIntervalStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetPingIntervalStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetPingIntervalStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.SetRangeStruct.html b/ping_rs/ping1d/struct.SetRangeStruct.html index 5d0020344..b45ae1eea 100644 --- a/ping_rs/ping1d/struct.SetRangeStruct.html +++ b/ping_rs/ping1d/struct.SetRangeStruct.html @@ -1,20 +1,21 @@ -SetRangeStruct in ping_rs::ping1d - Rust
    pub struct SetRangeStruct {
    -    pub scan_start: u32,
    -    pub scan_length: u32,
    +SetRangeStruct in ping_rs::ping1d - Rust
    +    
    pub struct SetRangeStruct {
    +    pub scan_start: u32,
    +    pub scan_length: u32,
     }
    Expand description

    Set the scan range for acoustic measurements.

    -

    Fields§

    §scan_start: u32

    Not documented

    -
    §scan_length: u32

    The length of the scan range.

    -

    Trait Implementations§

    source§

    impl Clone for SetRangeStruct

    source§

    fn clone(&self) -> SetRangeStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetRangeStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetRangeStruct

    source§

    fn default() -> SetRangeStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetRangeStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetRangeStruct

    source§

    fn eq(&self, other: &SetRangeStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetRangeStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetRangeStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §scan_start: u32

    Not documented

    +
    §scan_length: u32

    The length of the scan range.

    +

    Trait Implementations§

    source§

    impl Clone for SetRangeStruct

    source§

    fn clone(&self) -> SetRangeStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetRangeStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetRangeStruct

    source§

    fn default() -> SetRangeStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetRangeStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetRangeStruct

    source§

    fn eq(&self, other: &SetRangeStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetRangeStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetRangeStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.SetSpeedOfSoundStruct.html b/ping_rs/ping1d/struct.SetSpeedOfSoundStruct.html index 7063ebd81..24b0b3d8a 100644 --- a/ping_rs/ping1d/struct.SetSpeedOfSoundStruct.html +++ b/ping_rs/ping1d/struct.SetSpeedOfSoundStruct.html @@ -1,18 +1,19 @@ -SetSpeedOfSoundStruct in ping_rs::ping1d - Rust
    pub struct SetSpeedOfSoundStruct {
    -    pub speed_of_sound: u32,
    +SetSpeedOfSoundStruct in ping_rs::ping1d - Rust
    +    
    pub struct SetSpeedOfSoundStruct {
    +    pub speed_of_sound: u32,
     }
    Expand description

    Set the speed of sound used for distance calculations.

    -

    Fields§

    §speed_of_sound: u32

    The speed of sound in the measurement medium. ~1,500,000 mm/s for water.

    -

    Trait Implementations§

    source§

    impl Clone for SetSpeedOfSoundStruct

    source§

    fn clone(&self) -> SetSpeedOfSoundStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetSpeedOfSoundStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetSpeedOfSoundStruct

    source§

    fn default() -> SetSpeedOfSoundStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetSpeedOfSoundStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetSpeedOfSoundStruct

    source§

    fn eq(&self, other: &SetSpeedOfSoundStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetSpeedOfSoundStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetSpeedOfSoundStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §speed_of_sound: u32

    The speed of sound in the measurement medium. ~1,500,000 mm/s for water.

    +

    Trait Implementations§

    source§

    impl Clone for SetSpeedOfSoundStruct

    source§

    fn clone(&self) -> SetSpeedOfSoundStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SetSpeedOfSoundStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SetSpeedOfSoundStruct

    source§

    fn default() -> SetSpeedOfSoundStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SetSpeedOfSoundStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SetSpeedOfSoundStruct

    source§

    fn eq(&self, other: &SetSpeedOfSoundStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SetSpeedOfSoundStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SetSpeedOfSoundStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.SpeedOfSoundStruct.html b/ping_rs/ping1d/struct.SpeedOfSoundStruct.html index 2fc7f1dcc..a376f8e63 100644 --- a/ping_rs/ping1d/struct.SpeedOfSoundStruct.html +++ b/ping_rs/ping1d/struct.SpeedOfSoundStruct.html @@ -1,18 +1,19 @@ -SpeedOfSoundStruct in ping_rs::ping1d - Rust
    pub struct SpeedOfSoundStruct {
    -    pub speed_of_sound: u32,
    +SpeedOfSoundStruct in ping_rs::ping1d - Rust
    +    
    pub struct SpeedOfSoundStruct {
    +    pub speed_of_sound: u32,
     }
    Expand description

    The speed of sound used for distance calculations.

    -

    Fields§

    §speed_of_sound: u32

    The speed of sound in the measurement medium. ~1,500,000 mm/s for water.

    -

    Trait Implementations§

    source§

    impl Clone for SpeedOfSoundStruct

    source§

    fn clone(&self) -> SpeedOfSoundStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SpeedOfSoundStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SpeedOfSoundStruct

    source§

    fn default() -> SpeedOfSoundStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SpeedOfSoundStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SpeedOfSoundStruct

    source§

    fn eq(&self, other: &SpeedOfSoundStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SpeedOfSoundStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SpeedOfSoundStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §speed_of_sound: u32

    The speed of sound in the measurement medium. ~1,500,000 mm/s for water.

    +

    Trait Implementations§

    source§

    impl Clone for SpeedOfSoundStruct

    source§

    fn clone(&self) -> SpeedOfSoundStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for SpeedOfSoundStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for SpeedOfSoundStruct

    source§

    fn default() -> SpeedOfSoundStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for SpeedOfSoundStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for SpeedOfSoundStruct

    source§

    fn eq(&self, other: &SpeedOfSoundStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for SpeedOfSoundStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for SpeedOfSoundStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.TransmitDurationStruct.html b/ping_rs/ping1d/struct.TransmitDurationStruct.html index 2b00bfbe5..3103df1c6 100644 --- a/ping_rs/ping1d/struct.TransmitDurationStruct.html +++ b/ping_rs/ping1d/struct.TransmitDurationStruct.html @@ -1,18 +1,19 @@ -TransmitDurationStruct in ping_rs::ping1d - Rust
    pub struct TransmitDurationStruct {
    -    pub transmit_duration: u16,
    +TransmitDurationStruct in ping_rs::ping1d - Rust
    +    
    pub struct TransmitDurationStruct {
    +    pub transmit_duration: u16,
     }
    Expand description

    The duration of the acoustic activation/transmission.

    -

    Fields§

    §transmit_duration: u16

    Acoustic pulse duration.

    -

    Trait Implementations§

    source§

    impl Clone for TransmitDurationStruct

    source§

    fn clone(&self) -> TransmitDurationStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for TransmitDurationStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for TransmitDurationStruct

    source§

    fn default() -> TransmitDurationStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for TransmitDurationStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for TransmitDurationStruct

    source§

    fn eq(&self, other: &TransmitDurationStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for TransmitDurationStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for TransmitDurationStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §transmit_duration: u16

    Acoustic pulse duration.

    +

    Trait Implementations§

    source§

    impl Clone for TransmitDurationStruct

    source§

    fn clone(&self) -> TransmitDurationStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for TransmitDurationStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for TransmitDurationStruct

    source§

    fn default() -> TransmitDurationStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for TransmitDurationStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for TransmitDurationStruct

    source§

    fn eq(&self, other: &TransmitDurationStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for TransmitDurationStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for TransmitDurationStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping1d/struct.Voltage5Struct.html b/ping_rs/ping1d/struct.Voltage5Struct.html index 86614fd37..d32b580e9 100644 --- a/ping_rs/ping1d/struct.Voltage5Struct.html +++ b/ping_rs/ping1d/struct.Voltage5Struct.html @@ -1,18 +1,19 @@ -Voltage5Struct in ping_rs::ping1d - Rust
    pub struct Voltage5Struct {
    -    pub voltage_5: u16,
    +Voltage5Struct in ping_rs::ping1d - Rust
    +    
    pub struct Voltage5Struct {
    +    pub voltage_5: u16,
     }
    Expand description

    The 5V rail voltage.

    -

    Fields§

    §voltage_5: u16

    The 5V rail voltage.

    -

    Trait Implementations§

    source§

    impl Clone for Voltage5Struct

    source§

    fn clone(&self) -> Voltage5Struct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for Voltage5Struct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for Voltage5Struct

    source§

    fn default() -> Voltage5Struct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for Voltage5Struct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for Voltage5Struct

    source§

    fn eq(&self, other: &Voltage5Struct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for Voltage5Struct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for Voltage5Struct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §voltage_5: u16

    The 5V rail voltage.

    +

    Trait Implementations§

    source§

    impl Clone for Voltage5Struct

    source§

    fn clone(&self) -> Voltage5Struct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for Voltage5Struct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for Voltage5Struct

    source§

    fn default() -> Voltage5Struct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for Voltage5Struct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for Voltage5Struct

    source§

    fn eq(&self, other: &Voltage5Struct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for Voltage5Struct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for Voltage5Struct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping360/enum.Messages.html b/ping_rs/ping360/enum.Messages.html index 34e1929be..96783dc2f 100644 --- a/ping_rs/ping360/enum.Messages.html +++ b/ping_rs/ping360/enum.Messages.html @@ -1,22 +1,23 @@ -Messages in ping_rs::ping360 - Rust
    pub enum Messages {
    -    DeviceData(DeviceDataStruct),
    -    Transducer(TransducerStruct),
    +Messages in ping_rs::ping360 - Rust
    +    
    pub enum Messages {
         AutoTransmit(AutoTransmitStruct),
    +    DeviceData(DeviceDataStruct),
         Reset(ResetStruct),
    -    MotorOff(MotorOffStruct),
         AutoDeviceData(AutoDeviceDataStruct),
    +    Transducer(TransducerStruct),
    +    MotorOff(MotorOffStruct),
         DeviceId(DeviceIdStruct),
    -}

    Variants§

    Trait Implementations§

    source§

    impl Clone for Messages

    source§

    fn clone(&self) -> Messages

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for Messages

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl DeserializeGenericMessage for Messages

    source§

    fn deserialize(message_id: u16, payload: &[u8]) -> Result<Self, &'static str>

    source§

    impl PartialEq for Messages

    source§

    fn eq(&self, other: &Messages) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl PingMessage for Messages

    source§

    impl SerializePayload for Messages

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for Messages

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +}

    Variants§

    Trait Implementations§

    source§

    impl Clone for Messages

    source§

    fn clone(&self) -> Messages

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for Messages

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl DeserializeGenericMessage for Messages

    source§

    fn deserialize(message_id: u16, payload: &[u8]) -> Result<Self, &'static str>

    source§

    impl PartialEq for Messages

    source§

    fn eq(&self, other: &Messages) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl PingMessage for Messages

    source§

    impl SerializePayload for Messages

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for Messages

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping360/index.html b/ping_rs/ping360/index.html index 1528a5fd9..e5b4e07b8 100644 --- a/ping_rs/ping360/index.html +++ b/ping_rs/ping360/index.html @@ -1 +1,2 @@ -ping_rs::ping360 - Rust

    Module ping_rs::ping360

    source ·

    Structs

    • Extended version of device_data with auto_transmit information. The sensor emits this message when in auto_transmit mode.
    • Extended transducer message with auto-scan function. The sonar will automatically scan the region between start_angle and end_angle and send auto_device_data messages as soon as new data is available. Send a line break to stop scanning (and also begin the autobaudrate procedure). Alternatively, a motor_off message may be sent (but retrys might be necessary on the half-duplex RS485 interface).
    • This message is used to communicate the current sonar state. If the data field is populated, the other fields indicate the sonar state when the data was captured. The time taken before the response to the command is sent depends on the difference between the last angle scanned and the new angle in the parameters as well as the number of samples and sample interval (range). To allow for the worst case reponse time the command timeout should be set to 4000 msec.
    • Change the device id
    • The sonar switches the current through the stepper motor windings off to save power. The sonar will send an ack message in response. The command timeout should be set to 50 msec. If the sonar is idle (not scanning) for more than 30 seconds then the motor current will automatically turn off. When the user sends any command that involves moving the transducer then the motor current is automatically re-enabled.
    • Reset the sonar. The bootloader may run depending on the selection according to the bootloader payload field. When the bootloader runs, the external LED flashes at 5Hz. If the bootloader is not contacted within 5 seconds, it will run the current program. If there is no program, then the bootloader will wait forever for a connection. Note that if you issue a reset then you will have to close all your open comm ports and go back to issuing either a discovery message for UDP or go through the break sequence for serial comms before you can talk to the sonar again.
    • The transducer will apply the commanded settings. The sonar will reply with a ping360_data message. If the transmit field is 0, the sonar will not transmit after locating the transducer, and the data field in the ping360_data message reply will be empty. If the transmit field is 1, the sonar will make an acoustic transmission after locating the transducer, and the resulting data will be uploaded in the data field of the ping360_data message reply. To allow for the worst case reponse time the command timeout should be set to 4000 msec.

    Enums

    \ No newline at end of file +ping_rs::ping360 - Rust +

    Module ping_rs::ping360

    source ·

    Structs

    • Extended version of device_data with auto_transmit information. The sensor emits this message when in auto_transmit mode.
    • Extended transducer message with auto-scan function. The sonar will automatically scan the region between start_angle and end_angle and send auto_device_data messages as soon as new data is available. Send a line break to stop scanning (and also begin the autobaudrate procedure). Alternatively, a motor_off message may be sent (but retrys might be necessary on the half-duplex RS485 interface).
    • This message is used to communicate the current sonar state. If the data field is populated, the other fields indicate the sonar state when the data was captured. The time taken before the response to the command is sent depends on the difference between the last angle scanned and the new angle in the parameters as well as the number of samples and sample interval (range). To allow for the worst case reponse time the command timeout should be set to 4000 msec.
    • Change the device id
    • The sonar switches the current through the stepper motor windings off to save power. The sonar will send an ack message in response. The command timeout should be set to 50 msec. If the sonar is idle (not scanning) for more than 30 seconds then the motor current will automatically turn off. When the user sends any command that involves moving the transducer then the motor current is automatically re-enabled.
    • Reset the sonar. The bootloader may run depending on the selection according to the bootloader payload field. When the bootloader runs, the external LED flashes at 5Hz. If the bootloader is not contacted within 5 seconds, it will run the current program. If there is no program, then the bootloader will wait forever for a connection. Note that if you issue a reset then you will have to close all your open comm ports and go back to issuing either a discovery message for UDP or go through the break sequence for serial comms before you can talk to the sonar again.
    • The transducer will apply the commanded settings. The sonar will reply with a ping360_data message. If the transmit field is 0, the sonar will not transmit after locating the transducer, and the data field in the ping360_data message reply will be empty. If the transmit field is 1, the sonar will make an acoustic transmission after locating the transducer, and the resulting data will be uploaded in the data field of the ping360_data message reply. To allow for the worst case reponse time the command timeout should be set to 4000 msec.

    Enums

    \ No newline at end of file diff --git a/ping_rs/ping360/struct.AutoDeviceDataStruct.html b/ping_rs/ping360/struct.AutoDeviceDataStruct.html index 6fc8db596..9dfe08fad 100644 --- a/ping_rs/ping360/struct.AutoDeviceDataStruct.html +++ b/ping_rs/ping360/struct.AutoDeviceDataStruct.html @@ -1,41 +1,42 @@ -AutoDeviceDataStruct in ping_rs::ping360 - Rust
    pub struct AutoDeviceDataStruct {
    Show 13 fields - pub mode: u8, - pub gain_setting: u8, - pub angle: u16, - pub transmit_duration: u16, - pub sample_period: u16, - pub transmit_frequency: u16, - pub start_angle: u16, - pub stop_angle: u16, - pub num_steps: u8, - pub delay: u8, - pub number_of_samples: u16, - pub data_length: u16, - pub data: Vec<u8>, +AutoDeviceDataStruct in ping_rs::ping360 - Rust +
    pub struct AutoDeviceDataStruct {
    Show 13 fields + pub mode: u8, + pub gain_setting: u8, + pub angle: u16, + pub transmit_duration: u16, + pub sample_period: u16, + pub transmit_frequency: u16, + pub start_angle: u16, + pub stop_angle: u16, + pub num_steps: u8, + pub delay: u8, + pub number_of_samples: u16, + pub data_length: u16, + pub data: Vec<u8>,
    }
    Expand description

    Extended version of device_data with auto_transmit information. The sensor emits this message when in auto_transmit mode.

    -

    Fields§

    §mode: u8

    Operating mode (1 for Ping360)

    -
    §gain_setting: u8

    Analog gain setting (0 = low, 1 = normal, 2 = high)

    -
    §angle: u16

    Head angle

    -
    §transmit_duration: u16

    Acoustic transmission duration (1~1000 microseconds)

    -
    §sample_period: u16

    Time interval between individual signal intensity samples in 25nsec increments (80 to 40000 == 2 microseconds to 1000 microseconds)

    -
    §transmit_frequency: u16

    Acoustic operating frequency. Frequency range is 500kHz to 1000kHz, however it is only practical to use say 650kHz to 850kHz due to the narrow bandwidth of the acoustic receiver.

    -
    §start_angle: u16

    Head angle to begin scan sector for autoscan in gradians (0~399 = 0~360 degrees).

    -
    §stop_angle: u16

    Head angle to end scan sector for autoscan in gradians (0~399 = 0~360 degrees).

    -
    §num_steps: u8

    Number of 0.9 degree motor steps between pings for auto scan (1~10 = 0.9~9.0 degrees)

    -
    §delay: u8

    An additional delay between successive transmit pulses (0~100 ms). This may be necessary for some programs to avoid collisions on the RS485 USRT.

    -
    §number_of_samples: u16

    Number of samples per reflected signal

    -
    §data_length: u16

    8 bit binary data array representing sonar echo strength

    -
    §data: Vec<u8>

    Trait Implementations§

    source§

    impl Clone for AutoDeviceDataStruct

    source§

    fn clone(&self) -> AutoDeviceDataStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for AutoDeviceDataStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for AutoDeviceDataStruct

    source§

    fn default() -> AutoDeviceDataStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for AutoDeviceDataStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for AutoDeviceDataStruct

    source§

    fn eq(&self, other: &AutoDeviceDataStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for AutoDeviceDataStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for AutoDeviceDataStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §mode: u8

    Operating mode (1 for Ping360)

    +
    §gain_setting: u8

    Analog gain setting (0 = low, 1 = normal, 2 = high)

    +
    §angle: u16

    Head angle

    +
    §transmit_duration: u16

    Acoustic transmission duration (1~1000 microseconds)

    +
    §sample_period: u16

    Time interval between individual signal intensity samples in 25nsec increments (80 to 40000 == 2 microseconds to 1000 microseconds)

    +
    §transmit_frequency: u16

    Acoustic operating frequency. Frequency range is 500kHz to 1000kHz, however it is only practical to use say 650kHz to 850kHz due to the narrow bandwidth of the acoustic receiver.

    +
    §start_angle: u16

    Head angle to begin scan sector for autoscan in gradians (0~399 = 0~360 degrees).

    +
    §stop_angle: u16

    Head angle to end scan sector for autoscan in gradians (0~399 = 0~360 degrees).

    +
    §num_steps: u8

    Number of 0.9 degree motor steps between pings for auto scan (1~10 = 0.9~9.0 degrees)

    +
    §delay: u8

    An additional delay between successive transmit pulses (0~100 ms). This may be necessary for some programs to avoid collisions on the RS485 USRT.

    +
    §number_of_samples: u16

    Number of samples per reflected signal

    +
    §data_length: u16

    8 bit binary data array representing sonar echo strength

    +
    §data: Vec<u8>

    Trait Implementations§

    source§

    impl Clone for AutoDeviceDataStruct

    source§

    fn clone(&self) -> AutoDeviceDataStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for AutoDeviceDataStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for AutoDeviceDataStruct

    source§

    fn default() -> AutoDeviceDataStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for AutoDeviceDataStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for AutoDeviceDataStruct

    source§

    fn eq(&self, other: &AutoDeviceDataStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for AutoDeviceDataStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for AutoDeviceDataStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping360/struct.AutoTransmitStruct.html b/ping_rs/ping360/struct.AutoTransmitStruct.html index b87c3b009..a863ca02d 100644 --- a/ping_rs/ping360/struct.AutoTransmitStruct.html +++ b/ping_rs/ping360/struct.AutoTransmitStruct.html @@ -1,36 +1,37 @@ -AutoTransmitStruct in ping_rs::ping360 - Rust
    pub struct AutoTransmitStruct {
    -    pub mode: u8,
    -    pub gain_setting: u8,
    -    pub transmit_duration: u16,
    -    pub sample_period: u16,
    -    pub transmit_frequency: u16,
    -    pub number_of_samples: u16,
    -    pub start_angle: u16,
    -    pub stop_angle: u16,
    -    pub num_steps: u8,
    -    pub delay: u8,
    +AutoTransmitStruct in ping_rs::ping360 - Rust
    +    
    pub struct AutoTransmitStruct {
    +    pub mode: u8,
    +    pub gain_setting: u8,
    +    pub transmit_duration: u16,
    +    pub sample_period: u16,
    +    pub transmit_frequency: u16,
    +    pub number_of_samples: u16,
    +    pub start_angle: u16,
    +    pub stop_angle: u16,
    +    pub num_steps: u8,
    +    pub delay: u8,
     }
    Expand description

    Extended transducer message with auto-scan function. The sonar will automatically scan the region between start_angle and end_angle and send auto_device_data messages as soon as new data is available. Send a line break to stop scanning (and also begin the autobaudrate procedure). Alternatively, a motor_off message may be sent (but retrys might be necessary on the half-duplex RS485 interface).

    -

    Fields§

    §mode: u8

    Operating mode (1 for Ping360)

    -
    §gain_setting: u8

    Analog gain setting (0 = low, 1 = normal, 2 = high)

    -
    §transmit_duration: u16

    Acoustic transmission duration (1~1000 microseconds)

    -
    §sample_period: u16

    Time interval between individual signal intensity samples in 25nsec increments (80 to 40000 == 2 microseconds to 1000 microseconds)

    -
    §transmit_frequency: u16

    Acoustic operating frequency. Frequency range is 500kHz to 1000kHz, however it is only practical to use say 650kHz to 850kHz due to the narrow bandwidth of the acoustic receiver.

    -
    §number_of_samples: u16

    Number of samples per reflected signal

    -
    §start_angle: u16

    Head angle to begin scan sector for autoscan in gradians (0~399 = 0~360 degrees).

    -
    §stop_angle: u16

    Head angle to end scan sector for autoscan in gradians (0~399 = 0~360 degrees).

    -
    §num_steps: u8

    Number of 0.9 degree motor steps between pings for auto scan (1~10 = 0.9~9.0 degrees)

    -
    §delay: u8

    An additional delay between successive transmit pulses (0~100 ms). This may be necessary for some programs to avoid collisions on the RS485 USRT.

    -

    Trait Implementations§

    source§

    impl Clone for AutoTransmitStruct

    source§

    fn clone(&self) -> AutoTransmitStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for AutoTransmitStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for AutoTransmitStruct

    source§

    fn default() -> AutoTransmitStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for AutoTransmitStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for AutoTransmitStruct

    source§

    fn eq(&self, other: &AutoTransmitStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for AutoTransmitStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for AutoTransmitStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §mode: u8

    Operating mode (1 for Ping360)

    +
    §gain_setting: u8

    Analog gain setting (0 = low, 1 = normal, 2 = high)

    +
    §transmit_duration: u16

    Acoustic transmission duration (1~1000 microseconds)

    +
    §sample_period: u16

    Time interval between individual signal intensity samples in 25nsec increments (80 to 40000 == 2 microseconds to 1000 microseconds)

    +
    §transmit_frequency: u16

    Acoustic operating frequency. Frequency range is 500kHz to 1000kHz, however it is only practical to use say 650kHz to 850kHz due to the narrow bandwidth of the acoustic receiver.

    +
    §number_of_samples: u16

    Number of samples per reflected signal

    +
    §start_angle: u16

    Head angle to begin scan sector for autoscan in gradians (0~399 = 0~360 degrees).

    +
    §stop_angle: u16

    Head angle to end scan sector for autoscan in gradians (0~399 = 0~360 degrees).

    +
    §num_steps: u8

    Number of 0.9 degree motor steps between pings for auto scan (1~10 = 0.9~9.0 degrees)

    +
    §delay: u8

    An additional delay between successive transmit pulses (0~100 ms). This may be necessary for some programs to avoid collisions on the RS485 USRT.

    +

    Trait Implementations§

    source§

    impl Clone for AutoTransmitStruct

    source§

    fn clone(&self) -> AutoTransmitStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for AutoTransmitStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for AutoTransmitStruct

    source§

    fn default() -> AutoTransmitStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for AutoTransmitStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for AutoTransmitStruct

    source§

    fn eq(&self, other: &AutoTransmitStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for AutoTransmitStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for AutoTransmitStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping360/struct.DeviceDataStruct.html b/ping_rs/ping360/struct.DeviceDataStruct.html index 1162223b3..6a778ca23 100644 --- a/ping_rs/ping360/struct.DeviceDataStruct.html +++ b/ping_rs/ping360/struct.DeviceDataStruct.html @@ -1,33 +1,34 @@ -DeviceDataStruct in ping_rs::ping360 - Rust
    pub struct DeviceDataStruct {
    -    pub mode: u8,
    -    pub gain_setting: u8,
    -    pub angle: u16,
    -    pub transmit_duration: u16,
    -    pub sample_period: u16,
    -    pub transmit_frequency: u16,
    -    pub number_of_samples: u16,
    -    pub data_length: u16,
    -    pub data: Vec<u8>,
    +DeviceDataStruct in ping_rs::ping360 - Rust
    +    
    pub struct DeviceDataStruct {
    +    pub mode: u8,
    +    pub gain_setting: u8,
    +    pub angle: u16,
    +    pub transmit_duration: u16,
    +    pub sample_period: u16,
    +    pub transmit_frequency: u16,
    +    pub number_of_samples: u16,
    +    pub data_length: u16,
    +    pub data: Vec<u8>,
     }
    Expand description

    This message is used to communicate the current sonar state. If the data field is populated, the other fields indicate the sonar state when the data was captured. The time taken before the response to the command is sent depends on the difference between the last angle scanned and the new angle in the parameters as well as the number of samples and sample interval (range). To allow for the worst case reponse time the command timeout should be set to 4000 msec.

    -

    Fields§

    §mode: u8

    Operating mode (1 for Ping360)

    -
    §gain_setting: u8

    Analog gain setting (0 = low, 1 = normal, 2 = high)

    -
    §angle: u16

    Head angle

    -
    §transmit_duration: u16

    Acoustic transmission duration (1~1000 microseconds)

    -
    §sample_period: u16

    Time interval between individual signal intensity samples in 25nsec increments (80 to 40000 == 2 microseconds to 1000 microseconds)

    -
    §transmit_frequency: u16

    Acoustic operating frequency. Frequency range is 500kHz to 1000kHz, however it is only practical to use say 650kHz to 850kHz due to the narrow bandwidth of the acoustic receiver.

    -
    §number_of_samples: u16

    Number of samples per reflected signal

    -
    §data_length: u16

    8 bit binary data array representing sonar echo strength

    -
    §data: Vec<u8>

    Trait Implementations§

    source§

    impl Clone for DeviceDataStruct

    source§

    fn clone(&self) -> DeviceDataStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for DeviceDataStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for DeviceDataStruct

    source§

    fn default() -> DeviceDataStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for DeviceDataStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for DeviceDataStruct

    source§

    fn eq(&self, other: &DeviceDataStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for DeviceDataStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for DeviceDataStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §mode: u8

    Operating mode (1 for Ping360)

    +
    §gain_setting: u8

    Analog gain setting (0 = low, 1 = normal, 2 = high)

    +
    §angle: u16

    Head angle

    +
    §transmit_duration: u16

    Acoustic transmission duration (1~1000 microseconds)

    +
    §sample_period: u16

    Time interval between individual signal intensity samples in 25nsec increments (80 to 40000 == 2 microseconds to 1000 microseconds)

    +
    §transmit_frequency: u16

    Acoustic operating frequency. Frequency range is 500kHz to 1000kHz, however it is only practical to use say 650kHz to 850kHz due to the narrow bandwidth of the acoustic receiver.

    +
    §number_of_samples: u16

    Number of samples per reflected signal

    +
    §data_length: u16

    8 bit binary data array representing sonar echo strength

    +
    §data: Vec<u8>

    Trait Implementations§

    source§

    impl Clone for DeviceDataStruct

    source§

    fn clone(&self) -> DeviceDataStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for DeviceDataStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for DeviceDataStruct

    source§

    fn default() -> DeviceDataStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for DeviceDataStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for DeviceDataStruct

    source§

    fn eq(&self, other: &DeviceDataStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for DeviceDataStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for DeviceDataStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping360/struct.DeviceIdStruct.html b/ping_rs/ping360/struct.DeviceIdStruct.html index 4eb1479dd..0bd3a21b6 100644 --- a/ping_rs/ping360/struct.DeviceIdStruct.html +++ b/ping_rs/ping360/struct.DeviceIdStruct.html @@ -1,20 +1,21 @@ -DeviceIdStruct in ping_rs::ping360 - Rust
    pub struct DeviceIdStruct {
    -    pub id: u8,
    -    pub reserved: u8,
    +DeviceIdStruct in ping_rs::ping360 - Rust
    +    
    pub struct DeviceIdStruct {
    +    pub id: u8,
    +    pub reserved: u8,
     }
    Expand description

    Change the device id

    -

    Fields§

    §id: u8

    Device ID (1-254). 0 and 255 are reserved.

    -
    §reserved: u8

    reserved

    -

    Trait Implementations§

    source§

    impl Clone for DeviceIdStruct

    source§

    fn clone(&self) -> DeviceIdStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for DeviceIdStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for DeviceIdStruct

    source§

    fn default() -> DeviceIdStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for DeviceIdStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for DeviceIdStruct

    source§

    fn eq(&self, other: &DeviceIdStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for DeviceIdStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for DeviceIdStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §id: u8

    Device ID (1-254). 0 and 255 are reserved.

    +
    §reserved: u8

    reserved

    +

    Trait Implementations§

    source§

    impl Clone for DeviceIdStruct

    source§

    fn clone(&self) -> DeviceIdStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for DeviceIdStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for DeviceIdStruct

    source§

    fn default() -> DeviceIdStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for DeviceIdStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for DeviceIdStruct

    source§

    fn eq(&self, other: &DeviceIdStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for DeviceIdStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for DeviceIdStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping360/struct.MotorOffStruct.html b/ping_rs/ping360/struct.MotorOffStruct.html index 15edd8d10..38f278a23 100644 --- a/ping_rs/ping360/struct.MotorOffStruct.html +++ b/ping_rs/ping360/struct.MotorOffStruct.html @@ -1,15 +1,16 @@ -MotorOffStruct in ping_rs::ping360 - Rust
    pub struct MotorOffStruct {}
    Expand description

    The sonar switches the current through the stepper motor windings off to save power. The sonar will send an ack message in response. The command timeout should be set to 50 msec. If the sonar is idle (not scanning) for more than 30 seconds then the motor current will automatically turn off. When the user sends any command that involves moving the transducer then the motor current is automatically re-enabled.

    -

    Trait Implementations§

    source§

    impl Clone for MotorOffStruct

    source§

    fn clone(&self) -> MotorOffStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for MotorOffStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for MotorOffStruct

    source§

    fn default() -> MotorOffStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for MotorOffStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for MotorOffStruct

    source§

    fn eq(&self, other: &MotorOffStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for MotorOffStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for MotorOffStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +MotorOffStruct in ping_rs::ping360 - Rust +
    pub struct MotorOffStruct {}
    Expand description

    The sonar switches the current through the stepper motor windings off to save power. The sonar will send an ack message in response. The command timeout should be set to 50 msec. If the sonar is idle (not scanning) for more than 30 seconds then the motor current will automatically turn off. When the user sends any command that involves moving the transducer then the motor current is automatically re-enabled.

    +

    Trait Implementations§

    source§

    impl Clone for MotorOffStruct

    source§

    fn clone(&self) -> MotorOffStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for MotorOffStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for MotorOffStruct

    source§

    fn default() -> MotorOffStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for MotorOffStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for MotorOffStruct

    source§

    fn eq(&self, other: &MotorOffStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for MotorOffStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for MotorOffStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping360/struct.PingProtocolHead.html b/ping_rs/ping360/struct.PingProtocolHead.html index 1f1e86854..61b60c494 100644 --- a/ping_rs/ping360/struct.PingProtocolHead.html +++ b/ping_rs/ping360/struct.PingProtocolHead.html @@ -1,17 +1,18 @@ -PingProtocolHead in ping_rs::ping360 - Rust
    pub struct PingProtocolHead {
    -    pub source_device_id: u8,
    -    pub destiny_device_id: u8,
    -}

    Fields§

    §source_device_id: u8§destiny_device_id: u8

    Trait Implementations§

    source§

    impl Clone for PingProtocolHead

    source§

    fn clone(&self) -> PingProtocolHead

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for PingProtocolHead

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for PingProtocolHead

    source§

    fn default() -> PingProtocolHead

    Returns the “default value” for a type. Read more
    source§

    impl PartialEq for PingProtocolHead

    source§

    fn eq(&self, other: &PingProtocolHead) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl StructuralPartialEq for PingProtocolHead

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +PingProtocolHead in ping_rs::ping360 - Rust +
    pub struct PingProtocolHead {
    +    pub source_device_id: u8,
    +    pub destiny_device_id: u8,
    +}

    Fields§

    §source_device_id: u8§destiny_device_id: u8

    Trait Implementations§

    source§

    impl Clone for PingProtocolHead

    source§

    fn clone(&self) -> PingProtocolHead

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for PingProtocolHead

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for PingProtocolHead

    source§

    fn default() -> PingProtocolHead

    Returns the “default value” for a type. Read more
    source§

    impl PartialEq for PingProtocolHead

    source§

    fn eq(&self, other: &PingProtocolHead) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl StructuralPartialEq for PingProtocolHead

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping360/struct.ResetStruct.html b/ping_rs/ping360/struct.ResetStruct.html index 662b7fd1d..e297f4428 100644 --- a/ping_rs/ping360/struct.ResetStruct.html +++ b/ping_rs/ping360/struct.ResetStruct.html @@ -1,20 +1,21 @@ -ResetStruct in ping_rs::ping360 - Rust
    pub struct ResetStruct {
    -    pub bootloader: u8,
    -    pub reserved: u8,
    +ResetStruct in ping_rs::ping360 - Rust
    +    
    pub struct ResetStruct {
    +    pub bootloader: u8,
    +    pub reserved: u8,
     }
    Expand description

    Reset the sonar. The bootloader may run depending on the selection according to the bootloader payload field. When the bootloader runs, the external LED flashes at 5Hz. If the bootloader is not contacted within 5 seconds, it will run the current program. If there is no program, then the bootloader will wait forever for a connection. Note that if you issue a reset then you will have to close all your open comm ports and go back to issuing either a discovery message for UDP or go through the break sequence for serial comms before you can talk to the sonar again.

    -

    Fields§

    §bootloader: u8

    0 = skip bootloader; 1 = run bootloader

    -
    §reserved: u8

    reserved

    -

    Trait Implementations§

    source§

    impl Clone for ResetStruct

    source§

    fn clone(&self) -> ResetStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for ResetStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for ResetStruct

    source§

    fn default() -> ResetStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for ResetStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for ResetStruct

    source§

    fn eq(&self, other: &ResetStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for ResetStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for ResetStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §bootloader: u8

    0 = skip bootloader; 1 = run bootloader

    +
    §reserved: u8

    reserved

    +

    Trait Implementations§

    source§

    impl Clone for ResetStruct

    source§

    fn clone(&self) -> ResetStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for ResetStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for ResetStruct

    source§

    fn default() -> ResetStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for ResetStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for ResetStruct

    source§

    fn eq(&self, other: &ResetStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for ResetStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for ResetStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/ping_rs/ping360/struct.TransducerStruct.html b/ping_rs/ping360/struct.TransducerStruct.html index f79aaded9..0fe4863f4 100644 --- a/ping_rs/ping360/struct.TransducerStruct.html +++ b/ping_rs/ping360/struct.TransducerStruct.html @@ -1,34 +1,35 @@ -TransducerStruct in ping_rs::ping360 - Rust
    pub struct TransducerStruct {
    -    pub mode: u8,
    -    pub gain_setting: u8,
    -    pub angle: u16,
    -    pub transmit_duration: u16,
    -    pub sample_period: u16,
    -    pub transmit_frequency: u16,
    -    pub number_of_samples: u16,
    -    pub transmit: u8,
    -    pub reserved: u8,
    +TransducerStruct in ping_rs::ping360 - Rust
    +    
    pub struct TransducerStruct {
    +    pub mode: u8,
    +    pub gain_setting: u8,
    +    pub angle: u16,
    +    pub transmit_duration: u16,
    +    pub sample_period: u16,
    +    pub transmit_frequency: u16,
    +    pub number_of_samples: u16,
    +    pub transmit: u8,
    +    pub reserved: u8,
     }
    Expand description

    The transducer will apply the commanded settings. The sonar will reply with a ping360_data message. If the transmit field is 0, the sonar will not transmit after locating the transducer, and the data field in the ping360_data message reply will be empty. If the transmit field is 1, the sonar will make an acoustic transmission after locating the transducer, and the resulting data will be uploaded in the data field of the ping360_data message reply. To allow for the worst case reponse time the command timeout should be set to 4000 msec.

    -

    Fields§

    §mode: u8

    Operating mode (1 for Ping360)

    -
    §gain_setting: u8

    Analog gain setting (0 = low, 1 = normal, 2 = high)

    -
    §angle: u16

    Head angle

    -
    §transmit_duration: u16

    Acoustic transmission duration (1~1000 microseconds)

    -
    §sample_period: u16

    Time interval between individual signal intensity samples in 25nsec increments (80 to 40000 == 2 microseconds to 1000 microseconds)

    -
    §transmit_frequency: u16

    Acoustic operating frequency. Frequency range is 500kHz to 1000kHz, however it is only practical to use say 650kHz to 850kHz due to the narrow bandwidth of the acoustic receiver.

    -
    §number_of_samples: u16

    Number of samples per reflected signal

    -
    §transmit: u8

    0 = do not transmit; 1 = transmit after the transducer has reached the specified angle

    -
    §reserved: u8

    reserved

    -

    Trait Implementations§

    source§

    impl Clone for TransducerStruct

    source§

    fn clone(&self) -> TransducerStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for TransducerStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for TransducerStruct

    source§

    fn default() -> TransducerStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for TransducerStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for TransducerStruct

    source§

    fn eq(&self, other: &TransducerStruct) -> bool

    This method tests for self and other values to be equal, and is used -by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for TransducerStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for TransducerStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for Twhere - T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for Twhere - T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for Twhere - T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    source§

    impl<T, U> Into<U> for Twhere - U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    +

    Fields§

    §mode: u8

    Operating mode (1 for Ping360)

    +
    §gain_setting: u8

    Analog gain setting (0 = low, 1 = normal, 2 = high)

    +
    §angle: u16

    Head angle

    +
    §transmit_duration: u16

    Acoustic transmission duration (1~1000 microseconds)

    +
    §sample_period: u16

    Time interval between individual signal intensity samples in 25nsec increments (80 to 40000 == 2 microseconds to 1000 microseconds)

    +
    §transmit_frequency: u16

    Acoustic operating frequency. Frequency range is 500kHz to 1000kHz, however it is only practical to use say 650kHz to 850kHz due to the narrow bandwidth of the acoustic receiver.

    +
    §number_of_samples: u16

    Number of samples per reflected signal

    +
    §transmit: u8

    0 = do not transmit; 1 = transmit after the transducer has reached the specified angle

    +
    §reserved: u8

    reserved

    +

    Trait Implementations§

    source§

    impl Clone for TransducerStruct

    source§

    fn clone(&self) -> TransducerStruct

    Returns a copy of the value. Read more
    1.0.0 · source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    source§

    impl Debug for TransducerStruct

    source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    source§

    impl Default for TransducerStruct

    source§

    fn default() -> TransducerStruct

    Returns the “default value” for a type. Read more
    source§

    impl DeserializePayload for TransducerStruct

    source§

    fn deserialize(payload: &[u8]) -> Self

    source§

    impl PartialEq for TransducerStruct

    source§

    fn eq(&self, other: &TransducerStruct) -> bool

    This method tests for self and other values to be equal, and is used +by ==.
    1.0.0 · source§

    fn ne(&self, other: &Rhs) -> bool

    This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
    source§

    impl SerializePayload for TransducerStruct

    source§

    fn serialize(&self) -> Vec<u8>

    source§

    impl StructuralPartialEq for TransducerStruct

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + T: 'static + ?Sized,

    source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    source§

    impl<T> Borrow<T> for T
    where + T: ?Sized,

    source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    source§

    impl<T> BorrowMut<T> for T
    where + T: ?Sized,

    source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    source§

    impl<T> From<T> for T

    source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    source§

    impl<T, U> Into<U> for T
    where + U: From<T>,

    source§

    fn into(self) -> U

    Calls U::from(self).

    That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

    -
    source§

    impl<T> ToOwned for Twhere - T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for Twhere - U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for Twhere - U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file +From<T> for U chooses to do.

    +
    source§

    impl<T> ToOwned for T
    where + T: Clone,

    §

    type Owned = T

    The resulting type after obtaining ownership.
    source§

    fn to_owned(&self) -> T

    Creates owned data from borrowed data, usually by cloning. Read more
    source§

    fn clone_into(&self, target: &mut T)

    Uses borrowed data to replace owned data, usually by cloning. Read more
    source§

    impl<T, U> TryFrom<U> for T
    where + U: Into<T>,

    §

    type Error = Infallible

    The type returned in the event of a conversion error.
    source§

    fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

    Performs the conversion.
    source§

    impl<T, U> TryInto<U> for T
    where + U: TryFrom<T>,

    §

    type Error = <U as TryFrom<T>>::Error

    The type returned in the event of a conversion error.
    source§

    fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

    Performs the conversion.
    \ No newline at end of file diff --git a/search-index.js b/search-index.js index d12cca4ca..23a767b62 100644 --- a/search-index.js +++ b/search-index.js @@ -1,6 +1,6 @@ -var searchIndex = JSON.parse('{\ -"bytes":{"doc":"Provides abstractions for working with bytes.","t":"CCDDLLLLLLLLLLLLLALLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLIIDDDDDDDKLLKLLLLLLLLLLLLLLLLLLLLLLKLLKLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLKLLKLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL","n":["Buf","BufMut","Bytes","BytesMut","advance","advance","advance_mut","as_mut","as_ref","as_ref","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","buf","capacity","chunk","chunk","chunk_mut","clear","clear","clone","clone","clone_into","clone_into","cmp","cmp","copy_from_slice","copy_to_bytes","copy_to_bytes","default","default","deref","deref","deref_mut","drop","drop","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","extend","extend","extend","extend_from_slice","fmt","fmt","fmt","fmt","fmt","fmt","freeze","from","from","from","from","from","from","from","from","from","from","from_iter","from_iter","from_iter","from_static","hash","hash","into","into","into_iter","into_iter","into_iter","into_iter","is_empty","is_empty","len","len","new","new","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","put","put_bytes","put_slice","remaining","remaining","remaining_mut","reserve","resize","set_len","slice","slice_ref","spare_capacity_mut","split","split_off","split_off","split_to","split_to","to_owned","to_owned","truncate","truncate","try_from","try_from","try_into","try_into","type_id","type_id","unsplit","with_capacity","write_fmt","write_str","zeroed","Buf","BufMut","Chain","IntoIter","Limit","Reader","Take","UninitSlice","Writer","advance","advance","advance","advance_mut","advance_mut","advance_mut","as_mut_ptr","as_uninit_slice_mut","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","chain","chain","chain_mut","chain_mut","chunk","chunk","chunk","chunk_mut","chunk_mut","chunk_mut","chunks_vectored","chunks_vectored","chunks_vectored","consume","copy_from_slice","copy_to_bytes","copy_to_bytes","copy_to_bytes","copy_to_bytes","copy_to_slice","copy_to_slice","fill_buf","first_mut","first_ref","flush","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from_raw_parts_mut","get_f32","get_f32","get_f32_le","get_f32_le","get_f32_ne","get_f32_ne","get_f64","get_f64","get_f64_le","get_f64_le","get_f64_ne","get_f64_ne","get_i128","get_i128","get_i128_le","get_i128_le","get_i128_ne","get_i128_ne","get_i16","get_i16","get_i16_le","get_i16_le","get_i16_ne","get_i16_ne","get_i32","get_i32","get_i32_le","get_i32_le","get_i32_ne","get_i32_ne","get_i64","get_i64","get_i64_le","get_i64_le","get_i64_ne","get_i64_ne","get_i8","get_i8","get_int","get_int","get_int_le","get_int_le","get_int_ne","get_int_ne","get_mut","get_mut","get_mut","get_mut","get_mut","get_ref","get_ref","get_ref","get_ref","get_ref","get_u128","get_u128","get_u128_le","get_u128_le","get_u128_ne","get_u128_ne","get_u16","get_u16","get_u16_le","get_u16_le","get_u16_ne","get_u16_ne","get_u32","get_u32","get_u32_le","get_u32_le","get_u32_ne","get_u32_ne","get_u64","get_u64","get_u64_le","get_u64_le","get_u64_ne","get_u64_ne","get_u8","get_u8","get_uint","get_uint","get_uint_le","get_uint_le","get_uint_ne","get_uint_ne","has_remaining","has_remaining","has_remaining_mut","has_remaining_mut","index","index","index","index","index","index","index_mut","index_mut","index_mut","index_mut","index_mut","index_mut","into","into","into","into","into","into","into_inner","into_inner","into_inner","into_inner","into_inner","into_inner","into_iter","into_iter","last_mut","last_ref","len","limit","limit","limit","limit","new","new","next","put","put","put_bytes","put_bytes","put_f32","put_f32","put_f32_le","put_f32_le","put_f32_ne","put_f32_ne","put_f64","put_f64","put_f64_le","put_f64_le","put_f64_ne","put_f64_ne","put_i128","put_i128","put_i128_le","put_i128_le","put_i128_ne","put_i128_ne","put_i16","put_i16","put_i16_le","put_i16_le","put_i16_ne","put_i16_ne","put_i32","put_i32","put_i32_le","put_i32_le","put_i32_ne","put_i32_ne","put_i64","put_i64","put_i64_le","put_i64_le","put_i64_ne","put_i64_ne","put_i8","put_i8","put_int","put_int","put_int_le","put_int_le","put_int_ne","put_int_ne","put_slice","put_slice","put_u128","put_u128","put_u128_le","put_u128_le","put_u128_ne","put_u128_ne","put_u16","put_u16","put_u16_le","put_u16_le","put_u16_ne","put_u16_ne","put_u32","put_u32","put_u32_le","put_u32_le","put_u32_ne","put_u32_ne","put_u64","put_u64","put_u64_le","put_u64_le","put_u64_ne","put_u64_ne","put_u8","put_u8","put_uint","put_uint","put_uint_le","put_uint_le","put_uint_ne","put_uint_ne","read","reader","reader","remaining","remaining","remaining","remaining_mut","remaining_mut","remaining_mut","set_limit","set_limit","size_hint","take","take","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","uninit","write","write_byte","writer","writer"],"q":[[0,"bytes"],[137,"bytes::buf"],[455,"core::cmp"],[456,"alloc::vec"],[457,"core::marker"],[458,"alloc::string"],[459,"core::iter::traits::collect"],[460,"core::fmt"],[461,"core::fmt"],[462,"core::hash"],[463,"core::option"],[464,"core::ops::range"],[465,"core::mem::maybe_uninit"],[466,"core::result"],[467,"core::any"],[468,"core::fmt"],[469,"std::io::error"],[470,"core::fmt"]],"d":["","","A cheaply cloneable and sliceable chunk of contiguous …","A unique reference to a contiguous slice of memory.","","","","","","","","","","","","","","Utilities for working with buffers.","Returns the number of bytes the BytesMut can hold without …","","","","Clears the buffer, removing all data.","Clears the buffer, removing all data. Existing capacity is …","","","","","","","Creates Bytes instance from slice, by copying it.","","","","","","","","","","","","","","","","","","","","","","","","","","","Appends given bytes to this BytesMut.","","","","","","","Converts self into an immutable Bytes.","","","","Returns the argument unchanged.","","","","","","Returns the argument unchanged.","","","","Creates a new Bytes from a static slice.","","","Calls U::from(self).","Calls U::from(self).","","","","","Returns true if the Bytes has a length of 0.","Returns true if the BytesMut has a length of 0.","Returns the number of bytes contained in this Bytes.","Returns the number of bytes contained in this BytesMut.","Creates a new empty Bytes.","Creates a new BytesMut with default capacity.","","","","","","","","","","","","","","","","","","","Reserves capacity for at least additional more bytes to be …","Resizes the buffer so that len is equal to new_len.","Sets the length of the buffer.","Returns a slice of self for the provided range.","Returns a slice of self that is equivalent to the given …","Returns the remaining spare capacity of the buffer as a …","Removes the bytes from the current view, returning them in …","Splits the bytes into two at the given index.","Splits the bytes into two at the given index.","Splits the bytes into two at the given index.","Splits the buffer into two at the given index.","","","Shortens the buffer, keeping the first len bytes and …","Shortens the buffer, keeping the first len bytes and …","","","","","","","Absorbs a BytesMut that was previously split off.","Creates a new BytesMut with the specified capacity.","","","Creates a new BytesMut, which is initialized with zero.","Read bytes from a buffer.","A trait for values that provide sequential write access to …","A Chain sequences two buffers.","Iterator over the bytes contained by the buffer.","A BufMut adapter which limits the amount of bytes that can …","A Buf adapter which implements io::Read for the inner …","A Buf adapter which limits the bytes read from an …","Uninitialized byte slice.","A BufMut adapter which implements io::Write for the inner …","Advance the internal cursor of the Buf","","","Advance the internal cursor of the BufMut","","","Return a raw pointer to the slice’s buffer.","Return a &mut [MaybeUninit<u8>] to this slice’s buffer.","","","","","","","","","","","","","","","Creates an adaptor which will chain this buffer with …","Creates an adaptor which will chain this buffer with …","Creates an adapter which will chain this buffer with …","Creates an adapter which will chain this buffer with …","Returns a slice starting at the current position and of …","","","Returns a mutable slice starting at the current BufMut …","","","Fills dst with potentially multiple slices starting at self…","Fills dst with potentially multiple slices starting at self…","","","Copies bytes from src into self.","Consumes len bytes inside self and returns new instance of …","Consumes len bytes inside self and returns new instance of …","","","Copies bytes from self into dst.","Copies bytes from self into dst.","","Gets a mutable reference to the first underlying Buf.","Gets a reference to the first underlying Buf.","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Create a &mut UninitSlice from a pointer and a length.","Gets an IEEE754 single-precision (4 bytes) floating point …","Gets an IEEE754 single-precision (4 bytes) floating point …","Gets an IEEE754 single-precision (4 bytes) floating point …","Gets an IEEE754 single-precision (4 bytes) floating point …","Gets an IEEE754 single-precision (4 bytes) floating point …","Gets an IEEE754 single-precision (4 bytes) floating point …","Gets an IEEE754 double-precision (8 bytes) floating point …","Gets an IEEE754 double-precision (8 bytes) floating point …","Gets an IEEE754 double-precision (8 bytes) floating point …","Gets an IEEE754 double-precision (8 bytes) floating point …","Gets an IEEE754 double-precision (8 bytes) floating point …","Gets an IEEE754 double-precision (8 bytes) floating point …","Gets a signed 128 bit integer from self in big-endian byte …","Gets a signed 128 bit integer from self in big-endian byte …","Gets a signed 128 bit integer from self in little-endian …","Gets a signed 128 bit integer from self in little-endian …","Gets a signed 128 bit integer from self in native-endian …","Gets a signed 128 bit integer from self in native-endian …","Gets a signed 16 bit integer from self in big-endian byte …","Gets a signed 16 bit integer from self in big-endian byte …","Gets a signed 16 bit integer from self in little-endian …","Gets a signed 16 bit integer from self in little-endian …","Gets a signed 16 bit integer from self in native-endian …","Gets a signed 16 bit integer from self in native-endian …","Gets a signed 32 bit integer from self in big-endian byte …","Gets a signed 32 bit integer from self in big-endian byte …","Gets a signed 32 bit integer from self in little-endian …","Gets a signed 32 bit integer from self in little-endian …","Gets a signed 32 bit integer from self in native-endian …","Gets a signed 32 bit integer from self in native-endian …","Gets a signed 64 bit integer from self in big-endian byte …","Gets a signed 64 bit integer from self in big-endian byte …","Gets a signed 64 bit integer from self in little-endian …","Gets a signed 64 bit integer from self in little-endian …","Gets a signed 64 bit integer from self in native-endian …","Gets a signed 64 bit integer from self in native-endian …","Gets a signed 8 bit integer from self.","Gets a signed 8 bit integer from self.","Gets a signed n-byte integer from self in big-endian byte …","Gets a signed n-byte integer from self in big-endian byte …","Gets a signed n-byte integer from self in little-endian …","Gets a signed n-byte integer from self in little-endian …","Gets a signed n-byte integer from self in native-endian …","Gets a signed n-byte integer from self in native-endian …","Gets a mutable reference to the underlying Buf.","Gets a mutable reference to the underlying BufMut.","Gets a mutable reference to the underlying Buf.","Gets a mutable reference to the underlying Buf.","Gets a mutable reference to the underlying BufMut.","Gets a reference to the underlying Buf.","Gets a reference to the underlying BufMut.","Gets a reference to the underlying Buf.","Gets a reference to the underlying Buf.","Gets a reference to the underlying BufMut.","Gets an unsigned 128 bit integer from self in big-endian …","Gets an unsigned 128 bit integer from self in big-endian …","Gets an unsigned 128 bit integer from self in …","Gets an unsigned 128 bit integer from self in …","Gets an unsigned 128 bit integer from self in …","Gets an unsigned 128 bit integer from self in …","Gets an unsigned 16 bit integer from self in big-endian …","Gets an unsigned 16 bit integer from self in big-endian …","Gets an unsigned 16 bit integer from self in little-endian …","Gets an unsigned 16 bit integer from self in little-endian …","Gets an unsigned 16 bit integer from self in native-endian …","Gets an unsigned 16 bit integer from self in native-endian …","Gets an unsigned 32 bit integer from self in the …","Gets an unsigned 32 bit integer from self in the …","Gets an unsigned 32 bit integer from self in the …","Gets an unsigned 32 bit integer from self in the …","Gets an unsigned 32 bit integer from self in native-endian …","Gets an unsigned 32 bit integer from self in native-endian …","Gets an unsigned 64 bit integer from self in big-endian …","Gets an unsigned 64 bit integer from self in big-endian …","Gets an unsigned 64 bit integer from self in little-endian …","Gets an unsigned 64 bit integer from self in little-endian …","Gets an unsigned 64 bit integer from self in native-endian …","Gets an unsigned 64 bit integer from self in native-endian …","Gets an unsigned 8 bit integer from self.","Gets an unsigned 8 bit integer from self.","Gets an unsigned n-byte integer from self in big-endian …","Gets an unsigned n-byte integer from self in big-endian …","Gets an unsigned n-byte integer from self in little-endian …","Gets an unsigned n-byte integer from self in little-endian …","Gets an unsigned n-byte integer from self in native-endian …","Gets an unsigned n-byte integer from self in native-endian …","Returns true if there are any more bytes to consume","Returns true if there are any more bytes to consume","Returns true if there is space in self for more bytes.","Returns true if there is space in self for more bytes.","","","","","","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Consumes this Chain, returning the underlying values.","Consumes this IntoIter, returning the underlying value.","Consumes this Limit, returning the underlying value.","Consumes this Reader, returning the underlying value.","Consumes this Take, returning the underlying value.","Consumes this Writer, returning the underlying value.","","","Gets a mutable reference to the last underlying Buf.","Gets a reference to the last underlying Buf.","Returns the number of bytes in the slice.","Creates an adaptor which can write at most limit bytes to …","Creates an adaptor which can write at most limit bytes to …","Returns the maximum number of bytes that can be written","Returns the maximum number of bytes that can be read.","Creates a &mut UninitSlice wrapping a slice of initialised …","Creates an iterator over the bytes contained by the buffer.","","Transfer bytes into self from src and advance the cursor …","Transfer bytes into self from src and advance the cursor …","Put cnt bytes val into self.","Put cnt bytes val into self.","Writes an IEEE754 single-precision (4 bytes) floating …","Writes an IEEE754 single-precision (4 bytes) floating …","Writes an IEEE754 single-precision (4 bytes) floating …","Writes an IEEE754 single-precision (4 bytes) floating …","Writes an IEEE754 single-precision (4 bytes) floating …","Writes an IEEE754 single-precision (4 bytes) floating …","Writes an IEEE754 double-precision (8 bytes) floating …","Writes an IEEE754 double-precision (8 bytes) floating …","Writes an IEEE754 double-precision (8 bytes) floating …","Writes an IEEE754 double-precision (8 bytes) floating …","Writes an IEEE754 double-precision (8 bytes) floating …","Writes an IEEE754 double-precision (8 bytes) floating …","Writes a signed 128 bit integer to self in the big-endian …","Writes a signed 128 bit integer to self in the big-endian …","Writes a signed 128 bit integer to self in little-endian …","Writes a signed 128 bit integer to self in little-endian …","Writes a signed 128 bit integer to self in native-endian …","Writes a signed 128 bit integer to self in native-endian …","Writes a signed 16 bit integer to self in big-endian byte …","Writes a signed 16 bit integer to self in big-endian byte …","Writes a signed 16 bit integer to self in little-endian …","Writes a signed 16 bit integer to self in little-endian …","Writes a signed 16 bit integer to self in native-endian …","Writes a signed 16 bit integer to self in native-endian …","Writes a signed 32 bit integer to self in big-endian byte …","Writes a signed 32 bit integer to self in big-endian byte …","Writes a signed 32 bit integer to self in little-endian …","Writes a signed 32 bit integer to self in little-endian …","Writes a signed 32 bit integer to self in native-endian …","Writes a signed 32 bit integer to self in native-endian …","Writes a signed 64 bit integer to self in the big-endian …","Writes a signed 64 bit integer to self in the big-endian …","Writes a signed 64 bit integer to self in little-endian …","Writes a signed 64 bit integer to self in little-endian …","Writes a signed 64 bit integer to self in native-endian …","Writes a signed 64 bit integer to self in native-endian …","Writes a signed 8 bit integer to self.","Writes a signed 8 bit integer to self.","Writes low nbytes of a signed integer to self in …","Writes low nbytes of a signed integer to self in …","Writes low nbytes of a signed integer to self in …","Writes low nbytes of a signed integer to self in …","Writes low nbytes of a signed integer to self in …","Writes low nbytes of a signed integer to self in …","Transfer bytes into self from src and advance the cursor …","Transfer bytes into self from src and advance the cursor …","Writes an unsigned 128 bit integer to self in the …","Writes an unsigned 128 bit integer to self in the …","Writes an unsigned 128 bit integer to self in …","Writes an unsigned 128 bit integer to self in …","Writes an unsigned 128 bit integer to self in …","Writes an unsigned 128 bit integer to self in …","Writes an unsigned 16 bit integer to self in big-endian …","Writes an unsigned 16 bit integer to self in big-endian …","Writes an unsigned 16 bit integer to self in little-endian …","Writes an unsigned 16 bit integer to self in little-endian …","Writes an unsigned 16 bit integer to self in native-endian …","Writes an unsigned 16 bit integer to self in native-endian …","Writes an unsigned 32 bit integer to self in big-endian …","Writes an unsigned 32 bit integer to self in big-endian …","Writes an unsigned 32 bit integer to self in little-endian …","Writes an unsigned 32 bit integer to self in little-endian …","Writes an unsigned 32 bit integer to self in native-endian …","Writes an unsigned 32 bit integer to self in native-endian …","Writes an unsigned 64 bit integer to self in the …","Writes an unsigned 64 bit integer to self in the …","Writes an unsigned 64 bit integer to self in little-endian …","Writes an unsigned 64 bit integer to self in little-endian …","Writes an unsigned 64 bit integer to self in native-endian …","Writes an unsigned 64 bit integer to self in native-endian …","Writes an unsigned 8 bit integer to self.","Writes an unsigned 8 bit integer to self.","Writes an unsigned n-byte integer to self in big-endian …","Writes an unsigned n-byte integer to self in big-endian …","Writes an unsigned n-byte integer to self in the …","Writes an unsigned n-byte integer to self in the …","Writes an unsigned n-byte integer to self in the …","Writes an unsigned n-byte integer to self in the …","","Creates an adaptor which implements the Read trait for self…","Creates an adaptor which implements the Read trait for self…","Returns the number of bytes between the current position …","","","Returns the number of bytes that can be written from the …","","","Sets the maximum number of bytes that can be written.","Sets the maximum number of bytes that can be read.","","Creates an adaptor which will read at most limit bytes …","Creates an adaptor which will read at most limit bytes …","","","","","","","","","","","","","","","","","","","","Creates a &mut UninitSlice wrapping a slice of …","","Write a single byte at the specified offset.","Creates an adaptor which implements the Write trait for …","Creates an adaptor which implements the Write trait for …"],"i":[0,0,0,0,1,4,4,4,1,4,1,1,4,4,1,4,4,0,4,1,4,4,1,4,1,4,1,4,1,4,1,1,4,1,4,1,4,4,1,4,1,1,1,1,1,1,1,4,4,4,4,4,4,4,4,4,4,4,1,1,1,4,4,4,4,1,1,1,1,1,1,1,4,4,4,1,4,4,1,1,4,1,4,1,1,4,4,1,4,1,4,1,4,1,1,1,1,1,1,4,4,4,4,4,4,4,4,4,1,4,4,4,4,4,1,1,4,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,20,26,27,28,26,29,7,7,7,26,35,29,31,27,33,7,26,35,29,31,27,33,20,20,28,28,20,26,27,28,26,29,20,20,26,31,7,20,20,26,27,20,20,31,26,26,33,7,26,35,29,31,27,33,7,7,26,35,29,31,27,33,7,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,35,29,31,27,33,35,29,31,27,33,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,28,28,7,7,7,7,7,7,7,7,7,7,7,7,26,35,29,31,27,33,26,35,29,31,27,33,26,35,26,26,7,28,28,29,27,7,35,35,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,31,20,20,20,26,27,28,26,29,29,27,35,20,20,26,35,29,31,27,33,26,35,29,31,27,33,7,26,35,29,31,27,33,7,33,7,28,28],"f":[0,0,0,0,[[1,2],3],[[4,2],3],[[4,2],3],[4,[[6,[5]]]],[1,[[6,[5]]]],[4,[[6,[5]]]],[-1,-2,[],[]],[1,[[6,[5]]]],[-1,-2,[],[]],[4,[[6,[5]]]],[-1,-2,[],[]],[-1,-2,[],[]],[4,[[6,[5]]]],0,[4,2],[1,[[6,[5]]]],[4,[[6,[5]]]],[4,7],[1,3],[4,3],[1,1],[4,4],[[-1,-2],3,[],[]],[[-1,-2],3,[],[]],[[1,1],8],[[4,4],8],[[[6,[5]]],1],[[1,2],1],[[4,2],1],[[],1],[[],4],[1,[[6,[5]]]],[4,[[6,[5]]]],[4,[[6,[5]]]],[1,3],[4,3],[[1,[9,[5]]],10],[[1,4],10],[[1,[6,[5]]],10],[[1,-1],10,11],[[1,12],10],[[1,1],10],[[1,13],10],[[4,13],10],[[4,1],10],[[4,[6,[5]]],10],[[4,-1],10,11],[[4,4],10],[[4,[9,[5]]],10],[[4,12],10],[[4,-1],3,14],[[4,-1],3,14],[[4,-1],3,14],[[4,[6,[5]]],3],[[1,15],16],[[1,15],16],[[1,15],16],[[4,15],16],[[4,15],16],[[4,15],16],[4,1],[[[17,[[6,[5]]]]],1],[4,1],[[[9,[5]]],1],[-1,-1,[]],[12,1],[13,1],[[[6,[5]]],1],[[[6,[5]]],4],[12,4],[-1,-1,[]],[-1,1,14],[-1,4,14],[-1,4,14],[[[6,[5]]],1],[[1,-1],3,18],[[4,-1],3,18],[-1,-2,[],[]],[-1,-2,[],[]],[1],[1],[4],[4],[1,10],[4,10],[1,2],[4,2],[[],1],[[],4],[[1,13],[[19,[8]]]],[[1,1],[[19,[8]]]],[[1,12],[[19,[8]]]],[[1,[6,[5]]],[[19,[8]]]],[[1,-1],[[19,[8]]],11],[[1,[9,[5]]],[[19,[8]]]],[[4,4],[[19,[8]]]],[[4,13],[[19,[8]]]],[[4,[9,[5]]],[[19,[8]]]],[[4,-1],[[19,[8]]],11],[[4,12],[[19,[8]]]],[[4,[6,[5]]],[[19,[8]]]],[[4,-1],3,20],[[4,5,2],3],[[4,[6,[5]]],3],[1,2],[4,2],[4,2],[[4,2],3],[[4,2,5],3],[[4,2],3],[[1,-1],1,[[21,[2]]]],[[1,[6,[5]]],1],[4,[[6,[[22,[5]]]]]],[4,4],[[1,2],1],[[4,2],4],[[1,2],1],[[4,2],4],[-1,-2,[],[]],[-1,-2,[],[]],[[1,2],3],[[4,2],3],[-1,[[23,[-2]]],[],[]],[-1,[[23,[-2]]],[],[]],[-1,[[23,[-2]]],[],[]],[-1,[[23,[-2]]],[],[]],[-1,24,[]],[-1,24,[]],[[4,4],3],[2,4],[[4,25],16],[[4,12],16],[2,4],0,0,0,0,0,0,0,0,0,[[-1,2],3,[]],[[[26,[-1,-2]],2],3,20,20],[[[27,[-1]],2],3,20],[[-1,2],3,[]],[[[26,[-1,-2]],2],3,28,28],[[[29,[-1]],2],3,28],[7,5],[7,[[6,[[22,[5]]]]]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[-1,-2],[[26,[-1,-2]]],11,20],[[-1,-2],[[26,[-1,-2]]],11,20],[[-1,-2],[[26,[-1,-2]]],11,28],[[-1,-2],[[26,[-1,-2]]],11,28],[-1,[[6,[5]]],[]],[[[26,[-1,-2]]],[[6,[5]]],20,20],[[[27,[-1]]],[[6,[5]]],20],[-1,7,[]],[[[26,[-1,-2]]],7,28,28],[[[29,[-1]]],7,28],[[-1,[6,[30]]],2,[]],[[-1,[6,[30]]],2,[]],[[[26,[-1,-2]],[6,[30]]],2,20,20],[[[31,[-1]],2],3,[20,11]],[[7,[6,[5]]],3],[[-1,2],1,[]],[[-1,2],1,[]],[[[26,[-1,-2]],2],1,20,20],[[[27,[-1]],2],1,20],[[-1,[6,[5]]],3,[]],[[-1,[6,[5]]],3,[]],[[[31,[-1]]],[[32,[[6,[5]]]]],[20,11]],[[[26,[-1,-2]]],-1,[],[]],[[[26,[-1,-2]]],-1,[],[]],[[[33,[-1]]],[[32,[3]]],[28,11]],[[7,15],16],[[[26,[-1,-2]],15],16,34,34],[[[35,[-1]],15],16,34],[[[29,[-1]],15],16,34],[[[31,[-1]],15],16,34],[[[27,[-1]],15],16,34],[[[33,[-1]],15],16,34],[[[6,[[22,[5]]]]],7],[[[6,[5]]],7],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[[5,2],7],[-1,36,[]],[-1,36,[]],[-1,36,[]],[-1,36,[]],[-1,36,[]],[-1,36,[]],[-1,37,[]],[-1,37,[]],[-1,37,[]],[-1,37,[]],[-1,37,[]],[-1,37,[]],[-1,38,[]],[-1,38,[]],[-1,38,[]],[-1,38,[]],[-1,38,[]],[-1,38,[]],[-1,39,[]],[-1,39,[]],[-1,39,[]],[-1,39,[]],[-1,39,[]],[-1,39,[]],[-1,40,[]],[-1,40,[]],[-1,40,[]],[-1,40,[]],[-1,40,[]],[-1,40,[]],[-1,41,[]],[-1,41,[]],[-1,41,[]],[-1,41,[]],[-1,41,[]],[-1,41,[]],[-1,42,[]],[-1,42,[]],[[-1,2],41,[]],[[-1,2],41,[]],[[-1,2],41,[]],[[-1,2],41,[]],[[-1,2],41,[]],[[-1,2],41,[]],[[[35,[-1]]],-1,[]],[[[29,[-1]]],-1,[]],[[[31,[-1]]],-1,20],[[[27,[-1]]],-1,[]],[[[33,[-1]]],-1,28],[[[35,[-1]]],-1,[]],[[[29,[-1]]],-1,[]],[[[31,[-1]]],-1,20],[[[27,[-1]]],-1,[]],[[[33,[-1]]],-1,28],[-1,43,[]],[-1,43,[]],[-1,43,[]],[-1,43,[]],[-1,43,[]],[-1,43,[]],[-1,44,[]],[-1,44,[]],[-1,44,[]],[-1,44,[]],[-1,44,[]],[-1,44,[]],[-1,45,[]],[-1,45,[]],[-1,45,[]],[-1,45,[]],[-1,45,[]],[-1,45,[]],[-1,46,[]],[-1,46,[]],[-1,46,[]],[-1,46,[]],[-1,46,[]],[-1,46,[]],[-1,5,[]],[-1,5,[]],[[-1,2],46,[]],[[-1,2],46,[]],[[-1,2],46,[]],[[-1,2],46,[]],[[-1,2],46,[]],[[-1,2],46,[]],[-1,10,[]],[-1,10,[]],[-1,10,[]],[-1,10,[]],[[7,[47,[2]]],7],[[7,[48,[2]]],7],[[7,[49,[2]]],7],[[7,50],7],[[7,[51,[2]]],7],[[7,[52,[2]]],7],[[7,[51,[2]]],7],[[7,[48,[2]]],7],[[7,[52,[2]]],7],[[7,[49,[2]]],7],[[7,[47,[2]]],7],[[7,50],7],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[26,[-1,-2]]],[[3,[-1,-2]]],[],[]],[[[35,[-1]]],-1,[]],[[[29,[-1]]],-1,[]],[[[31,[-1]]],-1,20],[[[27,[-1]]],-1,[]],[[[33,[-1]]],-1,28],[[[26,[-1,-2]]],[],20,20],[-1,-2,[],[]],[[[26,[-1,-2]]],-2,[],[]],[[[26,[-1,-2]]],-2,[],[]],[7,2],[[-1,2],[[29,[-1]]],11],[[-1,2],[[29,[-1]]],11],[[[29,[-1]]],2,[]],[[[27,[-1]]],2,[]],[[[6,[5]]],7],[-1,[[35,[-1]]],[]],[[[35,[-1]]],[[19,[5]]],20],[[-1,-2],3,11,20],[[-1,-2],3,11,20],[[-1,5,2],3,[]],[[-1,5,2],3,[]],[[-1,36],3,[]],[[-1,36],3,[]],[[-1,36],3,[]],[[-1,36],3,[]],[[-1,36],3,[]],[[-1,36],3,[]],[[-1,37],3,[]],[[-1,37],3,[]],[[-1,37],3,[]],[[-1,37],3,[]],[[-1,37],3,[]],[[-1,37],3,[]],[[-1,38],3,[]],[[-1,38],3,[]],[[-1,38],3,[]],[[-1,38],3,[]],[[-1,38],3,[]],[[-1,38],3,[]],[[-1,39],3,[]],[[-1,39],3,[]],[[-1,39],3,[]],[[-1,39],3,[]],[[-1,39],3,[]],[[-1,39],3,[]],[[-1,40],3,[]],[[-1,40],3,[]],[[-1,40],3,[]],[[-1,40],3,[]],[[-1,40],3,[]],[[-1,40],3,[]],[[-1,41],3,[]],[[-1,41],3,[]],[[-1,41],3,[]],[[-1,41],3,[]],[[-1,41],3,[]],[[-1,41],3,[]],[[-1,42],3,[]],[[-1,42],3,[]],[[-1,41,2],3,[]],[[-1,41,2],3,[]],[[-1,41,2],3,[]],[[-1,41,2],3,[]],[[-1,41,2],3,[]],[[-1,41,2],3,[]],[[-1,[6,[5]]],3,[]],[[-1,[6,[5]]],3,[]],[[-1,43],3,[]],[[-1,43],3,[]],[[-1,43],3,[]],[[-1,43],3,[]],[[-1,43],3,[]],[[-1,43],3,[]],[[-1,44],3,[]],[[-1,44],3,[]],[[-1,44],3,[]],[[-1,44],3,[]],[[-1,44],3,[]],[[-1,44],3,[]],[[-1,45],3,[]],[[-1,45],3,[]],[[-1,45],3,[]],[[-1,45],3,[]],[[-1,45],3,[]],[[-1,45],3,[]],[[-1,46],3,[]],[[-1,46],3,[]],[[-1,46],3,[]],[[-1,46],3,[]],[[-1,46],3,[]],[[-1,46],3,[]],[[-1,5],3,[]],[[-1,5],3,[]],[[-1,46,2],3,[]],[[-1,46,2],3,[]],[[-1,46,2],3,[]],[[-1,46,2],3,[]],[[-1,46,2],3,[]],[[-1,46,2],3,[]],[[[31,[-1]],[6,[5]]],[[32,[2]]],[20,11]],[-1,[[31,[-1]]],11],[-1,[[31,[-1]]],11],[-1,2,[]],[[[26,[-1,-2]]],2,20,20],[[[27,[-1]]],2,20],[-1,2,[]],[[[26,[-1,-2]]],2,28,28],[[[29,[-1]]],2,28],[[[29,[-1]],2],3,[]],[[[27,[-1]],2],3,[]],[[[35,[-1]]],[[3,[2,[19,[2]]]]],20],[[-1,2],[[27,[-1]]],11],[[-1,2],[[27,[-1]]],11],[-1,[[23,[-2]]],[],[]],[-1,[[23,[-2]]],[],[]],[-1,[[23,[-2]]],[],[]],[-1,[[23,[-2]]],[],[]],[-1,[[23,[-2]]],[],[]],[-1,[[23,[-2]]],[],[]],[-1,[[23,[-2]]],[],[]],[-1,[[23,[-2]]],[],[]],[-1,[[23,[-2]]],[],[]],[-1,[[23,[-2]]],[],[]],[-1,[[23,[-2]]],[],[]],[-1,[[23,[-2]]],[],[]],[-1,24,[]],[-1,24,[]],[-1,24,[]],[-1,24,[]],[-1,24,[]],[-1,24,[]],[-1,24,[]],[[[6,[[22,[5]]]]],7],[[[33,[-1]],[6,[5]]],[[32,[2]]],[28,11]],[[7,2,5],3],[-1,[[33,[-1]]],11],[-1,[[33,[-1]]],11]],"c":[],"p":[[3,"Bytes",0],[15,"usize"],[15,"tuple"],[3,"BytesMut",0],[15,"u8"],[15,"slice"],[3,"UninitSlice",137],[4,"Ordering",455],[3,"Vec",456],[15,"bool"],[8,"Sized",457],[15,"str"],[3,"String",458],[8,"IntoIterator",459],[3,"Formatter",460],[6,"Result",460],[3,"Box",461],[8,"Hasher",462],[4,"Option",463],[8,"Buf",137],[8,"RangeBounds",464],[19,"MaybeUninit",465],[4,"Result",466],[3,"TypeId",467],[3,"Arguments",460],[3,"Chain",137],[3,"Take",137],[8,"BufMut",137],[3,"Limit",137],[3,"IoSlice",468],[3,"Reader",137],[6,"Result",469],[3,"Writer",137],[8,"Debug",460],[3,"IntoIter",137],[15,"f32"],[15,"f64"],[15,"i128"],[15,"i16"],[15,"i32"],[15,"i64"],[15,"i8"],[15,"u128"],[15,"u16"],[15,"u32"],[15,"u64"],[3,"RangeFrom",464],[3,"RangeToInclusive",464],[3,"Range",464],[3,"RangeFull",464],[3,"RangeTo",464],[3,"RangeInclusive",464]],"b":[[40,"impl-PartialEq%3CVec%3Cu8%3E%3E-for-Bytes"],[41,"impl-PartialEq%3CBytesMut%3E-for-Bytes"],[42,"impl-PartialEq%3C%5Bu8%5D%3E-for-Bytes"],[43,"impl-PartialEq%3C%26T%3E-for-Bytes"],[44,"impl-PartialEq%3Cstr%3E-for-Bytes"],[45,"impl-PartialEq-for-Bytes"],[46,"impl-PartialEq%3CString%3E-for-Bytes"],[47,"impl-PartialEq%3CString%3E-for-BytesMut"],[48,"impl-PartialEq%3CBytes%3E-for-BytesMut"],[49,"impl-PartialEq%3C%5Bu8%5D%3E-for-BytesMut"],[50,"impl-PartialEq%3C%26T%3E-for-BytesMut"],[51,"impl-PartialEq-for-BytesMut"],[52,"impl-PartialEq%3CVec%3Cu8%3E%3E-for-BytesMut"],[53,"impl-PartialEq%3Cstr%3E-for-BytesMut"],[54,"impl-Extend%3CBytes%3E-for-BytesMut"],[55,"impl-Extend%3C%26u8%3E-for-BytesMut"],[56,"impl-Extend%3Cu8%3E-for-BytesMut"],[58,"impl-UpperHex-for-Bytes"],[59,"impl-LowerHex-for-Bytes"],[60,"impl-Debug-for-Bytes"],[61,"impl-LowerHex-for-BytesMut"],[62,"impl-Debug-for-BytesMut"],[63,"impl-UpperHex-for-BytesMut"],[65,"impl-From%3CBox%3C%5Bu8%5D%3E%3E-for-Bytes"],[66,"impl-From%3CBytesMut%3E-for-Bytes"],[67,"impl-From%3CVec%3Cu8%3E%3E-for-Bytes"],[69,"impl-From%3C%26str%3E-for-Bytes"],[70,"impl-From%3CString%3E-for-Bytes"],[71,"impl-From%3C%26%5Bu8%5D%3E-for-Bytes"],[72,"impl-From%3C%26%5Bu8%5D%3E-for-BytesMut"],[73,"impl-From%3C%26str%3E-for-BytesMut"],[76,"impl-FromIterator%3C%26u8%3E-for-BytesMut"],[77,"impl-FromIterator%3Cu8%3E-for-BytesMut"],[83,"impl-IntoIterator-for-Bytes"],[84,"impl-IntoIterator-for-%26Bytes"],[85,"impl-IntoIterator-for-%26BytesMut"],[86,"impl-IntoIterator-for-BytesMut"],[93,"impl-PartialOrd%3CString%3E-for-Bytes"],[94,"impl-PartialOrd-for-Bytes"],[95,"impl-PartialOrd%3Cstr%3E-for-Bytes"],[96,"impl-PartialOrd%3C%5Bu8%5D%3E-for-Bytes"],[97,"impl-PartialOrd%3C%26T%3E-for-Bytes"],[98,"impl-PartialOrd%3CVec%3Cu8%3E%3E-for-Bytes"],[99,"impl-PartialOrd-for-BytesMut"],[100,"impl-PartialOrd%3CString%3E-for-BytesMut"],[101,"impl-PartialOrd%3CVec%3Cu8%3E%3E-for-BytesMut"],[102,"impl-PartialOrd%3C%26T%3E-for-BytesMut"],[103,"impl-PartialOrd%3Cstr%3E-for-BytesMut"],[104,"impl-PartialOrd%3C%5Bu8%5D%3E-for-BytesMut"],[200,"impl-From%3C%26mut+%5BMaybeUninit%3Cu8%3E%5D%3E-for-%26mut+UninitSlice"],[201,"impl-From%3C%26mut+%5Bu8%5D%3E-for-%26mut+UninitSlice"],[299,"impl-Index%3CRangeFrom%3Cusize%3E%3E-for-UninitSlice"],[300,"impl-Index%3CRangeToInclusive%3Cusize%3E%3E-for-UninitSlice"],[301,"impl-Index%3CRange%3Cusize%3E%3E-for-UninitSlice"],[302,"impl-Index%3CRangeFull%3E-for-UninitSlice"],[303,"impl-Index%3CRangeTo%3Cusize%3E%3E-for-UninitSlice"],[304,"impl-Index%3CRangeInclusive%3Cusize%3E%3E-for-UninitSlice"],[305,"impl-IndexMut%3CRangeTo%3Cusize%3E%3E-for-UninitSlice"],[306,"impl-IndexMut%3CRangeToInclusive%3Cusize%3E%3E-for-UninitSlice"],[307,"impl-IndexMut%3CRangeInclusive%3Cusize%3E%3E-for-UninitSlice"],[308,"impl-IndexMut%3CRange%3Cusize%3E%3E-for-UninitSlice"],[309,"impl-IndexMut%3CRangeFrom%3Cusize%3E%3E-for-UninitSlice"],[310,"impl-IndexMut%3CRangeFull%3E-for-UninitSlice"]]},\ -"ping_rs":{"doc":"","t":"NNENNALLFAALLAAALLLLLNDNDNDNDNDNDEDNDNDNDNDNDNDNDNDNDNDNDNDNDNDMMMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMLLLLLLLLLLLLLLLLLLLLLLMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMLLLLLLLLLLLLLLLLLLLLLLMMMMMMLLLMMLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMNDNDNDNDENDDNDNDMMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMLLLLLLLLLMMMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMLLLLLLLLMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMMNNNDEENNNNENNNNLLLLLLLLLLLLLLLLLLLLLMLLLLLLLLLLLLIIRIDILLLLMLLLKKLMLLLLLKMKKLLMMKLLLLMLLLLLLNDNDNDNNDDNDNDNDNDENDNDNDNDDNDNDNDNDNDNDNDNDNDNDNDNDNDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMMMMMMMMMMMMMMLLLLLLLLLLLLLLLLLLLLLLLLLLLMMMLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMNDNDNDNDENDDNDNDMMMMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMLLLLLLLLMMLLLLLLLLMLLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMLLLLLLLLLLLLMMMMMMMMMMMMMMMMMLLLLLLLLMMMMMLLLLLLLLLMMMMMMMMMLLLLLLLLLLLLLLLLLLLLLLLLLLL","n":["Bluebps","Common","Messages","Ping1D","Ping360","bluebps","borrow","borrow_mut","calculate_crc","common","decoder","from","into","message","ping1d","ping360","try_from","try_from","try_from","try_into","type_id","CellTimeout","CellTimeoutStruct","CellVoltageMin","CellVoltageMinStruct","CurrentMax","CurrentMaxStruct","CurrentTimeout","CurrentTimeoutStruct","EraseFlash","EraseFlashStruct","Events","EventsStruct","Messages","PingProtocolHead","Reboot","RebootStruct","ResetDefaults","ResetDefaultsStruct","SetCellVoltageMinimum","SetCellVoltageMinimumStruct","SetCellVoltageTimeout","SetCellVoltageTimeoutStruct","SetCurrentMax","SetCurrentMaxStruct","SetCurrentTimeout","SetCurrentTimeoutStruct","SetLpfSampleFrequency","SetLpfSampleFrequencyStruct","SetLpfSetting","SetLpfSettingStruct","SetStreamRate","SetStreamRateStruct","SetTemperatureMax","SetTemperatureMaxStruct","SetTemperatureTimeout","SetTemperatureTimeoutStruct","State","StateStruct","TemperatureMax","TemperatureMaxStruct","TemperatureTimeout","TemperatureTimeoutStruct","battery_current","battery_temperature","battery_voltage","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","cell_voltages","cell_voltages_length","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","cpu_temperature","current","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","destiny_device_id","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","flags","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","goto_bootloader","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","limit","limit","limit","limit","limit","limit","message_id","message_id_from_name","message_name","rate","sample_frequency","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","setting","source_device_id","temperature","timeout","timeout","timeout","timeout","timeout","timeout","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","voltage","Ack","AckStruct","AsciiText","AsciiTextStruct","DeviceInformation","DeviceInformationStruct","GeneralRequest","GeneralRequestStruct","Messages","Nack","NackStruct","PingProtocolHead","ProtocolVersion","ProtocolVersionStruct","SetDeviceId","SetDeviceIdStruct","acked_id","ascii_message","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","default","default","default","default","default","default","default","default","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","destiny_device_id","device_id","device_revision","device_type","eq","eq","eq","eq","eq","eq","eq","eq","eq","firmware_version_major","firmware_version_minor","firmware_version_patch","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","into","into","into","into","into","into","into","into","into","message_id","message_id_from_name","message_name","nack_message","nacked_id","requested_id","reserved","reserved","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","source_device_id","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","version_major","version_minor","version_patch","AwaitingStart1","AwaitingStart2","ChecksumError","Decoder","DecoderResult","DecoderState","Error","InProgress","IncompleteData","InvalidStartByte","ParseError","ReadingChecksum","ReadingHeader","ReadingPayload","Success","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","fmt","fmt","fmt","from","from","from","from","into","into","into","into","new","parse_byte","state","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","DeserializeGenericMessage","DeserializePayload","HEADER","PingMessage","ProtocolMessage","SerializePayload","borrow","borrow_mut","calculate_crc","checksum","checksum","clone","clone_into","default","deserialize","deserialize","dst_device_id","dst_device_id","fmt","from","has_valid_crc","into","length","message_id","message_id","message_id_from_name","message_name","new","payload","payload","payload_length","serialize","serialized","set_dst_device_id","set_message","set_src_device_id","src_device_id","to_owned","try_from","try_into","type_id","update_checksum","write","ContinuousStart","ContinuousStartStruct","ContinuousStop","ContinuousStopStruct","DeviceId","DeviceIdStruct","Distance","DistanceSimple","DistanceSimpleStruct","DistanceStruct","FirmwareVersion","FirmwareVersionStruct","GainSetting","GainSettingStruct","GeneralInfo","GeneralInfoStruct","GotoBootloader","GotoBootloaderStruct","Messages","ModeAuto","ModeAutoStruct","PcbTemperature","PcbTemperatureStruct","PingEnable","PingEnableStruct","PingInterval","PingIntervalStruct","PingProtocolHead","ProcessorTemperature","ProcessorTemperatureStruct","Profile","ProfileStruct","Range","RangeStruct","SetDeviceId","SetDeviceIdStruct","SetGainSetting","SetGainSettingStruct","SetModeAuto","SetModeAutoStruct","SetPingEnable","SetPingEnableStruct","SetPingInterval","SetPingIntervalStruct","SetRange","SetRangeStruct","SetSpeedOfSound","SetSpeedOfSoundStruct","SpeedOfSound","SpeedOfSoundStruct","TransmitDuration","TransmitDurationStruct","Voltage5","Voltage5Struct","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","confidence","confidence","confidence","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","destiny_device_id","device_id","device_id","device_model","device_type","distance","distance","distance","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","firmware_version_major","firmware_version_major","firmware_version_minor","firmware_version_minor","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","gain_setting","gain_setting","gain_setting","gain_setting","gain_setting","id","id","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","message_id","message_id_from_name","message_name","mode_auto","mode_auto","mode_auto","pcb_temperature","ping_enabled","ping_enabled","ping_interval","ping_interval","ping_interval","ping_number","ping_number","processor_temperature","profile_data","profile_data_length","scan_length","scan_length","scan_length","scan_length","scan_start","scan_start","scan_start","scan_start","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","source_device_id","speed_of_sound","speed_of_sound","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","transmit_duration","transmit_duration","transmit_duration","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","voltage_5","voltage_5","AutoDeviceData","AutoDeviceDataStruct","AutoTransmit","AutoTransmitStruct","DeviceData","DeviceDataStruct","DeviceId","DeviceIdStruct","Messages","MotorOff","MotorOffStruct","PingProtocolHead","Reset","ResetStruct","Transducer","TransducerStruct","angle","angle","angle","bootloader","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","data","data","data_length","data_length","default","default","default","default","default","default","default","default","delay","delay","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","destiny_device_id","eq","eq","eq","eq","eq","eq","eq","eq","eq","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","gain_setting","gain_setting","gain_setting","gain_setting","id","into","into","into","into","into","into","into","into","into","message_id","message_id_from_name","message_name","mode","mode","mode","mode","num_steps","num_steps","number_of_samples","number_of_samples","number_of_samples","number_of_samples","reserved","reserved","reserved","sample_period","sample_period","sample_period","sample_period","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","source_device_id","start_angle","start_angle","stop_angle","stop_angle","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","transmit","transmit_duration","transmit_duration","transmit_duration","transmit_duration","transmit_frequency","transmit_frequency","transmit_frequency","transmit_frequency","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id"],"q":[[0,"ping_rs"],[21,"ping_rs::bluebps"],[421,"ping_rs::common"],[590,"ping_rs::decoder"],[639,"ping_rs::message"],[682,"ping_rs::ping1d"],[1208,"ping_rs::ping360"],[1406,"alloc::vec"],[1407,"core::result"],[1408,"core::any"],[1409,"core::fmt"],[1410,"core::fmt"],[1411,"std::io"],[1412,"std::io::error"]],"d":["","","","","","","","","","","","Returns the argument unchanged.","Calls U::from(self).","","","","","","","","","","Get the undervoltage timeout","","Get the minimum allowed cell voltage","","get the maximum allowed battery current","","Get the over-current timeout","","Erase flash, including parameter configuration and event …","","A record of events causing a power lock-out. These numbers …","","","","reboot the system","","Reset parameter configuration to default values.","","Set the minimum allowed cell voltage","","Set the under-voltage timeout","","Set the maximum allowed battery current","","Set the over-current timeout","","the frequency to take adc samples and run the filter.","","Low pass filter setting. This value represents x in the …","","Set the frequency to automatically output state messages.","","Set the maximum allowed battery temperature","","Set the over-temperature timeout","","Get the current state of the device","","Get the maximum allowed battery temperature","","Get the over-temperature timeout","The current measurement","The battery temperature","The main battery voltage","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Array containing cell voltages","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The cpu temperature","The number of over-current events","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","flags indicating if any of the configured limits are …","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","0 = normal reboot, run main application after reboot 1 = …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","The minimum voltage allowed for any individual cell. …","The maximum temperature allowed at the thermistor probe …","The minimum voltage allowed for any individual cell. …","The maximum allowed battery current 0~20000 = 0~200A","The minimum voltage allowed for any individual cell. …","The maximum allowed battery current 0~20000 = 0~200A","","","","Rate to stream state messages. 0~100000Hz","sample frequency in Hz. 1~100000","","","","","","","","","","","","","","","","","","","","","","0~999: x = 0~0.999","","The number of over-temperature events","If the battery temperature exceeds the configured limit …","If an individual cell exceeds the configured limit for …","If the battery current exceeds the configured limit for …","If the battery current exceeds the configured limit for …","If an individual cell exceeds the configured limit for …","If the battery temperature exceeds the configured limit …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The number of under-voltage events","","Acknowledged.","","A message for transmitting text data.","","Device information","","Requests a specific message to be sent from the sonar to …","","","Not acknowledged.","","","The protocol version","","Set the device ID.","The message ID that is ACKnowledged.","ASCII text message. (not necessarily NULL terminated)","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Device ID (1-254). 0 is unknown and 255 is reserved for …","device-specific hardware revision","Device type. 0: Unknown; 1: Ping Echosounder; 2: Ping360","","","","","","","","","","Firmware version major number.","Firmware version minor number.","Firmware version patch number.","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","ASCII text message indicating NACK condition. (not …","The message ID that is Not ACKnowledged.","Message ID to be requested.","reserved","reserved","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Protocol version major number.","Protocol version minor number.","Protocol version patch number.","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","","Calls U::from(self).","","","","","","Message Format","","","","","","","","","","","","","","","","","Command to initiate continuous data stream of profile …","","Command to stop the continuous data stream of profile …","","The device ID.","","","The distance to target with confidence estimate.","The distance to target with confidence estimate. Relevant …","","Device information","","The current gain setting.","","General information.","","Send the device into the bootloader. This is useful for …","","","The current operating mode of the device. Manual mode …","","Temperature of the on-board thermistor.","","Acoustic output enabled state.","","The interval between acoustic measurements.","","","Temperature of the device cpu.","","A profile produced from a single acoustic measurement. The …","","The scan range for acoustic measurements. Measurements …","","Set the device ID.","","Set the current gain setting.","","Set automatic or manual mode. Manual mode allows for …","","Enable or disable acoustic measurements.","","The interval between acoustic measurements.","","Set the scan range for acoustic measurements.","","Set the speed of sound used for distance calculations.","","The speed of sound used for distance calculations.","","The duration of the acoustic activation/transmission.","","The 5V rail voltage.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Confidence in the distance measurement.","Confidence in the most recent range measurement.","Confidence in the most recent range measurement.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Device ID (0-254). 255 is reserved for broadcast messages.","The device ID (0-254). 255 is reserved for broadcast …","Device model. 0: Unknown; 1: Ping1D","Device type. 0: Unknown; 1: Echosounder","Distance to the target.","The current return distance determined for the most recent …","The current return distance determined for the most recent …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Firmware version major number.","Firmware major version.","Firmware version minor number.","Firmware minor version.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, …","The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, …","The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, …","The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, …","The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, …","The message id to stream. 1300: profile","The message id to stop streaming. 1300: profile","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","The current operating mode of the device. 0: manual mode, …","0: manual mode, 1: auto mode","0: manual mode. 1: auto mode.","The temperature in centi-degrees Centigrade (100 * degrees …","The state of the acoustic output. 0: disabled, 1:enabled","0: Disable, 1: Enable.","The interval between acoustic measurements.","The minimum interval between acoustic measurements. The …","The interval between acoustic measurements.","The pulse/measurement count since boot.","The pulse/measurement count since boot.","The temperature in centi-degrees Centigrade (100 * degrees …","","An array of return strength measurements taken at regular …","The length of the scan range.","The length of the scan region.","The length of the scan range.","The length of the scan region.","Not documented","The beginning of the scan region in mm from the transducer.","The beginning of the scan range in mm from the transducer.","The beginning of the scan region in mm from the transducer.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The speed of sound in the measurement medium. ~1,500,000 …","The speed of sound in the measurement medium. ~1,500,000 …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The acoustic pulse length during acoustic …","The acoustic pulse length during acoustic …","Acoustic pulse duration.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Device supply voltage.","The 5V rail voltage.","","Extended version of device_data with auto_transmit …","","Extended transducer message with auto-scan function. The …","","This message is used to communicate the current sonar …","","Change the device id","","","The sonar switches the current through the stepper motor …","","","Reset the sonar. The bootloader may run depending on the …","","The transducer will apply the commanded settings. The …","Head angle","Head angle","Head angle","0 = skip bootloader; 1 = run bootloader","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","8 bit binary data array representing sonar echo strength","8 bit binary data array representing sonar echo strength","","","","","","","","","An additional delay between successive transmit pulses …","An additional delay between successive transmit pulses …","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Analog gain setting (0 = low, 1 = normal, 2 = high)","Analog gain setting (0 = low, 1 = normal, 2 = high)","Analog gain setting (0 = low, 1 = normal, 2 = high)","Analog gain setting (0 = low, 1 = normal, 2 = high)","Device ID (1-254). 0 and 255 are reserved.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","Operating mode (1 for Ping360)","Operating mode (1 for Ping360)","Operating mode (1 for Ping360)","Operating mode (1 for Ping360)","Number of 0.9 degree motor steps between pings for auto …","Number of 0.9 degree motor steps between pings for auto …","Number of samples per reflected signal","Number of samples per reflected signal","Number of samples per reflected signal","Number of samples per reflected signal","reserved","reserved","reserved","Time interval between individual signal intensity samples …","Time interval between individual signal intensity samples …","Time interval between individual signal intensity samples …","Time interval between individual signal intensity samples …","","","","","","","","","","Head angle to begin scan sector for autoscan in gradians …","Head angle to begin scan sector for autoscan in gradians …","Head angle to end scan sector for autoscan in gradians …","Head angle to end scan sector for autoscan in gradians …","","","","","","","","","","0 = do not transmit; 1 = transmit after the transducer has …","Acoustic transmission duration (1~1000 microseconds)","Acoustic transmission duration (1~1000 microseconds)","Acoustic transmission duration (1~1000 microseconds)","Acoustic transmission duration (1~1000 microseconds)","Acoustic operating frequency. Frequency range is 500kHz to …","Acoustic operating frequency. Frequency range is 500kHz to …","Acoustic operating frequency. Frequency range is 500kHz to …","Acoustic operating frequency. Frequency range is 500kHz to …","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"i":[5,5,0,5,5,0,5,5,0,0,0,5,5,0,0,0,5,5,5,5,5,10,0,10,0,10,0,10,0,10,0,10,0,0,0,10,0,10,0,10,0,10,0,10,0,10,0,10,0,10,0,10,0,10,0,10,0,10,0,10,0,10,0,17,17,17,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,17,17,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,17,29,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,9,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,17,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,14,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,11,12,21,27,28,30,10,10,10,20,22,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,19,9,29,13,16,18,23,24,26,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,29,38,0,38,0,38,0,38,0,0,38,0,0,38,0,38,0,44,40,37,38,39,40,41,42,43,44,45,37,38,39,40,41,42,43,44,45,37,38,39,40,41,42,43,44,45,37,38,39,40,41,42,43,44,45,37,39,40,41,42,43,44,45,38,39,40,41,42,43,44,45,37,43,45,45,37,38,39,40,41,42,43,44,45,45,45,45,37,38,39,40,41,42,43,44,45,37,38,39,40,41,42,43,44,45,37,38,39,40,41,42,43,44,45,38,38,38,39,39,42,41,45,38,39,40,41,42,43,44,45,37,37,38,39,40,41,42,43,44,45,37,38,39,40,41,42,43,44,45,37,38,39,40,41,42,43,44,45,37,38,39,40,41,42,43,44,45,41,41,41,48,48,46,0,0,0,47,47,46,46,0,48,48,48,47,49,46,47,48,49,46,47,48,46,47,48,49,46,47,48,49,46,47,48,49,49,49,49,46,47,48,49,46,47,48,49,46,47,48,0,0,0,0,0,0,7,7,7,7,7,7,7,7,91,92,7,7,7,7,7,7,7,51,7,51,51,7,7,7,7,93,7,7,7,7,7,7,7,7,7,7,7,55,0,55,0,55,0,55,55,0,0,55,0,55,0,55,0,55,0,0,55,0,55,0,55,0,55,0,0,55,0,55,0,55,0,55,0,55,0,55,0,55,0,55,0,55,0,55,0,55,0,55,0,55,0,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,62,73,76,54,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,54,68,70,59,59,62,73,76,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,59,63,59,63,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,56,63,73,74,76,57,69,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,55,55,55,63,67,78,65,60,61,63,80,81,73,76,58,73,73,71,73,75,76,71,73,75,76,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,54,64,77,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,73,76,79,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,63,72,83,0,83,0,83,0,83,0,0,83,0,0,83,0,83,0,84,85,89,87,82,83,84,85,86,87,88,89,90,82,83,84,85,86,87,88,89,90,82,83,84,85,86,87,88,89,90,82,83,84,85,86,87,88,89,90,84,89,84,89,82,84,85,86,87,88,89,90,86,89,83,84,85,86,87,88,89,90,82,82,83,84,85,86,87,88,89,90,82,83,84,85,86,87,88,89,90,82,83,84,85,86,87,88,89,90,84,85,86,89,90,82,83,84,85,86,87,88,89,90,83,83,83,84,85,86,89,86,89,84,85,86,89,85,87,90,84,85,86,89,83,84,85,86,87,88,89,90,82,86,89,86,89,82,83,84,85,86,87,88,89,90,85,84,85,86,89,84,85,86,89,82,83,84,85,86,87,88,89,90,82,83,84,85,86,87,88,89,90,82,83,84,85,86,87,88,89,90],"f":[0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[[[2,[1]]],3],0,0,[-1,-1,[]],[-1,-2,[],[]],0,0,0,[[[4,[1]]],[[6,[5]]]],[-1,[[6,[-2]]],[],[]],[7,[[6,[5]]]],[-1,[[6,[-2]]],[],[]],[-1,8,[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,[9,9],[10,10],[11,11],[12,12],[13,13],[14,14],[15,15],[16,16],[17,17],[18,18],[19,19],[20,20],[21,21],[22,22],[23,23],[24,24],[25,25],[26,26],[27,27],[28,28],[29,29],[30,30],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],0,0,[[],9],[[],11],[[],12],[[],13],[[],14],[[],15],[[],16],[[],17],[[],18],[[],19],[[],20],[[],21],[[],22],[[],23],[[],24],[[],25],[[],26],[[],27],[[],28],[[],29],[[],30],[[3,[2,[1]]],[[6,[10,32]]]],[[[2,[1]]],11],[[[2,[1]]],12],[[[2,[1]]],13],[[[2,[1]]],14],[[[2,[1]]],15],[[[2,[1]]],16],[[[2,[1]]],17],[[[2,[1]]],18],[[[2,[1]]],19],[[[2,[1]]],20],[[[2,[1]]],21],[[[2,[1]]],22],[[[2,[1]]],23],[[[2,[1]]],24],[[[2,[1]]],25],[[[2,[1]]],26],[[[2,[1]]],27],[[[2,[1]]],28],[[[2,[1]]],29],[[[2,[1]]],30],0,[[9,9],33],[[10,10],33],[[11,11],33],[[12,12],33],[[13,13],33],[[14,14],33],[[15,15],33],[[16,16],33],[[17,17],33],[[18,18],33],[[19,19],33],[[20,20],33],[[21,21],33],[[22,22],33],[[23,23],33],[[24,24],33],[[25,25],33],[[26,26],33],[[27,27],33],[[28,28],33],[[29,29],33],[[30,30],33],0,[[9,34],35],[[10,34],35],[[11,34],35],[[12,34],35],[[13,34],35],[[14,34],35],[[15,34],35],[[16,34],35],[[17,34],35],[[18,34],35],[[19,34],35],[[20,34],35],[[21,34],35],[[22,34],35],[[23,34],35],[[24,34],35],[[25,34],35],[[26,34],35],[[27,34],35],[[28,34],35],[[29,34],35],[[30,34],35],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,0,[10,3],[32,[[6,[3,36]]]],[10,32],0,0,[10,[[4,[1]]]],[11,[[4,[1]]]],[12,[[4,[1]]]],[13,[[4,[1]]]],[14,[[4,[1]]]],[15,[[4,[1]]]],[16,[[4,[1]]]],[17,[[4,[1]]]],[18,[[4,[1]]]],[19,[[4,[1]]]],[20,[[4,[1]]]],[21,[[4,[1]]]],[22,[[4,[1]]]],[23,[[4,[1]]]],[24,[[4,[1]]]],[25,[[4,[1]]]],[26,[[4,[1]]]],[27,[[4,[1]]]],[28,[[4,[1]]]],[29,[[4,[1]]]],[30,[[4,[1]]]],0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[37,37],[38,38],[39,39],[40,40],[41,41],[42,42],[43,43],[44,44],[45,45],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[],37],[[],39],[[],40],[[],41],[[],42],[[],43],[[],44],[[],45],[[3,[2,[1]]],[[6,[38,32]]]],[[[2,[1]]],39],[[[2,[1]]],40],[[[2,[1]]],41],[[[2,[1]]],42],[[[2,[1]]],43],[[[2,[1]]],44],[[[2,[1]]],45],0,0,0,0,[[37,37],33],[[38,38],33],[[39,39],33],[[40,40],33],[[41,41],33],[[42,42],33],[[43,43],33],[[44,44],33],[[45,45],33],0,0,0,[[37,34],35],[[38,34],35],[[39,34],35],[[40,34],35],[[41,34],35],[[42,34],35],[[43,34],35],[[44,34],35],[[45,34],35],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[38,3],[32,[[6,[3,36]]]],[38,32],0,0,0,0,0,[38,[[4,[1]]]],[39,[[4,[1]]]],[40,[[4,[1]]]],[41,[[4,[1]]]],[42,[[4,[1]]]],[43,[[4,[1]]]],[44,[[4,[1]]]],[45,[[4,[1]]]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[46,34],35],[[47,34],35],[[48,34],35],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[],49],[[49,1],47],0,[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[7,3],[7,3],0,[7,7],[[-1,-2],31,[],[]],[[],7],[[[2,[1]]],-1,[]],[[3,[2,[1]]],[[6,[-1,32]]],[]],[7,1],0,[[7,34],35],[-1,-1,[]],[7,33],[-1,-2,[],[]],[7,50],[-1,3,[]],0,[32,[[6,[3,36]]]],[-1,32,[]],[[],7],[7,[[2,[1]]]],0,0,[-1,[[4,[1]]],[]],[7,[[4,[1]]]],[[7,1],31],[[7,-1],31,51],[[7,1],31],0,[-1,-2,[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,8,[]],[7,31],[[7,52],[[53,[50]]]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[54,54],[55,55],[56,56],[57,57],[58,58],[59,59],[60,60],[61,61],[62,62],[63,63],[64,64],[65,65],[66,66],[67,67],[68,68],[69,69],[70,70],[71,71],[72,72],[73,73],[74,74],[75,75],[76,76],[77,77],[78,78],[79,79],[80,80],[81,81],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],0,0,0,[[],54],[[],56],[[],57],[[],58],[[],59],[[],60],[[],61],[[],62],[[],63],[[],64],[[],65],[[],66],[[],67],[[],68],[[],69],[[],70],[[],71],[[],72],[[],73],[[],74],[[],75],[[],76],[[],77],[[],78],[[],79],[[],80],[[],81],[[3,[2,[1]]],[[6,[55,32]]]],[[[2,[1]]],56],[[[2,[1]]],57],[[[2,[1]]],58],[[[2,[1]]],59],[[[2,[1]]],60],[[[2,[1]]],61],[[[2,[1]]],62],[[[2,[1]]],63],[[[2,[1]]],64],[[[2,[1]]],65],[[[2,[1]]],66],[[[2,[1]]],67],[[[2,[1]]],68],[[[2,[1]]],69],[[[2,[1]]],70],[[[2,[1]]],71],[[[2,[1]]],72],[[[2,[1]]],73],[[[2,[1]]],74],[[[2,[1]]],75],[[[2,[1]]],76],[[[2,[1]]],77],[[[2,[1]]],78],[[[2,[1]]],79],[[[2,[1]]],80],[[[2,[1]]],81],0,0,0,0,0,0,0,0,[[54,54],33],[[55,55],33],[[56,56],33],[[57,57],33],[[58,58],33],[[59,59],33],[[60,60],33],[[61,61],33],[[62,62],33],[[63,63],33],[[64,64],33],[[65,65],33],[[66,66],33],[[67,67],33],[[68,68],33],[[69,69],33],[[70,70],33],[[71,71],33],[[72,72],33],[[73,73],33],[[74,74],33],[[75,75],33],[[76,76],33],[[77,77],33],[[78,78],33],[[79,79],33],[[80,80],33],[[81,81],33],0,0,0,0,[[54,34],35],[[55,34],35],[[56,34],35],[[57,34],35],[[58,34],35],[[59,34],35],[[60,34],35],[[61,34],35],[[62,34],35],[[63,34],35],[[64,34],35],[[65,34],35],[[66,34],35],[[67,34],35],[[68,34],35],[[69,34],35],[[70,34],35],[[71,34],35],[[72,34],35],[[73,34],35],[[74,34],35],[[75,34],35],[[76,34],35],[[77,34],35],[[78,34],35],[[79,34],35],[[80,34],35],[[81,34],35],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[55,3],[32,[[6,[3,36]]]],[55,32],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[55,[[4,[1]]]],[56,[[4,[1]]]],[57,[[4,[1]]]],[58,[[4,[1]]]],[59,[[4,[1]]]],[60,[[4,[1]]]],[61,[[4,[1]]]],[62,[[4,[1]]]],[63,[[4,[1]]]],[64,[[4,[1]]]],[65,[[4,[1]]]],[66,[[4,[1]]]],[67,[[4,[1]]]],[68,[[4,[1]]]],[69,[[4,[1]]]],[70,[[4,[1]]]],[71,[[4,[1]]]],[72,[[4,[1]]]],[73,[[4,[1]]]],[74,[[4,[1]]]],[75,[[4,[1]]]],[76,[[4,[1]]]],[77,[[4,[1]]]],[78,[[4,[1]]]],[79,[[4,[1]]]],[80,[[4,[1]]]],[81,[[4,[1]]]],0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[82,82],[83,83],[84,84],[85,85],[86,86],[87,87],[88,88],[89,89],[90,90],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],0,0,0,0,[[],82],[[],84],[[],85],[[],86],[[],87],[[],88],[[],89],[[],90],0,0,[[3,[2,[1]]],[[6,[83,32]]]],[[[2,[1]]],84],[[[2,[1]]],85],[[[2,[1]]],86],[[[2,[1]]],87],[[[2,[1]]],88],[[[2,[1]]],89],[[[2,[1]]],90],0,[[82,82],33],[[83,83],33],[[84,84],33],[[85,85],33],[[86,86],33],[[87,87],33],[[88,88],33],[[89,89],33],[[90,90],33],[[82,34],35],[[83,34],35],[[84,34],35],[[85,34],35],[[86,34],35],[[87,34],35],[[88,34],35],[[89,34],35],[[90,34],35],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[83,3],[32,[[6,[3,36]]]],[83,32],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[83,[[4,[1]]]],[84,[[4,[1]]]],[85,[[4,[1]]]],[86,[[4,[1]]]],[87,[[4,[1]]]],[88,[[4,[1]]]],[89,[[4,[1]]]],[90,[[4,[1]]]],0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,0,0,0,0,[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,[[6,[-2]]],[],[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]]],"c":[],"p":[[15,"u8"],[15,"slice"],[15,"u16"],[3,"Vec",1406],[4,"Messages",0],[4,"Result",1407],[3,"ProtocolMessage",639],[3,"TypeId",1408],[3,"PingProtocolHead",21],[4,"Messages",21],[3,"CellVoltageMinStruct",21],[3,"SetTemperatureMaxStruct",21],[3,"TemperatureTimeoutStruct",21],[3,"RebootStruct",21],[3,"ResetDefaultsStruct",21],[3,"SetCellVoltageTimeoutStruct",21],[3,"StateStruct",21],[3,"CurrentTimeoutStruct",21],[3,"SetLpfSettingStruct",21],[3,"SetStreamRateStruct",21],[3,"SetCellVoltageMinimumStruct",21],[3,"SetLpfSampleFrequencyStruct",21],[3,"SetCurrentTimeoutStruct",21],[3,"CellTimeoutStruct",21],[3,"EraseFlashStruct",21],[3,"SetTemperatureTimeoutStruct",21],[3,"CurrentMaxStruct",21],[3,"TemperatureMaxStruct",21],[3,"EventsStruct",21],[3,"SetCurrentMaxStruct",21],[15,"tuple"],[15,"str"],[15,"bool"],[3,"Formatter",1409],[6,"Result",1409],[3,"String",1410],[3,"PingProtocolHead",421],[4,"Messages",421],[3,"NackStruct",421],[3,"AsciiTextStruct",421],[3,"ProtocolVersionStruct",421],[3,"GeneralRequestStruct",421],[3,"SetDeviceIdStruct",421],[3,"AckStruct",421],[3,"DeviceInformationStruct",421],[4,"ParseError",590],[4,"DecoderResult",590],[4,"DecoderState",590],[3,"Decoder",590],[15,"usize"],[8,"PingMessage",639],[8,"Write",1411],[6,"Result",1412],[3,"PingProtocolHead",682],[4,"Messages",682],[3,"SetGainSettingStruct",682],[3,"ContinuousStartStruct",682],[3,"ProcessorTemperatureStruct",682],[3,"FirmwareVersionStruct",682],[3,"PingEnableStruct",682],[3,"SetPingEnableStruct",682],[3,"DistanceSimpleStruct",682],[3,"GeneralInfoStruct",682],[3,"SetSpeedOfSoundStruct",682],[3,"PcbTemperatureStruct",682],[3,"GotoBootloaderStruct",682],[3,"ModeAutoStruct",682],[3,"SetDeviceIdStruct",682],[3,"ContinuousStopStruct",682],[3,"DeviceIdStruct",682],[3,"SetRangeStruct",682],[3,"Voltage5Struct",682],[3,"ProfileStruct",682],[3,"GainSettingStruct",682],[3,"RangeStruct",682],[3,"DistanceStruct",682],[3,"SpeedOfSoundStruct",682],[3,"SetModeAutoStruct",682],[3,"TransmitDurationStruct",682],[3,"PingIntervalStruct",682],[3,"SetPingIntervalStruct",682],[3,"PingProtocolHead",1208],[4,"Messages",1208],[3,"DeviceDataStruct",1208],[3,"TransducerStruct",1208],[3,"AutoTransmitStruct",1208],[3,"ResetStruct",1208],[3,"MotorOffStruct",1208],[3,"AutoDeviceDataStruct",1208],[3,"DeviceIdStruct",1208],[8,"DeserializePayload",639],[8,"DeserializeGenericMessage",639],[8,"SerializePayload",639]],"b":[[16,"impl-TryFrom%3C%26Vec%3Cu8%3E%3E-for-Messages"],[18,"impl-TryFrom%3C%26ProtocolMessage%3E-for-Messages"]]}\ -}'); -if (typeof window !== 'undefined' && window.initSearch) {window.initSearch(searchIndex)}; -if (typeof exports !== 'undefined') {exports.searchIndex = searchIndex}; +var searchIndex = new Map(JSON.parse('[\ +["bytes",{"doc":"Provides abstractions for working with bytes.","t":"EEFFNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNKKFFFFFFFMNNMNNNNNNNNNNNNNNNNNNNNNNMNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN","n":["Buf","BufMut","Bytes","BytesMut","advance","advance","advance_mut","as_mut","as_ref","as_ref","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","buf","capacity","chunk","chunk","chunk_mut","clear","clear","clone","clone","clone_into","clone_into","cmp","cmp","copy_from_slice","copy_to_bytes","copy_to_bytes","default","default","deref","deref","deref_mut","drop","drop","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","extend","extend","extend","extend_from_slice","fmt","fmt","fmt","fmt","fmt","fmt","freeze","from","from","from","from","from","from","from","from","from","from","from_iter","from_iter","from_iter","from_static","hash","hash","into","into","into_iter","into_iter","into_iter","into_iter","is_empty","is_empty","len","len","new","new","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","partial_cmp","put","put_bytes","put_slice","remaining","remaining","remaining_mut","reserve","resize","set_len","slice","slice_ref","spare_capacity_mut","split","split_off","split_off","split_to","split_to","to_owned","to_owned","truncate","truncate","try_from","try_from","try_into","try_into","type_id","type_id","unsplit","with_capacity","write_fmt","write_str","zeroed","Buf","BufMut","Chain","IntoIter","Limit","Reader","Take","UninitSlice","Writer","advance","advance","advance","advance_mut","advance_mut","advance_mut","as_mut_ptr","as_uninit_slice_mut","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","chain","chain","chain_mut","chain_mut","chunk","chunk","chunk","chunk_mut","chunk_mut","chunk_mut","chunks_vectored","chunks_vectored","chunks_vectored","consume","copy_from_slice","copy_to_bytes","copy_to_bytes","copy_to_bytes","copy_to_bytes","copy_to_slice","copy_to_slice","fill_buf","first_mut","first_ref","flush","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from_raw_parts_mut","get_f32","get_f32","get_f32_le","get_f32_le","get_f32_ne","get_f32_ne","get_f64","get_f64","get_f64_le","get_f64_le","get_f64_ne","get_f64_ne","get_i128","get_i128","get_i128_le","get_i128_le","get_i128_ne","get_i128_ne","get_i16","get_i16","get_i16_le","get_i16_le","get_i16_ne","get_i16_ne","get_i32","get_i32","get_i32_le","get_i32_le","get_i32_ne","get_i32_ne","get_i64","get_i64","get_i64_le","get_i64_le","get_i64_ne","get_i64_ne","get_i8","get_i8","get_int","get_int","get_int_le","get_int_le","get_int_ne","get_int_ne","get_mut","get_mut","get_mut","get_mut","get_mut","get_ref","get_ref","get_ref","get_ref","get_ref","get_u128","get_u128","get_u128_le","get_u128_le","get_u128_ne","get_u128_ne","get_u16","get_u16","get_u16_le","get_u16_le","get_u16_ne","get_u16_ne","get_u32","get_u32","get_u32_le","get_u32_le","get_u32_ne","get_u32_ne","get_u64","get_u64","get_u64_le","get_u64_le","get_u64_ne","get_u64_ne","get_u8","get_u8","get_uint","get_uint","get_uint_le","get_uint_le","get_uint_ne","get_uint_ne","has_remaining","has_remaining","has_remaining_mut","has_remaining_mut","index","index","index","index","index","index","index_mut","index_mut","index_mut","index_mut","index_mut","index_mut","into","into","into","into","into","into","into_inner","into_inner","into_inner","into_inner","into_inner","into_inner","into_iter","into_iter","last_mut","last_ref","len","limit","limit","limit","limit","new","new","next","put","put","put_bytes","put_bytes","put_f32","put_f32","put_f32_le","put_f32_le","put_f32_ne","put_f32_ne","put_f64","put_f64","put_f64_le","put_f64_le","put_f64_ne","put_f64_ne","put_i128","put_i128","put_i128_le","put_i128_le","put_i128_ne","put_i128_ne","put_i16","put_i16","put_i16_le","put_i16_le","put_i16_ne","put_i16_ne","put_i32","put_i32","put_i32_le","put_i32_le","put_i32_ne","put_i32_ne","put_i64","put_i64","put_i64_le","put_i64_le","put_i64_ne","put_i64_ne","put_i8","put_i8","put_int","put_int","put_int_le","put_int_le","put_int_ne","put_int_ne","put_slice","put_slice","put_u128","put_u128","put_u128_le","put_u128_le","put_u128_ne","put_u128_ne","put_u16","put_u16","put_u16_le","put_u16_le","put_u16_ne","put_u16_ne","put_u32","put_u32","put_u32_le","put_u32_le","put_u32_ne","put_u32_ne","put_u64","put_u64","put_u64_le","put_u64_le","put_u64_ne","put_u64_ne","put_u8","put_u8","put_uint","put_uint","put_uint_le","put_uint_le","put_uint_ne","put_uint_ne","read","reader","reader","remaining","remaining","remaining","remaining_mut","remaining_mut","remaining_mut","set_limit","set_limit","size_hint","take","take","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","uninit","write","write_byte","writer","writer"],"q":[[0,"bytes"],[137,"bytes::buf"],[455,"core::cmp"],[456,"alloc::string"],[457,"core::marker"],[458,"alloc::vec"],[459,"core::iter::traits::collect"],[460,"core::fmt"],[461,"core::fmt"],[462,"core::hash"],[463,"core::option"],[464,"core::ops::range"],[465,"core::mem::maybe_uninit"],[466,"core::result"],[467,"core::any"],[468,"core::fmt"],[469,"std::io::error"],[470,"core::fmt"]],"d":["","","A cheaply cloneable and sliceable chunk of contiguous …","A unique reference to a contiguous slice of memory.","","","","","","","","","","","","","","Utilities for working with buffers.","Returns the number of bytes the BytesMut can hold without …","","","","Clears the buffer, removing all data.","Clears the buffer, removing all data. Existing capacity is …","","","","","","","Creates Bytes instance from slice, by copying it.","","","","","","","","","","","","","","","","","","","","","","","","","","","Appends given bytes to this BytesMut.","","","","","","","Converts self into an immutable Bytes.","","","","","","","Returns the argument unchanged.","","Returns the argument unchanged.","","","","","Creates a new Bytes from a static slice.","","","Calls U::from(self).","Calls U::from(self).","","","","","Returns true if the Bytes has a length of 0.","Returns true if the BytesMut has a length of 0.","Returns the number of bytes contained in this Bytes.","Returns the number of bytes contained in this BytesMut.","Creates a new empty Bytes.","Creates a new BytesMut with default capacity.","","","","","","","","","","","","","","","","","","","Reserves capacity for at least additional more bytes to be …","Resizes the buffer so that len is equal to new_len.","Sets the length of the buffer.","Returns a slice of self for the provided range.","Returns a slice of self that is equivalent to the given …","Returns the remaining spare capacity of the buffer as a …","Removes the bytes from the current view, returning them in …","Splits the bytes into two at the given index.","Splits the bytes into two at the given index.","Splits the bytes into two at the given index.","Splits the buffer into two at the given index.","","","Shortens the buffer, keeping the first len bytes and …","Shortens the buffer, keeping the first len bytes and …","","","","","","","Absorbs a BytesMut that was previously split off.","Creates a new BytesMut with the specified capacity.","","","Creates a new BytesMut, which is initialized with zero.","Read bytes from a buffer.","A trait for values that provide sequential write access to …","A Chain sequences two buffers.","Iterator over the bytes contained by the buffer.","A BufMut adapter which limits the amount of bytes that can …","A Buf adapter which implements io::Read for the inner …","A Buf adapter which limits the bytes read from an …","Uninitialized byte slice.","A BufMut adapter which implements io::Write for the inner …","Advance the internal cursor of the Buf","","","Advance the internal cursor of the BufMut","","","Return a raw pointer to the slice’s buffer.","Return a &mut [MaybeUninit<u8>] to this slice’s buffer.","","","","","","","","","","","","","","","Creates an adaptor which will chain this buffer with …","Creates an adaptor which will chain this buffer with …","Creates an adapter which will chain this buffer with …","Creates an adapter which will chain this buffer with …","Returns a slice starting at the current position and of …","","","Returns a mutable slice starting at the current BufMut …","","","Fills dst with potentially multiple slices starting at self…","Fills dst with potentially multiple slices starting at self…","","","Copies bytes from src into self.","Consumes len bytes inside self and returns new instance of …","Consumes len bytes inside self and returns new instance of …","","","Copies bytes from self into dst.","Copies bytes from self into dst.","","Gets a mutable reference to the first underlying Buf.","Gets a reference to the first underlying Buf.","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Create a &mut UninitSlice from a pointer and a length.","Gets an IEEE754 single-precision (4 bytes) floating point …","Gets an IEEE754 single-precision (4 bytes) floating point …","Gets an IEEE754 single-precision (4 bytes) floating point …","Gets an IEEE754 single-precision (4 bytes) floating point …","Gets an IEEE754 single-precision (4 bytes) floating point …","Gets an IEEE754 single-precision (4 bytes) floating point …","Gets an IEEE754 double-precision (8 bytes) floating point …","Gets an IEEE754 double-precision (8 bytes) floating point …","Gets an IEEE754 double-precision (8 bytes) floating point …","Gets an IEEE754 double-precision (8 bytes) floating point …","Gets an IEEE754 double-precision (8 bytes) floating point …","Gets an IEEE754 double-precision (8 bytes) floating point …","Gets a signed 128 bit integer from self in big-endian byte …","Gets a signed 128 bit integer from self in big-endian byte …","Gets a signed 128 bit integer from self in little-endian …","Gets a signed 128 bit integer from self in little-endian …","Gets a signed 128 bit integer from self in native-endian …","Gets a signed 128 bit integer from self in native-endian …","Gets a signed 16 bit integer from self in big-endian byte …","Gets a signed 16 bit integer from self in big-endian byte …","Gets a signed 16 bit integer from self in little-endian …","Gets a signed 16 bit integer from self in little-endian …","Gets a signed 16 bit integer from self in native-endian …","Gets a signed 16 bit integer from self in native-endian …","Gets a signed 32 bit integer from self in big-endian byte …","Gets a signed 32 bit integer from self in big-endian byte …","Gets a signed 32 bit integer from self in little-endian …","Gets a signed 32 bit integer from self in little-endian …","Gets a signed 32 bit integer from self in native-endian …","Gets a signed 32 bit integer from self in native-endian …","Gets a signed 64 bit integer from self in big-endian byte …","Gets a signed 64 bit integer from self in big-endian byte …","Gets a signed 64 bit integer from self in little-endian …","Gets a signed 64 bit integer from self in little-endian …","Gets a signed 64 bit integer from self in native-endian …","Gets a signed 64 bit integer from self in native-endian …","Gets a signed 8 bit integer from self.","Gets a signed 8 bit integer from self.","Gets a signed n-byte integer from self in big-endian byte …","Gets a signed n-byte integer from self in big-endian byte …","Gets a signed n-byte integer from self in little-endian …","Gets a signed n-byte integer from self in little-endian …","Gets a signed n-byte integer from self in native-endian …","Gets a signed n-byte integer from self in native-endian …","Gets a mutable reference to the underlying Buf.","Gets a mutable reference to the underlying BufMut.","Gets a mutable reference to the underlying Buf.","Gets a mutable reference to the underlying Buf.","Gets a mutable reference to the underlying BufMut.","Gets a reference to the underlying Buf.","Gets a reference to the underlying BufMut.","Gets a reference to the underlying Buf.","Gets a reference to the underlying Buf.","Gets a reference to the underlying BufMut.","Gets an unsigned 128 bit integer from self in big-endian …","Gets an unsigned 128 bit integer from self in big-endian …","Gets an unsigned 128 bit integer from self in …","Gets an unsigned 128 bit integer from self in …","Gets an unsigned 128 bit integer from self in …","Gets an unsigned 128 bit integer from self in …","Gets an unsigned 16 bit integer from self in big-endian …","Gets an unsigned 16 bit integer from self in big-endian …","Gets an unsigned 16 bit integer from self in little-endian …","Gets an unsigned 16 bit integer from self in little-endian …","Gets an unsigned 16 bit integer from self in native-endian …","Gets an unsigned 16 bit integer from self in native-endian …","Gets an unsigned 32 bit integer from self in the …","Gets an unsigned 32 bit integer from self in the …","Gets an unsigned 32 bit integer from self in the …","Gets an unsigned 32 bit integer from self in the …","Gets an unsigned 32 bit integer from self in native-endian …","Gets an unsigned 32 bit integer from self in native-endian …","Gets an unsigned 64 bit integer from self in big-endian …","Gets an unsigned 64 bit integer from self in big-endian …","Gets an unsigned 64 bit integer from self in little-endian …","Gets an unsigned 64 bit integer from self in little-endian …","Gets an unsigned 64 bit integer from self in native-endian …","Gets an unsigned 64 bit integer from self in native-endian …","Gets an unsigned 8 bit integer from self.","Gets an unsigned 8 bit integer from self.","Gets an unsigned n-byte integer from self in big-endian …","Gets an unsigned n-byte integer from self in big-endian …","Gets an unsigned n-byte integer from self in little-endian …","Gets an unsigned n-byte integer from self in little-endian …","Gets an unsigned n-byte integer from self in native-endian …","Gets an unsigned n-byte integer from self in native-endian …","Returns true if there are any more bytes to consume","Returns true if there are any more bytes to consume","Returns true if there is space in self for more bytes.","Returns true if there is space in self for more bytes.","","","","","","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Consumes this Chain, returning the underlying values.","Consumes this IntoIter, returning the underlying value.","Consumes this Limit, returning the underlying value.","Consumes this Reader, returning the underlying value.","Consumes this Take, returning the underlying value.","Consumes this Writer, returning the underlying value.","","","Gets a mutable reference to the last underlying Buf.","Gets a reference to the last underlying Buf.","Returns the number of bytes in the slice.","Creates an adaptor which can write at most limit bytes to …","Creates an adaptor which can write at most limit bytes to …","Returns the maximum number of bytes that can be written","Returns the maximum number of bytes that can be read.","Creates a &mut UninitSlice wrapping a slice of initialised …","Creates an iterator over the bytes contained by the buffer.","","Transfer bytes into self from src and advance the cursor …","Transfer bytes into self from src and advance the cursor …","Put cnt bytes val into self.","Put cnt bytes val into self.","Writes an IEEE754 single-precision (4 bytes) floating …","Writes an IEEE754 single-precision (4 bytes) floating …","Writes an IEEE754 single-precision (4 bytes) floating …","Writes an IEEE754 single-precision (4 bytes) floating …","Writes an IEEE754 single-precision (4 bytes) floating …","Writes an IEEE754 single-precision (4 bytes) floating …","Writes an IEEE754 double-precision (8 bytes) floating …","Writes an IEEE754 double-precision (8 bytes) floating …","Writes an IEEE754 double-precision (8 bytes) floating …","Writes an IEEE754 double-precision (8 bytes) floating …","Writes an IEEE754 double-precision (8 bytes) floating …","Writes an IEEE754 double-precision (8 bytes) floating …","Writes a signed 128 bit integer to self in the big-endian …","Writes a signed 128 bit integer to self in the big-endian …","Writes a signed 128 bit integer to self in little-endian …","Writes a signed 128 bit integer to self in little-endian …","Writes a signed 128 bit integer to self in native-endian …","Writes a signed 128 bit integer to self in native-endian …","Writes a signed 16 bit integer to self in big-endian byte …","Writes a signed 16 bit integer to self in big-endian byte …","Writes a signed 16 bit integer to self in little-endian …","Writes a signed 16 bit integer to self in little-endian …","Writes a signed 16 bit integer to self in native-endian …","Writes a signed 16 bit integer to self in native-endian …","Writes a signed 32 bit integer to self in big-endian byte …","Writes a signed 32 bit integer to self in big-endian byte …","Writes a signed 32 bit integer to self in little-endian …","Writes a signed 32 bit integer to self in little-endian …","Writes a signed 32 bit integer to self in native-endian …","Writes a signed 32 bit integer to self in native-endian …","Writes a signed 64 bit integer to self in the big-endian …","Writes a signed 64 bit integer to self in the big-endian …","Writes a signed 64 bit integer to self in little-endian …","Writes a signed 64 bit integer to self in little-endian …","Writes a signed 64 bit integer to self in native-endian …","Writes a signed 64 bit integer to self in native-endian …","Writes a signed 8 bit integer to self.","Writes a signed 8 bit integer to self.","Writes low nbytes of a signed integer to self in …","Writes low nbytes of a signed integer to self in …","Writes low nbytes of a signed integer to self in …","Writes low nbytes of a signed integer to self in …","Writes low nbytes of a signed integer to self in …","Writes low nbytes of a signed integer to self in …","Transfer bytes into self from src and advance the cursor …","Transfer bytes into self from src and advance the cursor …","Writes an unsigned 128 bit integer to self in the …","Writes an unsigned 128 bit integer to self in the …","Writes an unsigned 128 bit integer to self in …","Writes an unsigned 128 bit integer to self in …","Writes an unsigned 128 bit integer to self in …","Writes an unsigned 128 bit integer to self in …","Writes an unsigned 16 bit integer to self in big-endian …","Writes an unsigned 16 bit integer to self in big-endian …","Writes an unsigned 16 bit integer to self in little-endian …","Writes an unsigned 16 bit integer to self in little-endian …","Writes an unsigned 16 bit integer to self in native-endian …","Writes an unsigned 16 bit integer to self in native-endian …","Writes an unsigned 32 bit integer to self in big-endian …","Writes an unsigned 32 bit integer to self in big-endian …","Writes an unsigned 32 bit integer to self in little-endian …","Writes an unsigned 32 bit integer to self in little-endian …","Writes an unsigned 32 bit integer to self in native-endian …","Writes an unsigned 32 bit integer to self in native-endian …","Writes an unsigned 64 bit integer to self in the …","Writes an unsigned 64 bit integer to self in the …","Writes an unsigned 64 bit integer to self in little-endian …","Writes an unsigned 64 bit integer to self in little-endian …","Writes an unsigned 64 bit integer to self in native-endian …","Writes an unsigned 64 bit integer to self in native-endian …","Writes an unsigned 8 bit integer to self.","Writes an unsigned 8 bit integer to self.","Writes an unsigned n-byte integer to self in big-endian …","Writes an unsigned n-byte integer to self in big-endian …","Writes an unsigned n-byte integer to self in the …","Writes an unsigned n-byte integer to self in the …","Writes an unsigned n-byte integer to self in the …","Writes an unsigned n-byte integer to self in the …","","Creates an adaptor which implements the Read trait for self…","Creates an adaptor which implements the Read trait for self…","Returns the number of bytes between the current position …","","","Returns the number of bytes that can be written from the …","","","Sets the maximum number of bytes that can be written.","Sets the maximum number of bytes that can be read.","","Creates an adaptor which will read at most limit bytes …","Creates an adaptor which will read at most limit bytes …","","","","","","","","","","","","","","","","","","","","Creates a &mut UninitSlice wrapping a slice of …","","Write a single byte at the specified offset.","Creates an adaptor which implements the Write trait for …","Creates an adaptor which implements the Write trait for …"],"i":[0,0,0,0,1,4,4,4,1,4,1,1,4,4,1,4,4,0,4,1,4,4,1,4,1,4,1,4,1,4,1,1,4,1,4,1,4,4,1,4,1,1,1,1,1,1,1,4,4,4,4,4,4,4,4,4,4,4,1,1,1,4,4,4,4,1,1,1,1,1,1,1,4,4,4,1,4,4,1,1,4,1,4,1,1,4,4,1,4,1,4,1,4,1,1,1,1,1,1,4,4,4,4,4,4,4,4,4,1,4,4,4,4,4,1,1,4,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,21,27,28,29,27,30,7,7,7,27,36,30,32,28,34,7,27,36,30,32,28,34,21,21,29,29,21,27,28,29,27,30,21,21,27,32,7,21,21,27,28,21,21,32,27,27,34,7,27,36,30,32,28,34,7,7,27,36,30,32,28,34,7,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,36,30,32,28,34,36,30,32,28,34,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,29,29,7,7,7,7,7,7,7,7,7,7,7,7,27,36,30,32,28,34,27,36,30,32,28,34,27,36,27,27,7,29,29,30,28,7,36,36,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,32,21,21,21,27,28,29,27,30,30,28,36,21,21,27,36,30,32,28,34,27,36,30,32,28,34,7,27,36,30,32,28,34,7,34,7,29,29],"f":[0,0,0,0,[[1,2],3],[[4,2],3],[[4,2],3],[4,[[6,[5]]]],[1,[[6,[5]]]],[4,[[6,[5]]]],[-1,-2,[],[]],[1,[[6,[5]]]],[4,[[6,[5]]]],[-1,-2,[],[]],[-1,-2,[],[]],[4,[[6,[5]]]],[-1,-2,[],[]],0,[4,2],[1,[[6,[5]]]],[4,[[6,[5]]]],[4,7],[1,3],[4,3],[1,1],[4,4],[[-1,-2],3,[],[]],[[-1,-2],3,[],[]],[[1,1],8],[[4,4],8],[[[6,[5]]],1],[[1,2],1],[[4,2],1],[[],1],[[],4],[1,[[6,[5]]]],[4,[[6,[5]]]],[4,[[6,[5]]]],[1,3],[4,3],[[1,1],9],[[1,10],9],[[1,[6,[5]]],9],[[1,-1],9,11],[[1,12],9],[[1,[13,[5]]],9],[[1,4],9],[[4,-1],9,11],[[4,10],9],[[4,4],9],[[4,[6,[5]]],9],[[4,1],9],[[4,[13,[5]]],9],[[4,12],9],[[4,-1],3,[[15,[],[[14,[5]]]]]],[[4,-1],3,[[15,[],[[14,[5]]]]]],[[4,-1],3,[[15,[],[[14,[1]]]]]],[[4,[6,[5]]],3],[[1,16],17],[[1,16],17],[[1,16],17],[[4,16],17],[[4,16],17],[[4,16],17],[4,1],[[[18,[[6,[5]]]]],1],[[[13,[5]]],1],[4,1],[10,1],[12,1],[[[6,[5]]],1],[-1,-1,[]],[[[6,[5]]],4],[-1,-1,[]],[12,4],[-1,1,[[15,[],[[14,[5]]]]]],[-1,4,[[15,[],[[14,[5]]]]]],[-1,4,[[15,[],[[14,[5]]]]]],[[[6,[5]]],1],[[1,-1],3,19],[[4,-1],3,19],[-1,-2,[],[]],[-1,-2,[],[]],[1,-1,[]],[1,-1,[]],[4,-1,[]],[4,-1,[]],[1,9],[4,9],[1,2],[4,2],[[],1],[[],4],[[1,[6,[5]]],[[20,[8]]]],[[1,1],[[20,[8]]]],[[1,10],[[20,[8]]]],[[1,[13,[5]]],[[20,[8]]]],[[1,12],[[20,[8]]]],[[1,-1],[[20,[8]]],11],[[4,4],[[20,[8]]]],[[4,[6,[5]]],[[20,[8]]]],[[4,10],[[20,[8]]]],[[4,[13,[5]]],[[20,[8]]]],[[4,-1],[[20,[8]]],11],[[4,12],[[20,[8]]]],[[4,-1],3,21],[[4,5,2],3],[[4,[6,[5]]],3],[1,2],[4,2],[4,2],[[4,2],3],[[4,2,5],3],[[4,2],3],[[1,-1],1,[[22,[2]]]],[[1,[6,[5]]],1],[4,[[6,[[23,[5]]]]]],[4,4],[[1,2],1],[[4,2],4],[[1,2],1],[[4,2],4],[-1,-2,[],[]],[-1,-2,[],[]],[[1,2],3],[[4,2],3],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,25,[]],[-1,25,[]],[[4,4],3],[2,4],[[4,26],17],[[4,12],17],[2,4],0,0,0,0,0,0,0,0,0,[[21,2],3],[[[27,[-1,-2]],2],3,21,21],[[[28,[-1]],2],3,21],[[29,2],3],[[[27,[-1,-2]],2],3,29,29],[[[30,[-1]],2],3,29],[7,5],[7,[[6,[[23,[5]]]]]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[21,-1],[[27,[21,-1]]],21],[[21,-1],[[27,[21,-1]]],21],[[29,-1],[[27,[29,-1]]],29],[[29,-1],[[27,[29,-1]]],29],[21,[[6,[5]]]],[[[27,[-1,-2]]],[[6,[5]]],21,21],[[[28,[-1]]],[[6,[5]]],21],[29,7],[[[27,[-1,-2]]],7,29,29],[[[30,[-1]]],7,29],[[21,[6,[31]]],2],[[21,[6,[31]]],2],[[[27,[-1,-2]],[6,[31]]],2,21,21],[[[32,[-1]],2],3,[21,11]],[[7,[6,[5]]],3],[[21,2],1],[[21,2],1],[[[27,[-1,-2]],2],1,21,21],[[[28,[-1]],2],1,21],[[21,[6,[5]]],3],[[21,[6,[5]]],3],[[[32,[-1]]],[[33,[[6,[5]]]]],[21,11]],[[[27,[-1,-2]]],-1,[],[]],[[[27,[-1,-2]]],-1,[],[]],[[[34,[-1]]],[[33,[3]]],[29,11]],[[7,16],17],[[[27,[-1,-2]],16],17,35,35],[[[36,[-1]],16],17,35],[[[30,[-1]],16],17,35],[[[32,[-1]],16],17,35],[[[28,[-1]],16],17,35],[[[34,[-1]],16],17,35],[[[6,[[23,[5]]]]],7],[[[6,[5]]],7],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[[5,2],7],[21,37],[21,37],[21,37],[21,37],[21,37],[21,37],[21,38],[21,38],[21,38],[21,38],[21,38],[21,38],[21,39],[21,39],[21,39],[21,39],[21,39],[21,39],[21,40],[21,40],[21,40],[21,40],[21,40],[21,40],[21,41],[21,41],[21,41],[21,41],[21,41],[21,41],[21,42],[21,42],[21,42],[21,42],[21,42],[21,42],[21,43],[21,43],[[21,2],42],[[21,2],42],[[21,2],42],[[21,2],42],[[21,2],42],[[21,2],42],[[[36,[-1]]],-1,[]],[[[30,[-1]]],-1,[]],[[[32,[-1]]],-1,21],[[[28,[-1]]],-1,[]],[[[34,[-1]]],-1,29],[[[36,[-1]]],-1,[]],[[[30,[-1]]],-1,[]],[[[32,[-1]]],-1,21],[[[28,[-1]]],-1,[]],[[[34,[-1]]],-1,29],[21,44],[21,44],[21,44],[21,44],[21,44],[21,44],[21,45],[21,45],[21,45],[21,45],[21,45],[21,45],[21,46],[21,46],[21,46],[21,46],[21,46],[21,46],[21,47],[21,47],[21,47],[21,47],[21,47],[21,47],[21,5],[21,5],[[21,2],47],[[21,2],47],[[21,2],47],[[21,2],47],[[21,2],47],[[21,2],47],[21,9],[21,9],[29,9],[29,9],[[7,48],7],[[7,[49,[2]]],7],[[7,[50,[2]]],7],[[7,[51,[2]]],7],[[7,[52,[2]]],7],[[7,[53,[2]]],7],[[7,[49,[2]]],7],[[7,[52,[2]]],7],[[7,[50,[2]]],7],[[7,[51,[2]]],7],[[7,48],7],[[7,[53,[2]]],7],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[[27,[-1,-2]]],[[3,[-1,-2]]],[],[]],[[[36,[-1]]],-1,[]],[[[30,[-1]]],-1,[]],[[[32,[-1]]],-1,21],[[[28,[-1]]],-1,[]],[[[34,[-1]]],-1,29],[[[27,[-1,-2]]],-3,21,21,[]],[-1,-2,[],[]],[[[27,[-1,-2]]],-2,[],[]],[[[27,[-1,-2]]],-2,[],[]],[7,2],[[29,2],[[30,[29]]]],[[29,2],[[30,[29]]]],[[[30,[-1]]],2,[]],[[[28,[-1]]],2,[]],[[[6,[5]]],7],[-1,[[36,[-1]]],[]],[[[36,[-1]]],[[20,[5]]],21],[[29,-1],3,21],[[29,-1],3,21],[[29,5,2],3],[[29,5,2],3],[[29,37],3],[[29,37],3],[[29,37],3],[[29,37],3],[[29,37],3],[[29,37],3],[[29,38],3],[[29,38],3],[[29,38],3],[[29,38],3],[[29,38],3],[[29,38],3],[[29,39],3],[[29,39],3],[[29,39],3],[[29,39],3],[[29,39],3],[[29,39],3],[[29,40],3],[[29,40],3],[[29,40],3],[[29,40],3],[[29,40],3],[[29,40],3],[[29,41],3],[[29,41],3],[[29,41],3],[[29,41],3],[[29,41],3],[[29,41],3],[[29,42],3],[[29,42],3],[[29,42],3],[[29,42],3],[[29,42],3],[[29,42],3],[[29,43],3],[[29,43],3],[[29,42,2],3],[[29,42,2],3],[[29,42,2],3],[[29,42,2],3],[[29,42,2],3],[[29,42,2],3],[[29,[6,[5]]],3],[[29,[6,[5]]],3],[[29,44],3],[[29,44],3],[[29,44],3],[[29,44],3],[[29,44],3],[[29,44],3],[[29,45],3],[[29,45],3],[[29,45],3],[[29,45],3],[[29,45],3],[[29,45],3],[[29,46],3],[[29,46],3],[[29,46],3],[[29,46],3],[[29,46],3],[[29,46],3],[[29,47],3],[[29,47],3],[[29,47],3],[[29,47],3],[[29,47],3],[[29,47],3],[[29,5],3],[[29,5],3],[[29,47,2],3],[[29,47,2],3],[[29,47,2],3],[[29,47,2],3],[[29,47,2],3],[[29,47,2],3],[[[32,[-1]],[6,[5]]],[[33,[2]]],[21,11]],[21,[[32,[21]]]],[21,[[32,[21]]]],[21,2],[[[27,[-1,-2]]],2,21,21],[[[28,[-1]]],2,21],[29,2],[[[27,[-1,-2]]],2,29,29],[[[30,[-1]]],2,29],[[[30,[-1]],2],3,[]],[[[28,[-1]],2],3,[]],[[[36,[-1]]],[[3,[2,[20,[2]]]]],21],[[21,2],[[28,[21]]]],[[21,2],[[28,[21]]]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,[[24,[-2]]],[],[]],[-1,25,[]],[-1,25,[]],[-1,25,[]],[-1,25,[]],[-1,25,[]],[-1,25,[]],[-1,25,[]],[[[6,[[23,[5]]]]],7],[[[34,[-1]],[6,[5]]],[[33,[2]]],[29,11]],[[7,2,5],3],[29,[[34,[29]]]],[29,[[34,[29]]]]],"c":[],"p":[[5,"Bytes",0],[1,"usize"],[1,"tuple"],[5,"BytesMut",0],[1,"u8"],[1,"slice"],[5,"UninitSlice",137],[6,"Ordering",455],[1,"bool"],[5,"String",456],[10,"Sized",457],[1,"str"],[5,"Vec",458],[17,"Item"],[10,"IntoIterator",459],[5,"Formatter",460],[8,"Result",460],[5,"Box",461],[10,"Hasher",462],[6,"Option",463],[10,"Buf",137],[10,"RangeBounds",464],[20,"MaybeUninit",465],[6,"Result",466],[5,"TypeId",467],[5,"Arguments",460],[5,"Chain",137],[5,"Take",137],[10,"BufMut",137],[5,"Limit",137],[5,"IoSlice",468],[5,"Reader",137],[8,"Result",469],[5,"Writer",137],[10,"Debug",460],[5,"IntoIter",137],[1,"f32"],[1,"f64"],[1,"i128"],[1,"i16"],[1,"i32"],[1,"i64"],[1,"i8"],[1,"u128"],[1,"u16"],[1,"u32"],[1,"u64"],[5,"RangeFull",464],[5,"RangeFrom",464],[5,"RangeToInclusive",464],[5,"RangeTo",464],[5,"Range",464],[5,"RangeInclusive",464]],"b":[[40,"impl-PartialEq-for-Bytes"],[41,"impl-PartialEq%3CString%3E-for-Bytes"],[42,"impl-PartialEq%3C%5Bu8%5D%3E-for-Bytes"],[43,"impl-PartialEq%3C%26T%3E-for-Bytes"],[44,"impl-PartialEq%3Cstr%3E-for-Bytes"],[45,"impl-PartialEq%3CVec%3Cu8%3E%3E-for-Bytes"],[46,"impl-PartialEq%3CBytesMut%3E-for-Bytes"],[47,"impl-PartialEq%3C%26T%3E-for-BytesMut"],[48,"impl-PartialEq%3CString%3E-for-BytesMut"],[49,"impl-PartialEq-for-BytesMut"],[50,"impl-PartialEq%3C%5Bu8%5D%3E-for-BytesMut"],[51,"impl-PartialEq%3CBytes%3E-for-BytesMut"],[52,"impl-PartialEq%3CVec%3Cu8%3E%3E-for-BytesMut"],[53,"impl-PartialEq%3Cstr%3E-for-BytesMut"],[54,"impl-Extend%3C%26u8%3E-for-BytesMut"],[55,"impl-Extend%3Cu8%3E-for-BytesMut"],[56,"impl-Extend%3CBytes%3E-for-BytesMut"],[58,"impl-LowerHex-for-Bytes"],[59,"impl-Debug-for-Bytes"],[60,"impl-UpperHex-for-Bytes"],[61,"impl-UpperHex-for-BytesMut"],[62,"impl-Debug-for-BytesMut"],[63,"impl-LowerHex-for-BytesMut"],[65,"impl-From%3CBox%3C%5Bu8%5D%3E%3E-for-Bytes"],[66,"impl-From%3CVec%3Cu8%3E%3E-for-Bytes"],[67,"impl-From%3CBytesMut%3E-for-Bytes"],[68,"impl-From%3CString%3E-for-Bytes"],[69,"impl-From%3C%26str%3E-for-Bytes"],[70,"impl-From%3C%26%5Bu8%5D%3E-for-Bytes"],[72,"impl-From%3C%26%5Bu8%5D%3E-for-BytesMut"],[74,"impl-From%3C%26str%3E-for-BytesMut"],[76,"impl-FromIterator%3C%26u8%3E-for-BytesMut"],[77,"impl-FromIterator%3Cu8%3E-for-BytesMut"],[83,"impl-IntoIterator-for-%26Bytes"],[84,"impl-IntoIterator-for-Bytes"],[85,"impl-IntoIterator-for-%26BytesMut"],[86,"impl-IntoIterator-for-BytesMut"],[93,"impl-PartialOrd%3C%5Bu8%5D%3E-for-Bytes"],[94,"impl-PartialOrd-for-Bytes"],[95,"impl-PartialOrd%3CString%3E-for-Bytes"],[96,"impl-PartialOrd%3CVec%3Cu8%3E%3E-for-Bytes"],[97,"impl-PartialOrd%3Cstr%3E-for-Bytes"],[98,"impl-PartialOrd%3C%26T%3E-for-Bytes"],[99,"impl-PartialOrd-for-BytesMut"],[100,"impl-PartialOrd%3C%5Bu8%5D%3E-for-BytesMut"],[101,"impl-PartialOrd%3CString%3E-for-BytesMut"],[102,"impl-PartialOrd%3CVec%3Cu8%3E%3E-for-BytesMut"],[103,"impl-PartialOrd%3C%26T%3E-for-BytesMut"],[104,"impl-PartialOrd%3Cstr%3E-for-BytesMut"],[200,"impl-From%3C%26mut+%5BMaybeUninit%3Cu8%3E%5D%3E-for-%26mut+UninitSlice"],[201,"impl-From%3C%26mut+%5Bu8%5D%3E-for-%26mut+UninitSlice"],[299,"impl-Index%3CRangeFull%3E-for-UninitSlice"],[300,"impl-Index%3CRangeFrom%3Cusize%3E%3E-for-UninitSlice"],[301,"impl-Index%3CRangeToInclusive%3Cusize%3E%3E-for-UninitSlice"],[302,"impl-Index%3CRangeTo%3Cusize%3E%3E-for-UninitSlice"],[303,"impl-Index%3CRange%3Cusize%3E%3E-for-UninitSlice"],[304,"impl-Index%3CRangeInclusive%3Cusize%3E%3E-for-UninitSlice"],[305,"impl-IndexMut%3CRangeFrom%3Cusize%3E%3E-for-UninitSlice"],[306,"impl-IndexMut%3CRange%3Cusize%3E%3E-for-UninitSlice"],[307,"impl-IndexMut%3CRangeToInclusive%3Cusize%3E%3E-for-UninitSlice"],[308,"impl-IndexMut%3CRangeTo%3Cusize%3E%3E-for-UninitSlice"],[309,"impl-IndexMut%3CRangeFull%3E-for-UninitSlice"],[310,"impl-IndexMut%3CRangeInclusive%3Cusize%3E%3E-for-UninitSlice"]]}],\ +["ping_rs",{"doc":"","t":"PPGPPCNNHCCNNCCCNNNNNPFPFPFPFPFPFGFPFPFPFPFPFPFPFPFPFPFPFPFPFPFOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNOOOOOONNNOONNNNNNNNNNNNNNNNNNNNNOOOOOOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOPFPFPFPFGPFFPFPFOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOONNNNNNNNNOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOONNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOPPPFGGPPPPGPPPPNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNKKSKFKNNNNONNNMMNONNNNNMOMMNNOOMNNNNONNNNNNPFPFPFPPFFPFPFPFPFGPFPFPFPFFPFPFPFPFPFPFPFPFPFPFPFPFPFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOPFPFPFPFGPFFPFPFOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOONNNNNNNNOONNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOONNNNNNNNNNNNOOOOOOOOOOOOOOOOONNNNNNNNOOOOONNNNNNNNNOOOOOOOOONNNNNNNNNNNNNNNNNNNNNNNNNNN","n":["Bluebps","Common","Messages","Ping1D","Ping360","bluebps","borrow","borrow_mut","calculate_crc","common","decoder","from","into","message","ping1d","ping360","try_from","try_from","try_from","try_into","type_id","CellTimeout","CellTimeoutStruct","CellVoltageMin","CellVoltageMinStruct","CurrentMax","CurrentMaxStruct","CurrentTimeout","CurrentTimeoutStruct","EraseFlash","EraseFlashStruct","Events","EventsStruct","Messages","PingProtocolHead","Reboot","RebootStruct","ResetDefaults","ResetDefaultsStruct","SetCellVoltageMinimum","SetCellVoltageMinimumStruct","SetCellVoltageTimeout","SetCellVoltageTimeoutStruct","SetCurrentMax","SetCurrentMaxStruct","SetCurrentTimeout","SetCurrentTimeoutStruct","SetLpfSampleFrequency","SetLpfSampleFrequencyStruct","SetLpfSetting","SetLpfSettingStruct","SetStreamRate","SetStreamRateStruct","SetTemperatureMax","SetTemperatureMaxStruct","SetTemperatureTimeout","SetTemperatureTimeoutStruct","State","StateStruct","TemperatureMax","TemperatureMaxStruct","TemperatureTimeout","TemperatureTimeoutStruct","battery_current","battery_temperature","battery_voltage","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","cell_voltages","cell_voltages_length","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","cpu_temperature","current","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","destiny_device_id","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","flags","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","goto_bootloader","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","limit","limit","limit","limit","limit","limit","message_id","message_id_from_name","message_name","rate","sample_frequency","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","setting","source_device_id","temperature","timeout","timeout","timeout","timeout","timeout","timeout","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","voltage","Ack","AckStruct","AsciiText","AsciiTextStruct","DeviceInformation","DeviceInformationStruct","GeneralRequest","GeneralRequestStruct","Messages","Nack","NackStruct","PingProtocolHead","ProtocolVersion","ProtocolVersionStruct","SetDeviceId","SetDeviceIdStruct","acked_id","ascii_message","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","default","default","default","default","default","default","default","default","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","destiny_device_id","device_id","device_revision","device_type","eq","eq","eq","eq","eq","eq","eq","eq","eq","firmware_version_major","firmware_version_minor","firmware_version_patch","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","into","into","into","into","into","into","into","into","into","message_id","message_id_from_name","message_name","nack_message","nacked_id","requested_id","reserved","reserved","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","source_device_id","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","version_major","version_minor","version_patch","AwaitingStart1","AwaitingStart2","ChecksumError","Decoder","DecoderResult","DecoderState","Error","InProgress","IncompleteData","InvalidStartByte","ParseError","ReadingChecksum","ReadingHeader","ReadingPayload","Success","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","fmt","fmt","fmt","from","from","from","from","into","into","into","into","new","parse_byte","state","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","DeserializeGenericMessage","DeserializePayload","HEADER","PingMessage","ProtocolMessage","SerializePayload","borrow","borrow_mut","calculate_crc","checksum","checksum","clone","clone_into","default","deserialize","deserialize","dst_device_id","dst_device_id","fmt","from","has_valid_crc","into","length","message_id","message_id","message_id_from_name","message_name","new","payload","payload","payload_length","serialize","serialized","set_dst_device_id","set_message","set_src_device_id","src_device_id","to_owned","try_from","try_into","type_id","update_checksum","write","ContinuousStart","ContinuousStartStruct","ContinuousStop","ContinuousStopStruct","DeviceId","DeviceIdStruct","Distance","DistanceSimple","DistanceSimpleStruct","DistanceStruct","FirmwareVersion","FirmwareVersionStruct","GainSetting","GainSettingStruct","GeneralInfo","GeneralInfoStruct","GotoBootloader","GotoBootloaderStruct","Messages","ModeAuto","ModeAutoStruct","PcbTemperature","PcbTemperatureStruct","PingEnable","PingEnableStruct","PingInterval","PingIntervalStruct","PingProtocolHead","ProcessorTemperature","ProcessorTemperatureStruct","Profile","ProfileStruct","Range","RangeStruct","SetDeviceId","SetDeviceIdStruct","SetGainSetting","SetGainSettingStruct","SetModeAuto","SetModeAutoStruct","SetPingEnable","SetPingEnableStruct","SetPingInterval","SetPingIntervalStruct","SetRange","SetRangeStruct","SetSpeedOfSound","SetSpeedOfSoundStruct","SpeedOfSound","SpeedOfSoundStruct","TransmitDuration","TransmitDurationStruct","Voltage5","Voltage5Struct","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","confidence","confidence","confidence","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","default","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","destiny_device_id","device_id","device_id","device_model","device_type","distance","distance","distance","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","eq","firmware_version_major","firmware_version_major","firmware_version_minor","firmware_version_minor","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","from","gain_setting","gain_setting","gain_setting","gain_setting","gain_setting","id","id","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","into","message_id","message_id_from_name","message_name","mode_auto","mode_auto","mode_auto","pcb_temperature","ping_enabled","ping_enabled","ping_interval","ping_interval","ping_interval","ping_number","ping_number","processor_temperature","profile_data","profile_data_length","scan_length","scan_length","scan_length","scan_length","scan_start","scan_start","scan_start","scan_start","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","source_device_id","speed_of_sound","speed_of_sound","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","transmit_duration","transmit_duration","transmit_duration","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","voltage_5","voltage_5","AutoDeviceData","AutoDeviceDataStruct","AutoTransmit","AutoTransmitStruct","DeviceData","DeviceDataStruct","DeviceId","DeviceIdStruct","Messages","MotorOff","MotorOffStruct","PingProtocolHead","Reset","ResetStruct","Transducer","TransducerStruct","angle","angle","angle","bootloader","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","data","data","data_length","data_length","default","default","default","default","default","default","default","default","delay","delay","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","destiny_device_id","eq","eq","eq","eq","eq","eq","eq","eq","eq","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","gain_setting","gain_setting","gain_setting","gain_setting","id","into","into","into","into","into","into","into","into","into","message_id","message_id_from_name","message_name","mode","mode","mode","mode","num_steps","num_steps","number_of_samples","number_of_samples","number_of_samples","number_of_samples","reserved","reserved","reserved","sample_period","sample_period","sample_period","sample_period","serialize","serialize","serialize","serialize","serialize","serialize","serialize","serialize","source_device_id","start_angle","start_angle","stop_angle","stop_angle","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","transmit","transmit_duration","transmit_duration","transmit_duration","transmit_duration","transmit_frequency","transmit_frequency","transmit_frequency","transmit_frequency","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id"],"q":[[0,"ping_rs"],[21,"ping_rs::bluebps"],[421,"ping_rs::common"],[590,"ping_rs::decoder"],[639,"ping_rs::message"],[682,"ping_rs::ping1d"],[1208,"ping_rs::ping360"],[1406,"core::result"],[1407,"alloc::vec"],[1408,"core::any"],[1409,"core::fmt"],[1410,"core::fmt"],[1411,"std::io"],[1412,"std::io::error"]],"d":["","","","","","","","","","","","Returns the argument unchanged.","Calls U::from(self).","","","","","","","","","","Get the undervoltage timeout","","Get the minimum allowed cell voltage","","get the maximum allowed battery current","","Get the over-current timeout","","Erase flash, including parameter configuration and event …","","A record of events causing a power lock-out. These numbers …","","","","reboot the system","","Reset parameter configuration to default values.","","Set the minimum allowed cell voltage","","Set the under-voltage timeout","","Set the maximum allowed battery current","","Set the over-current timeout","","the frequency to take adc samples and run the filter.","","Low pass filter setting. This value represents x in the …","","Set the frequency to automatically output state messages.","","Set the maximum allowed battery temperature","","Set the over-temperature timeout","","Get the current state of the device","","Get the maximum allowed battery temperature","","Get the over-temperature timeout","The current measurement","The battery temperature","The main battery voltage","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Array containing cell voltages","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The cpu temperature","The number of over-current events","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","flags indicating if any of the configured limits are …","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","0 = normal reboot, run main application after reboot 1 = …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","The maximum temperature allowed at the thermistor probe …","The minimum voltage allowed for any individual cell. …","The maximum allowed battery current 0~20000 = 0~200A","The minimum voltage allowed for any individual cell. …","The minimum voltage allowed for any individual cell. …","The maximum allowed battery current 0~20000 = 0~200A","","","","Rate to stream state messages. 0~100000Hz","sample frequency in Hz. 1~100000","","","","","","","","","","","","","","","","","","","","","","0~999: x = 0~0.999","","The number of over-temperature events","If an individual cell exceeds the configured limit for …","If an individual cell exceeds the configured limit for …","If the battery temperature exceeds the configured limit …","If the battery current exceeds the configured limit for …","If the battery temperature exceeds the configured limit …","If the battery current exceeds the configured limit for …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The number of under-voltage events","","Acknowledged.","","A message for transmitting text data.","","Device information","","Requests a specific message to be sent from the sonar to …","","","Not acknowledged.","","","The protocol version","","Set the device ID.","The message ID that is ACKnowledged.","ASCII text message. (not necessarily NULL terminated)","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Device ID (1-254). 0 is unknown and 255 is reserved for …","device-specific hardware revision","Device type. 0: Unknown; 1: Ping Echosounder; 2: Ping360","","","","","","","","","","Firmware version major number.","Firmware version minor number.","Firmware version patch number.","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","ASCII text message indicating NACK condition. (not …","The message ID that is Not ACKnowledged.","Message ID to be requested.","reserved","reserved","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Protocol version major number.","Protocol version minor number.","Protocol version patch number.","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","","Calls U::from(self).","","","","","","Message Format","","","","","","","","","","","","","","","","","Command to initiate continuous data stream of profile …","","Command to stop the continuous data stream of profile …","","The device ID.","","","The distance to target with confidence estimate.","The distance to target with confidence estimate. Relevant …","","Device information","","The current gain setting.","","General information.","","Send the device into the bootloader. This is useful for …","","","The current operating mode of the device. Manual mode …","","Temperature of the on-board thermistor.","","Acoustic output enabled state.","","The interval between acoustic measurements.","","","Temperature of the device cpu.","","A profile produced from a single acoustic measurement. The …","","The scan range for acoustic measurements. Measurements …","","Set the device ID.","","Set the current gain setting.","","Set automatic or manual mode. Manual mode allows for …","","Enable or disable acoustic measurements.","","The interval between acoustic measurements.","","Set the scan range for acoustic measurements.","","Set the speed of sound used for distance calculations.","","The speed of sound used for distance calculations.","","The duration of the acoustic activation/transmission.","","The 5V rail voltage.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Confidence in the most recent range measurement.","Confidence in the most recent range measurement.","Confidence in the distance measurement.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Device ID (0-254). 255 is reserved for broadcast messages.","The device ID (0-254). 255 is reserved for broadcast …","Device model. 0: Unknown; 1: Ping1D","Device type. 0: Unknown; 1: Echosounder","The current return distance determined for the most recent …","The current return distance determined for the most recent …","Distance to the target.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Firmware version major number.","Firmware major version.","Firmware version minor number.","Firmware minor version.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, …","The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, …","The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, …","The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, …","The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, …","The message id to stop streaming. 1300: profile","The message id to stream. 1300: profile","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","0: manual mode. 1: auto mode.","0: manual mode, 1: auto mode","The current operating mode of the device. 0: manual mode, …","The temperature in centi-degrees Centigrade (100 * degrees …","0: Disable, 1: Enable.","The state of the acoustic output. 0: disabled, 1:enabled","The minimum interval between acoustic measurements. The …","The interval between acoustic measurements.","The interval between acoustic measurements.","The pulse/measurement count since boot.","The pulse/measurement count since boot.","The temperature in centi-degrees Centigrade (100 * degrees …","","An array of return strength measurements taken at regular …","The length of the scan region.","The length of the scan range.","The length of the scan region.","The length of the scan range.","The beginning of the scan region in mm from the transducer.","The beginning of the scan range in mm from the transducer.","The beginning of the scan region in mm from the transducer.","Not documented","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The speed of sound in the measurement medium. ~1,500,000 …","The speed of sound in the measurement medium. ~1,500,000 …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The acoustic pulse length during acoustic …","The acoustic pulse length during acoustic …","Acoustic pulse duration.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The 5V rail voltage.","Device supply voltage.","","Extended version of device_data with auto_transmit …","","Extended transducer message with auto-scan function. The …","","This message is used to communicate the current sonar …","","Change the device id","","","The sonar switches the current through the stepper motor …","","","Reset the sonar. The bootloader may run depending on the …","","The transducer will apply the commanded settings. The …","Head angle","Head angle","Head angle","0 = skip bootloader; 1 = run bootloader","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","8 bit binary data array representing sonar echo strength","8 bit binary data array representing sonar echo strength","","","","","","","","","An additional delay between successive transmit pulses …","An additional delay between successive transmit pulses …","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Analog gain setting (0 = low, 1 = normal, 2 = high)","Analog gain setting (0 = low, 1 = normal, 2 = high)","Analog gain setting (0 = low, 1 = normal, 2 = high)","Analog gain setting (0 = low, 1 = normal, 2 = high)","Device ID (1-254). 0 and 255 are reserved.","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","Operating mode (1 for Ping360)","Operating mode (1 for Ping360)","Operating mode (1 for Ping360)","Operating mode (1 for Ping360)","Number of 0.9 degree motor steps between pings for auto …","Number of 0.9 degree motor steps between pings for auto …","Number of samples per reflected signal","Number of samples per reflected signal","Number of samples per reflected signal","Number of samples per reflected signal","reserved","reserved","reserved","Time interval between individual signal intensity samples …","Time interval between individual signal intensity samples …","Time interval between individual signal intensity samples …","Time interval between individual signal intensity samples …","","","","","","","","","","Head angle to begin scan sector for autoscan in gradians …","Head angle to begin scan sector for autoscan in gradians …","Head angle to end scan sector for autoscan in gradians …","Head angle to end scan sector for autoscan in gradians …","","","","","","","","","","0 = do not transmit; 1 = transmit after the transducer has …","Acoustic transmission duration (1~1000 microseconds)","Acoustic transmission duration (1~1000 microseconds)","Acoustic transmission duration (1~1000 microseconds)","Acoustic transmission duration (1~1000 microseconds)","Acoustic operating frequency. Frequency range is 500kHz to …","Acoustic operating frequency. Frequency range is 500kHz to …","Acoustic operating frequency. Frequency range is 500kHz to …","Acoustic operating frequency. Frequency range is 500kHz to …","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"i":[6,6,0,6,6,0,6,6,0,0,0,6,6,0,0,0,6,6,6,6,6,10,0,10,0,10,0,10,0,10,0,10,0,0,0,10,0,10,0,10,0,10,0,10,0,10,0,10,0,10,0,10,0,10,0,10,0,10,0,10,0,10,0,25,25,25,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,25,25,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,25,29,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,9,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,25,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,14,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,11,15,19,22,24,30,10,10,10,21,28,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,23,9,29,12,13,16,17,20,26,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,29,38,0,38,0,38,0,38,0,0,38,0,0,38,0,38,0,43,40,37,38,39,40,41,42,43,44,45,37,38,39,40,41,42,43,44,45,37,38,39,40,41,42,43,44,45,37,38,39,40,41,42,43,44,45,37,39,40,41,42,43,44,45,38,39,40,41,42,43,44,45,37,45,41,41,37,38,39,40,41,42,43,44,45,41,41,41,37,38,39,40,41,42,43,44,45,37,38,39,40,41,42,43,44,45,37,38,39,40,41,42,43,44,45,38,38,38,39,39,44,41,42,38,39,40,41,42,43,44,45,37,37,38,39,40,41,42,43,44,45,37,38,39,40,41,42,43,44,45,37,38,39,40,41,42,43,44,45,37,38,39,40,41,42,43,44,45,42,42,42,48,48,46,0,0,0,47,47,46,46,0,48,48,48,47,49,46,47,48,49,46,47,48,46,47,48,49,46,47,48,49,46,47,48,49,49,49,49,46,47,48,49,46,47,48,49,46,47,48,0,0,0,0,0,0,7,7,7,7,7,7,7,7,50,51,7,7,7,7,7,7,7,53,7,53,53,7,7,7,7,54,7,7,7,7,7,7,7,7,7,7,7,58,0,58,0,58,0,58,58,0,0,58,0,58,0,58,0,58,0,0,58,0,58,0,58,0,58,0,0,58,0,58,0,58,0,58,0,58,0,58,0,58,0,58,0,58,0,58,0,58,0,58,0,58,0,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,62,72,82,57,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,57,68,71,73,73,62,72,82,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,73,84,73,84,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,62,72,80,83,84,65,67,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,58,58,58,76,78,84,60,59,81,66,70,84,62,72,63,72,72,62,64,72,75,62,64,72,75,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,57,61,79,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,62,72,74,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,77,84,86,0,86,0,86,0,86,0,0,86,0,0,86,0,86,0,88,90,91,89,85,86,87,88,89,90,91,92,93,85,86,87,88,89,90,91,92,93,85,86,87,88,89,90,91,92,93,85,86,87,88,89,90,91,92,93,88,90,88,90,85,87,88,89,90,91,92,93,87,90,86,87,88,89,90,91,92,93,85,85,86,87,88,89,90,91,92,93,85,86,87,88,89,90,91,92,93,85,86,87,88,89,90,91,92,93,87,88,90,91,93,85,86,87,88,89,90,91,92,93,86,86,86,87,88,90,91,87,90,87,88,90,91,89,91,93,87,88,90,91,86,87,88,89,90,91,92,93,85,87,90,87,90,85,86,87,88,89,90,91,92,93,91,87,88,90,91,87,88,90,91,85,86,87,88,89,90,91,92,93,85,86,87,88,89,90,91,92,93,85,86,87,88,89,90,91,92,93],"f":[0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[[[2,[1]]],3],0,0,[-1,-1,[]],[-1,-2,[],[]],0,0,0,[-1,[[4,[-2]]],[],[]],[[[5,[1]]],[[4,[6,-1]]],[]],[7,[[4,[6,-1]]],[]],[-1,[[4,[-2]]],[],[]],[-1,8,[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,[9,9],[10,10],[11,11],[12,12],[13,13],[14,14],[15,15],[16,16],[17,17],[18,18],[19,19],[20,20],[21,21],[22,22],[23,23],[24,24],[25,25],[26,26],[27,27],[28,28],[29,29],[30,30],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],0,0,[[],9],[[],11],[[],12],[[],13],[[],14],[[],15],[[],16],[[],17],[[],18],[[],19],[[],20],[[],21],[[],22],[[],23],[[],24],[[],25],[[],26],[[],27],[[],28],[[],29],[[],30],[[3,[2,[1]]],[[4,[10,32]]]],[[[2,[1]]],11],[[[2,[1]]],12],[[[2,[1]]],13],[[[2,[1]]],14],[[[2,[1]]],15],[[[2,[1]]],16],[[[2,[1]]],17],[[[2,[1]]],18],[[[2,[1]]],19],[[[2,[1]]],20],[[[2,[1]]],21],[[[2,[1]]],22],[[[2,[1]]],23],[[[2,[1]]],24],[[[2,[1]]],25],[[[2,[1]]],26],[[[2,[1]]],27],[[[2,[1]]],28],[[[2,[1]]],29],[[[2,[1]]],30],0,[[9,9],33],[[10,10],33],[[11,11],33],[[12,12],33],[[13,13],33],[[14,14],33],[[15,15],33],[[16,16],33],[[17,17],33],[[18,18],33],[[19,19],33],[[20,20],33],[[21,21],33],[[22,22],33],[[23,23],33],[[24,24],33],[[25,25],33],[[26,26],33],[[27,27],33],[[28,28],33],[[29,29],33],[[30,30],33],0,[[9,34],35],[[10,34],35],[[11,34],35],[[12,34],35],[[13,34],35],[[14,34],35],[[15,34],35],[[16,34],35],[[17,34],35],[[18,34],35],[[19,34],35],[[20,34],35],[[21,34],35],[[22,34],35],[[23,34],35],[[24,34],35],[[25,34],35],[[26,34],35],[[27,34],35],[[28,34],35],[[29,34],35],[[30,34],35],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,0,[10,3],[32,[[4,[3,36]]]],[10,32],0,0,[10,[[5,[1]]]],[11,[[5,[1]]]],[12,[[5,[1]]]],[13,[[5,[1]]]],[14,[[5,[1]]]],[15,[[5,[1]]]],[16,[[5,[1]]]],[17,[[5,[1]]]],[18,[[5,[1]]]],[19,[[5,[1]]]],[20,[[5,[1]]]],[21,[[5,[1]]]],[22,[[5,[1]]]],[23,[[5,[1]]]],[24,[[5,[1]]]],[25,[[5,[1]]]],[26,[[5,[1]]]],[27,[[5,[1]]]],[28,[[5,[1]]]],[29,[[5,[1]]]],[30,[[5,[1]]]],0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[37,37],[38,38],[39,39],[40,40],[41,41],[42,42],[43,43],[44,44],[45,45],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[],37],[[],39],[[],40],[[],41],[[],42],[[],43],[[],44],[[],45],[[3,[2,[1]]],[[4,[38,32]]]],[[[2,[1]]],39],[[[2,[1]]],40],[[[2,[1]]],41],[[[2,[1]]],42],[[[2,[1]]],43],[[[2,[1]]],44],[[[2,[1]]],45],0,0,0,0,[[37,37],33],[[38,38],33],[[39,39],33],[[40,40],33],[[41,41],33],[[42,42],33],[[43,43],33],[[44,44],33],[[45,45],33],0,0,0,[[37,34],35],[[38,34],35],[[39,34],35],[[40,34],35],[[41,34],35],[[42,34],35],[[43,34],35],[[44,34],35],[[45,34],35],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[38,3],[32,[[4,[3,36]]]],[38,32],0,0,0,0,0,[38,[[5,[1]]]],[39,[[5,[1]]]],[40,[[5,[1]]]],[41,[[5,[1]]]],[42,[[5,[1]]]],[43,[[5,[1]]]],[44,[[5,[1]]]],[45,[[5,[1]]]],0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[46,34],35],[[47,34],35],[[48,34],35],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[[],49],[[49,1],47],0,[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[7,3],[7,3],0,[7,7],[[-1,-2],31,[],[]],[[],7],[[[2,[1]]],50],[[3,[2,[1]]],[[4,[51,32]]]],[7,1],0,[[7,34],35],[-1,-1,[]],[7,33],[-1,-2,[],[]],[7,52],[53,3],0,[32,[[4,[3,36]]]],[53,32],[[],7],[7,[[2,[1]]]],0,0,[54,[[5,[1]]]],[7,[[5,[1]]]],[[7,1],31],[[7,-1],31,53],[[7,1],31],0,[-1,-2,[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,8,[]],[7,31],[[7,55],[[56,[52]]]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[57,57],[58,58],[59,59],[60,60],[61,61],[62,62],[63,63],[64,64],[65,65],[66,66],[67,67],[68,68],[69,69],[70,70],[71,71],[72,72],[73,73],[74,74],[75,75],[76,76],[77,77],[78,78],[79,79],[80,80],[81,81],[82,82],[83,83],[84,84],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],0,0,0,[[],57],[[],59],[[],60],[[],61],[[],62],[[],63],[[],64],[[],65],[[],66],[[],67],[[],68],[[],69],[[],70],[[],71],[[],72],[[],73],[[],74],[[],75],[[],76],[[],77],[[],78],[[],79],[[],80],[[],81],[[],82],[[],83],[[],84],[[3,[2,[1]]],[[4,[58,32]]]],[[[2,[1]]],59],[[[2,[1]]],60],[[[2,[1]]],61],[[[2,[1]]],62],[[[2,[1]]],63],[[[2,[1]]],64],[[[2,[1]]],65],[[[2,[1]]],66],[[[2,[1]]],67],[[[2,[1]]],68],[[[2,[1]]],69],[[[2,[1]]],70],[[[2,[1]]],71],[[[2,[1]]],72],[[[2,[1]]],73],[[[2,[1]]],74],[[[2,[1]]],75],[[[2,[1]]],76],[[[2,[1]]],77],[[[2,[1]]],78],[[[2,[1]]],79],[[[2,[1]]],80],[[[2,[1]]],81],[[[2,[1]]],82],[[[2,[1]]],83],[[[2,[1]]],84],0,0,0,0,0,0,0,0,[[57,57],33],[[58,58],33],[[59,59],33],[[60,60],33],[[61,61],33],[[62,62],33],[[63,63],33],[[64,64],33],[[65,65],33],[[66,66],33],[[67,67],33],[[68,68],33],[[69,69],33],[[70,70],33],[[71,71],33],[[72,72],33],[[73,73],33],[[74,74],33],[[75,75],33],[[76,76],33],[[77,77],33],[[78,78],33],[[79,79],33],[[80,80],33],[[81,81],33],[[82,82],33],[[83,83],33],[[84,84],33],0,0,0,0,[[57,34],35],[[58,34],35],[[59,34],35],[[60,34],35],[[61,34],35],[[62,34],35],[[63,34],35],[[64,34],35],[[65,34],35],[[66,34],35],[[67,34],35],[[68,34],35],[[69,34],35],[[70,34],35],[[71,34],35],[[72,34],35],[[73,34],35],[[74,34],35],[[75,34],35],[[76,34],35],[[77,34],35],[[78,34],35],[[79,34],35],[[80,34],35],[[81,34],35],[[82,34],35],[[83,34],35],[[84,34],35],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[58,3],[32,[[4,[3,36]]]],[58,32],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[58,[[5,[1]]]],[59,[[5,[1]]]],[60,[[5,[1]]]],[61,[[5,[1]]]],[62,[[5,[1]]]],[63,[[5,[1]]]],[64,[[5,[1]]]],[65,[[5,[1]]]],[66,[[5,[1]]]],[67,[[5,[1]]]],[68,[[5,[1]]]],[69,[[5,[1]]]],[70,[[5,[1]]]],[71,[[5,[1]]]],[72,[[5,[1]]]],[73,[[5,[1]]]],[74,[[5,[1]]]],[75,[[5,[1]]]],[76,[[5,[1]]]],[77,[[5,[1]]]],[78,[[5,[1]]]],[79,[[5,[1]]]],[80,[[5,[1]]]],[81,[[5,[1]]]],[82,[[5,[1]]]],[83,[[5,[1]]]],[84,[[5,[1]]]],0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[85,85],[86,86],[87,87],[88,88],[89,89],[90,90],[91,91],[92,92],[93,93],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],[[-1,-2],31,[],[]],0,0,0,0,[[],85],[[],87],[[],88],[[],89],[[],90],[[],91],[[],92],[[],93],0,0,[[3,[2,[1]]],[[4,[86,32]]]],[[[2,[1]]],87],[[[2,[1]]],88],[[[2,[1]]],89],[[[2,[1]]],90],[[[2,[1]]],91],[[[2,[1]]],92],[[[2,[1]]],93],0,[[85,85],33],[[86,86],33],[[87,87],33],[[88,88],33],[[89,89],33],[[90,90],33],[[91,91],33],[[92,92],33],[[93,93],33],[[85,34],35],[[86,34],35],[[87,34],35],[[88,34],35],[[89,34],35],[[90,34],35],[[91,34],35],[[92,34],35],[[93,34],35],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],[-1,-1,[]],0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[86,3],[32,[[4,[3,36]]]],[86,32],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[86,[[5,[1]]]],[87,[[5,[1]]]],[88,[[5,[1]]]],[89,[[5,[1]]]],[90,[[5,[1]]]],[91,[[5,[1]]]],[92,[[5,[1]]]],[93,[[5,[1]]]],0,0,0,0,0,[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],[-1,-2,[],[]],0,0,0,0,0,0,0,0,0,[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,[[4,[-2]]],[],[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]],[-1,8,[]]],"c":[],"p":[[1,"u8"],[1,"slice"],[1,"u16"],[6,"Result",1406],[5,"Vec",1407],[6,"Messages",0],[5,"ProtocolMessage",639],[5,"TypeId",1408],[5,"PingProtocolHead",21],[6,"Messages",21],[5,"SetTemperatureMaxStruct",21],[5,"SetCellVoltageTimeoutStruct",21],[5,"CellTimeoutStruct",21],[5,"RebootStruct",21],[5,"TemperatureMaxStruct",21],[5,"SetTemperatureTimeoutStruct",21],[5,"SetCurrentTimeoutStruct",21],[5,"EraseFlashStruct",21],[5,"SetCurrentMaxStruct",21],[5,"TemperatureTimeoutStruct",21],[5,"SetStreamRateStruct",21],[5,"SetCellVoltageMinimumStruct",21],[5,"SetLpfSettingStruct",21],[5,"CellVoltageMinStruct",21],[5,"StateStruct",21],[5,"CurrentTimeoutStruct",21],[5,"ResetDefaultsStruct",21],[5,"SetLpfSampleFrequencyStruct",21],[5,"EventsStruct",21],[5,"CurrentMaxStruct",21],[1,"tuple"],[1,"str"],[1,"bool"],[5,"Formatter",1409],[8,"Result",1409],[5,"String",1410],[5,"PingProtocolHead",421],[6,"Messages",421],[5,"NackStruct",421],[5,"AsciiTextStruct",421],[5,"DeviceInformationStruct",421],[5,"ProtocolVersionStruct",421],[5,"AckStruct",421],[5,"GeneralRequestStruct",421],[5,"SetDeviceIdStruct",421],[6,"ParseError",590],[6,"DecoderResult",590],[6,"DecoderState",590],[5,"Decoder",590],[10,"DeserializePayload",639],[10,"DeserializeGenericMessage",639],[1,"usize"],[10,"PingMessage",639],[10,"SerializePayload",639],[10,"Write",1411],[8,"Result",1412],[5,"PingProtocolHead",682],[6,"Messages",682],[5,"SetPingEnableStruct",682],[5,"PcbTemperatureStruct",682],[5,"SpeedOfSoundStruct",682],[5,"DistanceStruct",682],[5,"ProcessorTemperatureStruct",682],[5,"RangeStruct",682],[5,"ContinuousStopStruct",682],[5,"PingIntervalStruct",682],[5,"ContinuousStartStruct",682],[5,"SetDeviceIdStruct",682],[5,"GotoBootloaderStruct",682],[5,"SetPingIntervalStruct",682],[5,"DeviceIdStruct",682],[5,"ProfileStruct",682],[5,"FirmwareVersionStruct",682],[5,"TransmitDurationStruct",682],[5,"SetRangeStruct",682],[5,"SetModeAutoStruct",682],[5,"Voltage5Struct",682],[5,"ModeAutoStruct",682],[5,"SetSpeedOfSoundStruct",682],[5,"GainSettingStruct",682],[5,"PingEnableStruct",682],[5,"DistanceSimpleStruct",682],[5,"SetGainSettingStruct",682],[5,"GeneralInfoStruct",682],[5,"PingProtocolHead",1208],[6,"Messages",1208],[5,"AutoTransmitStruct",1208],[5,"DeviceDataStruct",1208],[5,"ResetStruct",1208],[5,"AutoDeviceDataStruct",1208],[5,"TransducerStruct",1208],[5,"MotorOffStruct",1208],[5,"DeviceIdStruct",1208]],"b":[[17,"impl-TryFrom%3C%26Vec%3Cu8%3E%3E-for-Messages"],[18,"impl-TryFrom%3C%26ProtocolMessage%3E-for-Messages"]]}]\ +]')); +if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; +else if (window.initSearch) window.initSearch(searchIndex); diff --git a/settings.html b/settings.html index ecb4b45a7..be1f6123b 100644 --- a/settings.html +++ b/settings.html @@ -1 +1,2 @@ -Settings

    Rustdoc settings

    Back
    \ No newline at end of file +Settings +

    Rustdoc settings

    Back
    \ No newline at end of file diff --git a/src-files.js b/src-files.js index a680b450c..e8a7d417b 100644 --- a/src-files.js +++ b/src-files.js @@ -1,5 +1,5 @@ -var srcIndex = JSON.parse('{\ -"bytes":["",[["buf",[],["buf_impl.rs","buf_mut.rs","chain.rs","iter.rs","limit.rs","mod.rs","reader.rs","take.rs","uninit_slice.rs","vec_deque.rs","writer.rs"]],["fmt",[],["debug.rs","hex.rs","mod.rs"]]],["bytes.rs","bytes_mut.rs","lib.rs","loom.rs"]],\ -"ping_rs":["",[],["decoder.rs","lib.rs","message.rs"]]\ -}'); +var srcIndex = new Map(JSON.parse('[\ +["bytes",["",[["buf",[],["buf_impl.rs","buf_mut.rs","chain.rs","iter.rs","limit.rs","mod.rs","reader.rs","take.rs","uninit_slice.rs","vec_deque.rs","writer.rs"]],["fmt",[],["debug.rs","hex.rs","mod.rs"]]],["bytes.rs","bytes_mut.rs","lib.rs","loom.rs"]]],\ +["ping_rs",["",[],["decoder.rs","lib.rs","message.rs"]]]\ +]')); createSrcSidebar(); diff --git a/src/bytes/buf/buf_impl.rs.html b/src/bytes/buf/buf_impl.rs.html index 6b092b3f8..a699065b5 100644 --- a/src/bytes/buf/buf_impl.rs.html +++ b/src/bytes/buf/buf_impl.rs.html @@ -1,4 +1,5 @@ -buf_impl.rs - source
    1
    +buf_impl.rs - source
    +    
    1
     2
     3
     4
    @@ -1392,13 +1393,13 @@
     1392
     1393
     1394
    -
    #[cfg(feature = "std")]
    +
    #[cfg(feature = "std")]
     use crate::buf::{reader, Reader};
     use crate::buf::{take, Chain, Take};
     
     use core::{cmp, mem, ptr};
     
    -#[cfg(feature = "std")]
    +#[cfg(feature = "std")]
     use std::io::IoSlice;
     
     use alloc::boxed::Box;
    @@ -1456,16 +1457,16 @@
     /// ```
     /// use bytes::Buf;
     ///
    -/// let mut buf = &b"hello world"[..];
    +/// let mut buf = &b"hello world"[..];
     ///
    -/// assert_eq!(b'h', buf.get_u8());
    -/// assert_eq!(b'e', buf.get_u8());
    -/// assert_eq!(b'l', buf.get_u8());
    +/// assert_eq!(b'h', buf.get_u8());
    +/// assert_eq!(b'e', buf.get_u8());
    +/// assert_eq!(b'l', buf.get_u8());
     ///
     /// let mut rest = [0; 8];
     /// buf.copy_to_slice(&mut rest);
     ///
    -/// assert_eq!(&rest[..], &b"lo world"[..]);
    +/// assert_eq!(&rest[..], &b"lo world"[..]);
     /// ```
     pub trait Buf {
         /// Returns the number of bytes between the current position and the end of
    @@ -1479,7 +1480,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"hello world"[..];
    +    /// let mut buf = &b"hello world"[..];
         ///
         /// assert_eq!(buf.remaining(), 11);
         ///
    @@ -1492,7 +1493,7 @@
         ///
         /// Implementations of `remaining` should ensure that the return value does
         /// not change unless a call is made to `advance` or any other function that
    -    /// is documented to change the `Buf`'s current position.
    +    /// is documented to change the `Buf`'s current position.
         fn remaining(&self) -> usize;
     
         /// Returns a slice starting at the current position and of length between 0
    @@ -1507,13 +1508,13 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"hello world"[..];
    +    /// let mut buf = &b"hello world"[..];
         ///
    -    /// assert_eq!(buf.chunk(), &b"hello world"[..]);
    +    /// assert_eq!(buf.chunk(), &b"hello world"[..]);
         ///
         /// buf.advance(6);
         ///
    -    /// assert_eq!(buf.chunk(), &b"world"[..]);
    +    /// assert_eq!(buf.chunk(), &b"world"[..]);
         /// ```
         ///
         /// # Implementer notes
    @@ -1523,10 +1524,10 @@
         /// empty slice.
         // The `chunk` method was previously called `bytes`. This alias makes the rename
         // more easily discoverable.
    -    #[cfg_attr(docsrs, doc(alias = "bytes"))]
    +    #[cfg_attr(docsrs, doc(alias = "bytes"))]
         fn chunk(&self) -> &[u8];
     
    -    /// Fills `dst` with potentially multiple slices starting at `self`'s
    +    /// Fills `dst` with potentially multiple slices starting at `self`'s
         /// current position.
         ///
         /// If the `Buf` is backed by disjoint slices of bytes, `chunk_vectored` enables
    @@ -1553,9 +1554,9 @@
         /// with `dst` being a zero length slice.
         ///
         /// [`writev`]: http://man7.org/linux/man-pages/man2/readv.2.html
    -    #[cfg(feature = "std")]
    -    #[cfg_attr(docsrs, doc(cfg(feature = "std")))]
    -    fn chunks_vectored<'a>(&'a self, dst: &mut [IoSlice<'a>]) -> usize {
    +    #[cfg(feature = "std")]
    +    #[cfg_attr(docsrs, doc(cfg(feature = "std")))]
    +    fn chunks_vectored<'a>(&'a self, dst: &mut [IoSlice<'a>]) -> usize {
             if dst.is_empty() {
                 return 0;
             }
    @@ -1578,13 +1579,13 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"hello world"[..];
    +    /// let mut buf = &b"hello world"[..];
         ///
    -    /// assert_eq!(buf.chunk(), &b"hello world"[..]);
    +    /// assert_eq!(buf.chunk(), &b"hello world"[..]);
         ///
         /// buf.advance(6);
         ///
    -    /// assert_eq!(buf.chunk(), &b"world"[..]);
    +    /// assert_eq!(buf.chunk(), &b"world"[..]);
         /// ```
         ///
         /// # Panics
    @@ -1609,7 +1610,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"a"[..];
    +    /// let mut buf = &b"a"[..];
         ///
         /// assert!(buf.has_remaining());
         ///
    @@ -1631,11 +1632,11 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"hello world"[..];
    +    /// let mut buf = &b"hello world"[..];
         /// let mut dst = [0; 5];
         ///
         /// buf.copy_to_slice(&mut dst);
    -    /// assert_eq!(&b"hello"[..], &dst);
    +    /// assert_eq!(&b"hello"[..], &dst);
         /// assert_eq!(6, buf.remaining());
         /// ```
         ///
    @@ -1672,7 +1673,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"\x08 hello"[..];
    +    /// let mut buf = &b"\x08 hello"[..];
         /// assert_eq!(8, buf.get_u8());
         /// ```
         ///
    @@ -1695,7 +1696,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"\x08 hello"[..];
    +    /// let mut buf = &b"\x08 hello"[..];
         /// assert_eq!(8, buf.get_i8());
         /// ```
         ///
    @@ -1718,7 +1719,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"\x08\x09 hello"[..];
    +    /// let mut buf = &b"\x08\x09 hello"[..];
         /// assert_eq!(0x0809, buf.get_u16());
         /// ```
         ///
    @@ -1738,7 +1739,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"\x09\x08 hello"[..];
    +    /// let mut buf = &b"\x09\x08 hello"[..];
         /// assert_eq!(0x0809, buf.get_u16_le());
         /// ```
         ///
    @@ -1758,9 +1759,9 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf: &[u8] = match cfg!(target_endian = "big") {
    -    ///     true => b"\x08\x09 hello",
    -    ///     false => b"\x09\x08 hello",
    +    /// let mut buf: &[u8] = match cfg!(target_endian = "big") {
    +    ///     true => b"\x08\x09 hello",
    +    ///     false => b"\x09\x08 hello",
         /// };
         /// assert_eq!(0x0809, buf.get_u16_ne());
         /// ```
    @@ -1781,7 +1782,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"\x08\x09 hello"[..];
    +    /// let mut buf = &b"\x08\x09 hello"[..];
         /// assert_eq!(0x0809, buf.get_i16());
         /// ```
         ///
    @@ -1801,7 +1802,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"\x09\x08 hello"[..];
    +    /// let mut buf = &b"\x09\x08 hello"[..];
         /// assert_eq!(0x0809, buf.get_i16_le());
         /// ```
         ///
    @@ -1821,9 +1822,9 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf: &[u8] = match cfg!(target_endian = "big") {
    -    ///     true => b"\x08\x09 hello",
    -    ///     false => b"\x09\x08 hello",
    +    /// let mut buf: &[u8] = match cfg!(target_endian = "big") {
    +    ///     true => b"\x08\x09 hello",
    +    ///     false => b"\x09\x08 hello",
         /// };
         /// assert_eq!(0x0809, buf.get_i16_ne());
         /// ```
    @@ -1844,7 +1845,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"\x08\x09\xA0\xA1 hello"[..];
    +    /// let mut buf = &b"\x08\x09\xA0\xA1 hello"[..];
         /// assert_eq!(0x0809A0A1, buf.get_u32());
         /// ```
         ///
    @@ -1864,7 +1865,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"\xA1\xA0\x09\x08 hello"[..];
    +    /// let mut buf = &b"\xA1\xA0\x09\x08 hello"[..];
         /// assert_eq!(0x0809A0A1, buf.get_u32_le());
         /// ```
         ///
    @@ -1884,9 +1885,9 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf: &[u8] = match cfg!(target_endian = "big") {
    -    ///     true => b"\x08\x09\xA0\xA1 hello",
    -    ///     false => b"\xA1\xA0\x09\x08 hello",
    +    /// let mut buf: &[u8] = match cfg!(target_endian = "big") {
    +    ///     true => b"\x08\x09\xA0\xA1 hello",
    +    ///     false => b"\xA1\xA0\x09\x08 hello",
         /// };
         /// assert_eq!(0x0809A0A1, buf.get_u32_ne());
         /// ```
    @@ -1907,7 +1908,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"\x08\x09\xA0\xA1 hello"[..];
    +    /// let mut buf = &b"\x08\x09\xA0\xA1 hello"[..];
         /// assert_eq!(0x0809A0A1, buf.get_i32());
         /// ```
         ///
    @@ -1927,7 +1928,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"\xA1\xA0\x09\x08 hello"[..];
    +    /// let mut buf = &b"\xA1\xA0\x09\x08 hello"[..];
         /// assert_eq!(0x0809A0A1, buf.get_i32_le());
         /// ```
         ///
    @@ -1947,9 +1948,9 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf: &[u8] = match cfg!(target_endian = "big") {
    -    ///     true => b"\x08\x09\xA0\xA1 hello",
    -    ///     false => b"\xA1\xA0\x09\x08 hello",
    +    /// let mut buf: &[u8] = match cfg!(target_endian = "big") {
    +    ///     true => b"\x08\x09\xA0\xA1 hello",
    +    ///     false => b"\xA1\xA0\x09\x08 hello",
         /// };
         /// assert_eq!(0x0809A0A1, buf.get_i32_ne());
         /// ```
    @@ -1970,7 +1971,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"\x01\x02\x03\x04\x05\x06\x07\x08 hello"[..];
    +    /// let mut buf = &b"\x01\x02\x03\x04\x05\x06\x07\x08 hello"[..];
         /// assert_eq!(0x0102030405060708, buf.get_u64());
         /// ```
         ///
    @@ -1990,7 +1991,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"\x08\x07\x06\x05\x04\x03\x02\x01 hello"[..];
    +    /// let mut buf = &b"\x08\x07\x06\x05\x04\x03\x02\x01 hello"[..];
         /// assert_eq!(0x0102030405060708, buf.get_u64_le());
         /// ```
         ///
    @@ -2010,9 +2011,9 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf: &[u8] = match cfg!(target_endian = "big") {
    -    ///     true => b"\x01\x02\x03\x04\x05\x06\x07\x08 hello",
    -    ///     false => b"\x08\x07\x06\x05\x04\x03\x02\x01 hello",
    +    /// let mut buf: &[u8] = match cfg!(target_endian = "big") {
    +    ///     true => b"\x01\x02\x03\x04\x05\x06\x07\x08 hello",
    +    ///     false => b"\x08\x07\x06\x05\x04\x03\x02\x01 hello",
         /// };
         /// assert_eq!(0x0102030405060708, buf.get_u64_ne());
         /// ```
    @@ -2033,7 +2034,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"\x01\x02\x03\x04\x05\x06\x07\x08 hello"[..];
    +    /// let mut buf = &b"\x01\x02\x03\x04\x05\x06\x07\x08 hello"[..];
         /// assert_eq!(0x0102030405060708, buf.get_i64());
         /// ```
         ///
    @@ -2053,7 +2054,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"\x08\x07\x06\x05\x04\x03\x02\x01 hello"[..];
    +    /// let mut buf = &b"\x08\x07\x06\x05\x04\x03\x02\x01 hello"[..];
         /// assert_eq!(0x0102030405060708, buf.get_i64_le());
         /// ```
         ///
    @@ -2073,9 +2074,9 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf: &[u8] = match cfg!(target_endian = "big") {
    -    ///     true => b"\x01\x02\x03\x04\x05\x06\x07\x08 hello",
    -    ///     false => b"\x08\x07\x06\x05\x04\x03\x02\x01 hello",
    +    /// let mut buf: &[u8] = match cfg!(target_endian = "big") {
    +    ///     true => b"\x01\x02\x03\x04\x05\x06\x07\x08 hello",
    +    ///     false => b"\x08\x07\x06\x05\x04\x03\x02\x01 hello",
         /// };
         /// assert_eq!(0x0102030405060708, buf.get_i64_ne());
         /// ```
    @@ -2096,7 +2097,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello"[..];
    +    /// let mut buf = &b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello"[..];
         /// assert_eq!(0x01020304050607080910111213141516, buf.get_u128());
         /// ```
         ///
    @@ -2116,7 +2117,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello"[..];
    +    /// let mut buf = &b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello"[..];
         /// assert_eq!(0x01020304050607080910111213141516, buf.get_u128_le());
         /// ```
         ///
    @@ -2136,9 +2137,9 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf: &[u8] = match cfg!(target_endian = "big") {
    -    ///     true => b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello",
    -    ///     false => b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello",
    +    /// let mut buf: &[u8] = match cfg!(target_endian = "big") {
    +    ///     true => b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello",
    +    ///     false => b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello",
         /// };
         /// assert_eq!(0x01020304050607080910111213141516, buf.get_u128_ne());
         /// ```
    @@ -2159,7 +2160,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello"[..];
    +    /// let mut buf = &b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello"[..];
         /// assert_eq!(0x01020304050607080910111213141516, buf.get_i128());
         /// ```
         ///
    @@ -2179,7 +2180,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello"[..];
    +    /// let mut buf = &b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello"[..];
         /// assert_eq!(0x01020304050607080910111213141516, buf.get_i128_le());
         /// ```
         ///
    @@ -2199,9 +2200,9 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf: &[u8] = match cfg!(target_endian = "big") {
    -    ///     true => b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello",
    -    ///     false => b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello",
    +    /// let mut buf: &[u8] = match cfg!(target_endian = "big") {
    +    ///     true => b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16 hello",
    +    ///     false => b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01 hello",
         /// };
         /// assert_eq!(0x01020304050607080910111213141516, buf.get_i128_ne());
         /// ```
    @@ -2222,7 +2223,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"\x01\x02\x03 hello"[..];
    +    /// let mut buf = &b"\x01\x02\x03 hello"[..];
         /// assert_eq!(0x010203, buf.get_uint(3));
         /// ```
         ///
    @@ -2242,7 +2243,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"\x03\x02\x01 hello"[..];
    +    /// let mut buf = &b"\x03\x02\x01 hello"[..];
         /// assert_eq!(0x010203, buf.get_uint_le(3));
         /// ```
         ///
    @@ -2262,9 +2263,9 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf: &[u8] = match cfg!(target_endian = "big") {
    -    ///     true => b"\x01\x02\x03 hello",
    -    ///     false => b"\x03\x02\x01 hello",
    +    /// let mut buf: &[u8] = match cfg!(target_endian = "big") {
    +    ///     true => b"\x01\x02\x03 hello",
    +    ///     false => b"\x03\x02\x01 hello",
         /// };
         /// assert_eq!(0x010203, buf.get_uint_ne(3));
         /// ```
    @@ -2273,7 +2274,7 @@
         ///
         /// This function panics if there is not enough remaining data in `self`.
         fn get_uint_ne(&mut self, nbytes: usize) -> u64 {
    -        if cfg!(target_endian = "big") {
    +        if cfg!(target_endian = "big") {
                 self.get_uint(nbytes)
             } else {
                 self.get_uint_le(nbytes)
    @@ -2289,7 +2290,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"\x01\x02\x03 hello"[..];
    +    /// let mut buf = &b"\x01\x02\x03 hello"[..];
         /// assert_eq!(0x010203, buf.get_int(3));
         /// ```
         ///
    @@ -2309,7 +2310,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"\x03\x02\x01 hello"[..];
    +    /// let mut buf = &b"\x03\x02\x01 hello"[..];
         /// assert_eq!(0x010203, buf.get_int_le(3));
         /// ```
         ///
    @@ -2329,9 +2330,9 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf: &[u8] = match cfg!(target_endian = "big") {
    -    ///     true => b"\x01\x02\x03 hello",
    -    ///     false => b"\x03\x02\x01 hello",
    +    /// let mut buf: &[u8] = match cfg!(target_endian = "big") {
    +    ///     true => b"\x01\x02\x03 hello",
    +    ///     false => b"\x03\x02\x01 hello",
         /// };
         /// assert_eq!(0x010203, buf.get_int_ne(3));
         /// ```
    @@ -2340,7 +2341,7 @@
         ///
         /// This function panics if there is not enough remaining data in `self`.
         fn get_int_ne(&mut self, nbytes: usize) -> i64 {
    -        if cfg!(target_endian = "big") {
    +        if cfg!(target_endian = "big") {
                 self.get_int(nbytes)
             } else {
                 self.get_int_le(nbytes)
    @@ -2357,7 +2358,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"\x3F\x99\x99\x9A hello"[..];
    +    /// let mut buf = &b"\x3F\x99\x99\x9A hello"[..];
         /// assert_eq!(1.2f32, buf.get_f32());
         /// ```
         ///
    @@ -2378,7 +2379,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"\x9A\x99\x99\x3F hello"[..];
    +    /// let mut buf = &b"\x9A\x99\x99\x3F hello"[..];
         /// assert_eq!(1.2f32, buf.get_f32_le());
         /// ```
         ///
    @@ -2399,9 +2400,9 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf: &[u8] = match cfg!(target_endian = "big") {
    -    ///     true => b"\x3F\x99\x99\x9A hello",
    -    ///     false => b"\x9A\x99\x99\x3F hello",
    +    /// let mut buf: &[u8] = match cfg!(target_endian = "big") {
    +    ///     true => b"\x3F\x99\x99\x9A hello",
    +    ///     false => b"\x9A\x99\x99\x3F hello",
         /// };
         /// assert_eq!(1.2f32, buf.get_f32_ne());
         /// ```
    @@ -2423,7 +2424,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"\x3F\xF3\x33\x33\x33\x33\x33\x33 hello"[..];
    +    /// let mut buf = &b"\x3F\xF3\x33\x33\x33\x33\x33\x33 hello"[..];
         /// assert_eq!(1.2f64, buf.get_f64());
         /// ```
         ///
    @@ -2444,7 +2445,7 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = &b"\x33\x33\x33\x33\x33\x33\xF3\x3F hello"[..];
    +    /// let mut buf = &b"\x33\x33\x33\x33\x33\x33\xF3\x3F hello"[..];
         /// assert_eq!(1.2f64, buf.get_f64_le());
         /// ```
         ///
    @@ -2465,9 +2466,9 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf: &[u8] = match cfg!(target_endian = "big") {
    -    ///     true => b"\x3F\xF3\x33\x33\x33\x33\x33\x33 hello",
    -    ///     false => b"\x33\x33\x33\x33\x33\x33\xF3\x3F hello",
    +    /// let mut buf: &[u8] = match cfg!(target_endian = "big") {
    +    ///     true => b"\x3F\xF3\x33\x33\x33\x33\x33\x33 hello",
    +    ///     false => b"\x33\x33\x33\x33\x33\x33\xF3\x3F hello",
         /// };
         /// assert_eq!(1.2f64, buf.get_f64_ne());
         /// ```
    @@ -2491,13 +2492,13 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let bytes = (&b"hello world"[..]).copy_to_bytes(5);
    -    /// assert_eq!(&bytes[..], &b"hello"[..]);
    +    /// let bytes = (&b"hello world"[..]).copy_to_bytes(5);
    +    /// assert_eq!(&bytes[..], &b"hello"[..]);
         /// ```
         fn copy_to_bytes(&mut self, len: usize) -> crate::Bytes {
             use super::BufMut;
     
    -        assert!(len <= self.remaining(), "`len` greater than remaining");
    +        assert!(len <= self.remaining(), "`len` greater than remaining");
     
             let mut ret = crate::BytesMut::with_capacity(len);
             ret.put(self.take(len));
    @@ -2514,16 +2515,16 @@
         /// ```
         /// use bytes::{Buf, BufMut};
         ///
    -    /// let mut buf = b"hello world"[..].take(5);
    +    /// let mut buf = b"hello world"[..].take(5);
         /// let mut dst = vec![];
         ///
         /// dst.put(&mut buf);
    -    /// assert_eq!(dst, b"hello");
    +    /// assert_eq!(dst, b"hello");
         ///
         /// let mut buf = buf.into_inner();
         /// dst.clear();
         /// dst.put(&mut buf);
    -    /// assert_eq!(dst, b" world");
    +    /// assert_eq!(dst, b" world");
         /// ```
         fn take(self, limit: usize) -> Take<Self>
         where
    @@ -2542,10 +2543,10 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut chain = b"hello "[..].chain(&b"world"[..]);
    +    /// let mut chain = b"hello "[..].chain(&b"world"[..]);
         ///
         /// let full = chain.copy_to_bytes(11);
    -    /// assert_eq!(full.chunk(), b"hello world");
    +    /// assert_eq!(full.chunk(), b"hello world");
         /// ```
         fn chain<U: Buf>(self, next: U) -> Chain<Self, U>
         where
    @@ -2567,7 +2568,7 @@
         /// use bytes::{Bytes, Buf};
         /// use std::io::Read;
         ///
    -    /// let buf = Bytes::from("hello world");
    +    /// let buf = Bytes::from("hello world");
         ///
         /// let mut reader = buf.reader();
         /// let mut dst = [0; 1024];
    @@ -2575,10 +2576,10 @@
         /// let num = reader.read(&mut dst).unwrap();
         ///
         /// assert_eq!(11, num);
    -    /// assert_eq!(&dst[..11], &b"hello world"[..]);
    +    /// assert_eq!(&dst[..11], &b"hello world"[..]);
         /// ```
    -    #[cfg(feature = "std")]
    -    #[cfg_attr(docsrs, doc(cfg(feature = "std")))]
    +    #[cfg(feature = "std")]
    +    #[cfg_attr(docsrs, doc(cfg(feature = "std")))]
         fn reader(self) -> Reader<Self>
         where
             Self: Sized,
    @@ -2597,8 +2598,8 @@
                 (**self).chunk()
             }
     
    -        #[cfg(feature = "std")]
    -        fn chunks_vectored<'b>(&'b self, dst: &mut [IoSlice<'b>]) -> usize {
    +        #[cfg(feature = "std")]
    +        fn chunks_vectored<'b>(&'b self, dst: &mut [IoSlice<'b>]) -> usize {
                 (**self).chunks_vectored(dst)
             }
     
    @@ -2749,7 +2750,7 @@
         }
     }
     
    -#[cfg(feature = "std")]
    +#[cfg(feature = "std")]
     impl<T: AsRef<[u8]>> Buf for std::io::Cursor<T> {
         fn remaining(&self) -> usize {
             let len = self.get_ref().as_ref().len();
    @@ -2776,7 +2777,7 @@
         fn advance(&mut self, cnt: usize) {
             let pos = (self.position() as usize)
                 .checked_add(cnt)
    -            .expect("overflow");
    +            .expect("overflow");
     
             assert!(pos <= self.get_ref().as_ref().len());
             self.set_position(pos as u64);
    @@ -2784,6 +2785,6 @@
     }
     
     // The existence of this function makes the compiler catch if the Buf
    -// trait is "object-safe" or not.
    +// trait is "object-safe" or not.
     fn _assert_trait_object(_b: &dyn Buf) {}
     
    \ No newline at end of file diff --git a/src/bytes/buf/buf_mut.rs.html b/src/bytes/buf/buf_mut.rs.html index 648e7c049..11843c582 100644 --- a/src/bytes/buf/buf_mut.rs.html +++ b/src/bytes/buf/buf_mut.rs.html @@ -1,4 +1,5 @@ -buf_mut.rs - source
    1
    +buf_mut.rs - source
    +    
    1
     2
     3
     4
    @@ -1527,7 +1528,7 @@
     1527
     1528
     
    use crate::buf::{limit, Chain, Limit, UninitSlice};
    -#[cfg(feature = "std")]
    +#[cfg(feature = "std")]
     use crate::buf::{writer, Writer};
     
     use core::{cmp, mem, ptr, usize};
    @@ -1550,9 +1551,9 @@
     ///
     /// let mut buf = vec![];
     ///
    -/// buf.put(&b"hello world"[..]);
    +/// buf.put(&b"hello world"[..]);
     ///
    -/// assert_eq!(buf, b"hello world");
    +/// assert_eq!(buf, b"hello world");
     /// ```
     pub unsafe trait BufMut {
         /// Returns the number of bytes that can be written from the current
    @@ -1574,7 +1575,7 @@
         /// let mut buf = &mut dst[..];
         ///
         /// let original_remaining = buf.remaining_mut();
    -    /// buf.put(&b"hello"[..]);
    +    /// buf.put(&b"hello"[..]);
         ///
         /// assert_eq!(original_remaining - 5, buf.remaining_mut());
         /// ```
    @@ -1583,7 +1584,7 @@
         ///
         /// Implementations of `remaining_mut` should ensure that the return value
         /// does not change unless a call is made to `advance_mut` or any other
    -    /// function that is documented to change the `BufMut`'s current position.
    +    /// function that is documented to change the `BufMut`'s current position.
         ///
         /// # Note
         ///
    @@ -1606,16 +1607,16 @@
         /// let mut buf = Vec::with_capacity(16);
         ///
         /// // Write some data
    -    /// buf.chunk_mut()[0..2].copy_from_slice(b"he");
    +    /// buf.chunk_mut()[0..2].copy_from_slice(b"he");
         /// unsafe { buf.advance_mut(2) };
         ///
         /// // write more bytes
    -    /// buf.chunk_mut()[0..3].copy_from_slice(b"llo");
    +    /// buf.chunk_mut()[0..3].copy_from_slice(b"llo");
         ///
         /// unsafe { buf.advance_mut(3); }
         ///
         /// assert_eq!(5, buf.len());
    -    /// assert_eq!(buf, b"hello");
    +    /// assert_eq!(buf, b"hello");
         /// ```
         ///
         /// # Panics
    @@ -1645,7 +1646,7 @@
         ///
         /// assert!(buf.has_remaining_mut());
         ///
    -    /// buf.put(&b"hello"[..]);
    +    /// buf.put(&b"hello"[..]);
         ///
         /// assert!(!buf.has_remaining_mut());
         /// ```
    @@ -1671,20 +1672,20 @@
         ///
         /// unsafe {
         ///     // MaybeUninit::as_mut_ptr
    -    ///     buf.chunk_mut()[0..].as_mut_ptr().write(b'h');
    -    ///     buf.chunk_mut()[1..].as_mut_ptr().write(b'e');
    +    ///     buf.chunk_mut()[0..].as_mut_ptr().write(b'h');
    +    ///     buf.chunk_mut()[1..].as_mut_ptr().write(b'e');
         ///
         ///     buf.advance_mut(2);
         ///
    -    ///     buf.chunk_mut()[0..].as_mut_ptr().write(b'l');
    -    ///     buf.chunk_mut()[1..].as_mut_ptr().write(b'l');
    -    ///     buf.chunk_mut()[2..].as_mut_ptr().write(b'o');
    +    ///     buf.chunk_mut()[0..].as_mut_ptr().write(b'l');
    +    ///     buf.chunk_mut()[1..].as_mut_ptr().write(b'l');
    +    ///     buf.chunk_mut()[2..].as_mut_ptr().write(b'o');
         ///
         ///     buf.advance_mut(3);
         /// }
         ///
         /// assert_eq!(5, buf.len());
    -    /// assert_eq!(buf, b"hello");
    +    /// assert_eq!(buf, b"hello");
         /// ```
         ///
         /// # Implementer notes
    @@ -1699,7 +1700,7 @@
         /// memory and fails to do so.
         // The `chunk_mut` method was previously called `bytes_mut`. This alias makes the
         // rename more easily discoverable.
    -    #[cfg_attr(docsrs, doc(alias = "bytes_mut"))]
    +    #[cfg_attr(docsrs, doc(alias = "bytes_mut"))]
         fn chunk_mut(&mut self) -> &mut UninitSlice;
     
         /// Transfer bytes into `self` from `src` and advance the cursor by the
    @@ -1712,11 +1713,11 @@
         ///
         /// let mut buf = vec![];
         ///
    -    /// buf.put_u8(b'h');
    -    /// buf.put(&b"ello"[..]);
    -    /// buf.put(&b" world"[..]);
    +    /// buf.put_u8(b'h');
    +    /// buf.put(&b"ello"[..]);
    +    /// buf.put(&b" world"[..]);
         ///
    -    /// assert_eq!(buf, b"hello world");
    +    /// assert_eq!(buf, b"hello world");
         /// ```
         ///
         /// # Panics
    @@ -1758,19 +1759,19 @@
         ///
         /// {
         ///     let mut buf = &mut dst[..];
    -    ///     buf.put_slice(b"hello");
    +    ///     buf.put_slice(b"hello");
         ///
         ///     assert_eq!(1, buf.remaining_mut());
         /// }
         ///
    -    /// assert_eq!(b"hello\0", &dst);
    +    /// assert_eq!(b"hello\0", &dst);
         /// ```
         fn put_slice(&mut self, src: &[u8]) {
             let mut off = 0;
     
             assert!(
                 self.remaining_mut() >= src.len(),
    -            "buffer overflow; remaining = {}; src = {}",
    +            "buffer overflow; remaining = {}; src = {}",
                 self.remaining_mut(),
                 src.len()
             );
    @@ -1806,12 +1807,12 @@
         ///
         /// {
         ///     let mut buf = &mut dst[..];
    -    ///     buf.put_bytes(b'a', 4);
    +    ///     buf.put_bytes(b'a', 4);
         ///
         ///     assert_eq!(2, buf.remaining_mut());
         /// }
         ///
    -    /// assert_eq!(b"aaaa\0\0", &dst);
    +    /// assert_eq!(b"aaaa\0\0", &dst);
         /// ```
         ///
         /// # Panics
    @@ -1835,7 +1836,7 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_u8(0x01);
    -    /// assert_eq!(buf, b"\x01");
    +    /// assert_eq!(buf, b"\x01");
         /// ```
         ///
         /// # Panics
    @@ -1858,7 +1859,7 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_i8(0x01);
    -    /// assert_eq!(buf, b"\x01");
    +    /// assert_eq!(buf, b"\x01");
         /// ```
         ///
         /// # Panics
    @@ -1881,7 +1882,7 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_u16(0x0809);
    -    /// assert_eq!(buf, b"\x08\x09");
    +    /// assert_eq!(buf, b"\x08\x09");
         /// ```
         ///
         /// # Panics
    @@ -1903,7 +1904,7 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_u16_le(0x0809);
    -    /// assert_eq!(buf, b"\x09\x08");
    +    /// assert_eq!(buf, b"\x09\x08");
         /// ```
         ///
         /// # Panics
    @@ -1925,10 +1926,10 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_u16_ne(0x0809);
    -    /// if cfg!(target_endian = "big") {
    -    ///     assert_eq!(buf, b"\x08\x09");
    +    /// if cfg!(target_endian = "big") {
    +    ///     assert_eq!(buf, b"\x08\x09");
         /// } else {
    -    ///     assert_eq!(buf, b"\x09\x08");
    +    ///     assert_eq!(buf, b"\x09\x08");
         /// }
         /// ```
         ///
    @@ -1951,7 +1952,7 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_i16(0x0809);
    -    /// assert_eq!(buf, b"\x08\x09");
    +    /// assert_eq!(buf, b"\x08\x09");
         /// ```
         ///
         /// # Panics
    @@ -1973,7 +1974,7 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_i16_le(0x0809);
    -    /// assert_eq!(buf, b"\x09\x08");
    +    /// assert_eq!(buf, b"\x09\x08");
         /// ```
         ///
         /// # Panics
    @@ -1995,10 +1996,10 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_i16_ne(0x0809);
    -    /// if cfg!(target_endian = "big") {
    -    ///     assert_eq!(buf, b"\x08\x09");
    +    /// if cfg!(target_endian = "big") {
    +    ///     assert_eq!(buf, b"\x08\x09");
         /// } else {
    -    ///     assert_eq!(buf, b"\x09\x08");
    +    ///     assert_eq!(buf, b"\x09\x08");
         /// }
         /// ```
         ///
    @@ -2021,7 +2022,7 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_u32(0x0809A0A1);
    -    /// assert_eq!(buf, b"\x08\x09\xA0\xA1");
    +    /// assert_eq!(buf, b"\x08\x09\xA0\xA1");
         /// ```
         ///
         /// # Panics
    @@ -2043,7 +2044,7 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_u32_le(0x0809A0A1);
    -    /// assert_eq!(buf, b"\xA1\xA0\x09\x08");
    +    /// assert_eq!(buf, b"\xA1\xA0\x09\x08");
         /// ```
         ///
         /// # Panics
    @@ -2065,10 +2066,10 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_u32_ne(0x0809A0A1);
    -    /// if cfg!(target_endian = "big") {
    -    ///     assert_eq!(buf, b"\x08\x09\xA0\xA1");
    +    /// if cfg!(target_endian = "big") {
    +    ///     assert_eq!(buf, b"\x08\x09\xA0\xA1");
         /// } else {
    -    ///     assert_eq!(buf, b"\xA1\xA0\x09\x08");
    +    ///     assert_eq!(buf, b"\xA1\xA0\x09\x08");
         /// }
         /// ```
         ///
    @@ -2091,7 +2092,7 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_i32(0x0809A0A1);
    -    /// assert_eq!(buf, b"\x08\x09\xA0\xA1");
    +    /// assert_eq!(buf, b"\x08\x09\xA0\xA1");
         /// ```
         ///
         /// # Panics
    @@ -2113,7 +2114,7 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_i32_le(0x0809A0A1);
    -    /// assert_eq!(buf, b"\xA1\xA0\x09\x08");
    +    /// assert_eq!(buf, b"\xA1\xA0\x09\x08");
         /// ```
         ///
         /// # Panics
    @@ -2135,10 +2136,10 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_i32_ne(0x0809A0A1);
    -    /// if cfg!(target_endian = "big") {
    -    ///     assert_eq!(buf, b"\x08\x09\xA0\xA1");
    +    /// if cfg!(target_endian = "big") {
    +    ///     assert_eq!(buf, b"\x08\x09\xA0\xA1");
         /// } else {
    -    ///     assert_eq!(buf, b"\xA1\xA0\x09\x08");
    +    ///     assert_eq!(buf, b"\xA1\xA0\x09\x08");
         /// }
         /// ```
         ///
    @@ -2161,7 +2162,7 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_u64(0x0102030405060708);
    -    /// assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08");
    +    /// assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08");
         /// ```
         ///
         /// # Panics
    @@ -2183,7 +2184,7 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_u64_le(0x0102030405060708);
    -    /// assert_eq!(buf, b"\x08\x07\x06\x05\x04\x03\x02\x01");
    +    /// assert_eq!(buf, b"\x08\x07\x06\x05\x04\x03\x02\x01");
         /// ```
         ///
         /// # Panics
    @@ -2205,10 +2206,10 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_u64_ne(0x0102030405060708);
    -    /// if cfg!(target_endian = "big") {
    -    ///     assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08");
    +    /// if cfg!(target_endian = "big") {
    +    ///     assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08");
         /// } else {
    -    ///     assert_eq!(buf, b"\x08\x07\x06\x05\x04\x03\x02\x01");
    +    ///     assert_eq!(buf, b"\x08\x07\x06\x05\x04\x03\x02\x01");
         /// }
         /// ```
         ///
    @@ -2231,7 +2232,7 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_i64(0x0102030405060708);
    -    /// assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08");
    +    /// assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08");
         /// ```
         ///
         /// # Panics
    @@ -2253,7 +2254,7 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_i64_le(0x0102030405060708);
    -    /// assert_eq!(buf, b"\x08\x07\x06\x05\x04\x03\x02\x01");
    +    /// assert_eq!(buf, b"\x08\x07\x06\x05\x04\x03\x02\x01");
         /// ```
         ///
         /// # Panics
    @@ -2275,10 +2276,10 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_i64_ne(0x0102030405060708);
    -    /// if cfg!(target_endian = "big") {
    -    ///     assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08");
    +    /// if cfg!(target_endian = "big") {
    +    ///     assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08");
         /// } else {
    -    ///     assert_eq!(buf, b"\x08\x07\x06\x05\x04\x03\x02\x01");
    +    ///     assert_eq!(buf, b"\x08\x07\x06\x05\x04\x03\x02\x01");
         /// }
         /// ```
         ///
    @@ -2301,7 +2302,7 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_u128(0x01020304050607080910111213141516);
    -    /// assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16");
    +    /// assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16");
         /// ```
         ///
         /// # Panics
    @@ -2323,7 +2324,7 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_u128_le(0x01020304050607080910111213141516);
    -    /// assert_eq!(buf, b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01");
    +    /// assert_eq!(buf, b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01");
         /// ```
         ///
         /// # Panics
    @@ -2345,10 +2346,10 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_u128_ne(0x01020304050607080910111213141516);
    -    /// if cfg!(target_endian = "big") {
    -    ///     assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16");
    +    /// if cfg!(target_endian = "big") {
    +    ///     assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16");
         /// } else {
    -    ///     assert_eq!(buf, b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01");
    +    ///     assert_eq!(buf, b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01");
         /// }
         /// ```
         ///
    @@ -2371,7 +2372,7 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_i128(0x01020304050607080910111213141516);
    -    /// assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16");
    +    /// assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16");
         /// ```
         ///
         /// # Panics
    @@ -2393,7 +2394,7 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_i128_le(0x01020304050607080910111213141516);
    -    /// assert_eq!(buf, b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01");
    +    /// assert_eq!(buf, b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01");
         /// ```
         ///
         /// # Panics
    @@ -2415,10 +2416,10 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_i128_ne(0x01020304050607080910111213141516);
    -    /// if cfg!(target_endian = "big") {
    -    ///     assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16");
    +    /// if cfg!(target_endian = "big") {
    +    ///     assert_eq!(buf, b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x10\x11\x12\x13\x14\x15\x16");
         /// } else {
    -    ///     assert_eq!(buf, b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01");
    +    ///     assert_eq!(buf, b"\x16\x15\x14\x13\x12\x11\x10\x09\x08\x07\x06\x05\x04\x03\x02\x01");
         /// }
         /// ```
         ///
    @@ -2441,7 +2442,7 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_uint(0x010203, 3);
    -    /// assert_eq!(buf, b"\x01\x02\x03");
    +    /// assert_eq!(buf, b"\x01\x02\x03");
         /// ```
         ///
         /// # Panics
    @@ -2463,7 +2464,7 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_uint_le(0x010203, 3);
    -    /// assert_eq!(buf, b"\x03\x02\x01");
    +    /// assert_eq!(buf, b"\x03\x02\x01");
         /// ```
         ///
         /// # Panics
    @@ -2485,10 +2486,10 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_uint_ne(0x010203, 3);
    -    /// if cfg!(target_endian = "big") {
    -    ///     assert_eq!(buf, b"\x01\x02\x03");
    +    /// if cfg!(target_endian = "big") {
    +    ///     assert_eq!(buf, b"\x01\x02\x03");
         /// } else {
    -    ///     assert_eq!(buf, b"\x03\x02\x01");
    +    ///     assert_eq!(buf, b"\x03\x02\x01");
         /// }
         /// ```
         ///
    @@ -2497,7 +2498,7 @@
         /// This function panics if there is not enough remaining capacity in
         /// `self`.
         fn put_uint_ne(&mut self, n: u64, nbytes: usize) {
    -        if cfg!(target_endian = "big") {
    +        if cfg!(target_endian = "big") {
                 self.put_uint(n, nbytes)
             } else {
                 self.put_uint_le(n, nbytes)
    @@ -2515,7 +2516,7 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_int(0x0504010203, 3);
    -    /// assert_eq!(buf, b"\x01\x02\x03");
    +    /// assert_eq!(buf, b"\x01\x02\x03");
         /// ```
         ///
         /// # Panics
    @@ -2537,7 +2538,7 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_int_le(0x0504010203, 3);
    -    /// assert_eq!(buf, b"\x03\x02\x01");
    +    /// assert_eq!(buf, b"\x03\x02\x01");
         /// ```
         ///
         /// # Panics
    @@ -2559,10 +2560,10 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_int_ne(0x010203, 3);
    -    /// if cfg!(target_endian = "big") {
    -    ///     assert_eq!(buf, b"\x01\x02\x03");
    +    /// if cfg!(target_endian = "big") {
    +    ///     assert_eq!(buf, b"\x01\x02\x03");
         /// } else {
    -    ///     assert_eq!(buf, b"\x03\x02\x01");
    +    ///     assert_eq!(buf, b"\x03\x02\x01");
         /// }
         /// ```
         ///
    @@ -2571,7 +2572,7 @@
         /// This function panics if there is not enough remaining capacity in
         /// `self` or if `nbytes` is greater than 8.
         fn put_int_ne(&mut self, n: i64, nbytes: usize) {
    -        if cfg!(target_endian = "big") {
    +        if cfg!(target_endian = "big") {
                 self.put_int(n, nbytes)
             } else {
                 self.put_int_le(n, nbytes)
    @@ -2590,7 +2591,7 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_f32(1.2f32);
    -    /// assert_eq!(buf, b"\x3F\x99\x99\x9A");
    +    /// assert_eq!(buf, b"\x3F\x99\x99\x9A");
         /// ```
         ///
         /// # Panics
    @@ -2613,7 +2614,7 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_f32_le(1.2f32);
    -    /// assert_eq!(buf, b"\x9A\x99\x99\x3F");
    +    /// assert_eq!(buf, b"\x9A\x99\x99\x3F");
         /// ```
         ///
         /// # Panics
    @@ -2636,10 +2637,10 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_f32_ne(1.2f32);
    -    /// if cfg!(target_endian = "big") {
    -    ///     assert_eq!(buf, b"\x3F\x99\x99\x9A");
    +    /// if cfg!(target_endian = "big") {
    +    ///     assert_eq!(buf, b"\x3F\x99\x99\x9A");
         /// } else {
    -    ///     assert_eq!(buf, b"\x9A\x99\x99\x3F");
    +    ///     assert_eq!(buf, b"\x9A\x99\x99\x3F");
         /// }
         /// ```
         ///
    @@ -2663,7 +2664,7 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_f64(1.2f64);
    -    /// assert_eq!(buf, b"\x3F\xF3\x33\x33\x33\x33\x33\x33");
    +    /// assert_eq!(buf, b"\x3F\xF3\x33\x33\x33\x33\x33\x33");
         /// ```
         ///
         /// # Panics
    @@ -2686,7 +2687,7 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_f64_le(1.2f64);
    -    /// assert_eq!(buf, b"\x33\x33\x33\x33\x33\x33\xF3\x3F");
    +    /// assert_eq!(buf, b"\x33\x33\x33\x33\x33\x33\xF3\x3F");
         /// ```
         ///
         /// # Panics
    @@ -2709,10 +2710,10 @@
         ///
         /// let mut buf = vec![];
         /// buf.put_f64_ne(1.2f64);
    -    /// if cfg!(target_endian = "big") {
    -    ///     assert_eq!(buf, b"\x3F\xF3\x33\x33\x33\x33\x33\x33");
    +    /// if cfg!(target_endian = "big") {
    +    ///     assert_eq!(buf, b"\x3F\xF3\x33\x33\x33\x33\x33\x33");
         /// } else {
    -    ///     assert_eq!(buf, b"\x33\x33\x33\x33\x33\x33\xF3\x3F");
    +    ///     assert_eq!(buf, b"\x33\x33\x33\x33\x33\x33\xF3\x3F");
         /// }
         /// ```
         ///
    @@ -2759,15 +2760,15 @@
         ///
         /// let mut buf = vec![].writer();
         ///
    -    /// let num = buf.write(&b"hello world"[..]).unwrap();
    +    /// let num = buf.write(&b"hello world"[..]).unwrap();
         /// assert_eq!(11, num);
         ///
         /// let buf = buf.into_inner();
         ///
    -    /// assert_eq!(*buf, b"hello world"[..]);
    +    /// assert_eq!(*buf, b"hello world"[..]);
         /// ```
    -    #[cfg(feature = "std")]
    -    #[cfg_attr(docsrs, doc(cfg(feature = "std")))]
    +    #[cfg(feature = "std")]
    +    #[cfg_attr(docsrs, doc(cfg(feature = "std")))]
         fn writer(self) -> Writer<Self>
         where
             Self: Sized,
    @@ -2790,10 +2791,10 @@
         ///
         /// let mut chain = (&mut a[..]).chain_mut(&mut b[..]);
         ///
    -    /// chain.put_slice(b"hello world");
    +    /// chain.put_slice(b"hello world");
         ///
    -    /// assert_eq!(&a[..], b"hello");
    -    /// assert_eq!(&b[..], b" world");
    +    /// assert_eq!(&a[..], b"hello");
    +    /// assert_eq!(&b[..], b" world");
         /// ```
         fn chain_mut<U: BufMut>(self, next: U) -> Chain<Self, U>
         where
    @@ -2996,7 +2997,7 @@
     
             assert!(
                 cnt <= remaining,
    -            "cannot advance past `remaining_mut`: {:?} <= {:?}",
    +            "cannot advance past `remaining_mut`: {:?} <= {:?}",
                 cnt,
                 remaining
             );
    @@ -3023,7 +3024,7 @@
         where
             Self: Sized,
         {
    -        // In case the src isn't contiguous, reserve upfront
    +        // In case the src isn't contiguous, reserve upfront
             self.reserve(src.remaining());
     
             while src.has_remaining() {
    @@ -3052,6 +3053,6 @@
     }
     
     // The existence of this function makes the compiler catch if the BufMut
    -// trait is "object-safe" or not.
    +// trait is "object-safe" or not.
     fn _assert_trait_object(_b: &dyn BufMut) {}
     
    \ No newline at end of file diff --git a/src/bytes/buf/chain.rs.html b/src/bytes/buf/chain.rs.html index 953796096..02040f377 100644 --- a/src/bytes/buf/chain.rs.html +++ b/src/bytes/buf/chain.rs.html @@ -1,4 +1,5 @@ -chain.rs - source
    1
    +chain.rs - source
    +    
    1
     2
     3
     4
    @@ -243,7 +244,7 @@
     
    use crate::buf::{IntoIter, UninitSlice};
     use crate::{Buf, BufMut, Bytes};
     
    -#[cfg(feature = "std")]
    +#[cfg(feature = "std")]
     use std::io::IoSlice;
     
     /// A `Chain` sequences two buffers.
    @@ -253,18 +254,18 @@
     /// buffers ([`Buf`] values) or mutable buffers ([`BufMut`] values).
     ///
     /// This struct is generally created by calling [`Buf::chain`]. Please see that
    -/// function's documentation for more detail.
    +/// function's documentation for more detail.
     ///
     /// # Examples
     ///
     /// ```
     /// use bytes::{Bytes, Buf};
     ///
    -/// let mut buf = (&b"hello "[..])
    -///     .chain(&b"world"[..]);
    +/// let mut buf = (&b"hello "[..])
    +///     .chain(&b"world"[..]);
     ///
     /// let full: Bytes = buf.copy_to_bytes(11);
    -/// assert_eq!(full[..], b"hello world"[..]);
    +/// assert_eq!(full[..], b"hello world"[..]);
     /// ```
     ///
     /// [`Buf::chain`]: trait.Buf.html#method.chain
    @@ -289,10 +290,10 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let buf = (&b"hello"[..])
    -    ///     .chain(&b"world"[..]);
    +    /// let buf = (&b"hello"[..])
    +    ///     .chain(&b"world"[..]);
         ///
    -    /// assert_eq!(buf.first_ref()[..], b"hello"[..]);
    +    /// assert_eq!(buf.first_ref()[..], b"hello"[..]);
         /// ```
         pub fn first_ref(&self) -> &T {
             &self.a
    @@ -305,13 +306,13 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = (&b"hello"[..])
    -    ///     .chain(&b"world"[..]);
    +    /// let mut buf = (&b"hello"[..])
    +    ///     .chain(&b"world"[..]);
         ///
         /// buf.first_mut().advance(1);
         ///
         /// let full = buf.copy_to_bytes(9);
    -    /// assert_eq!(full, b"elloworld"[..]);
    +    /// assert_eq!(full, b"elloworld"[..]);
         /// ```
         pub fn first_mut(&mut self) -> &mut T {
             &mut self.a
    @@ -324,10 +325,10 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let buf = (&b"hello"[..])
    -    ///     .chain(&b"world"[..]);
    +    /// let buf = (&b"hello"[..])
    +    ///     .chain(&b"world"[..]);
         ///
    -    /// assert_eq!(buf.last_ref()[..], b"world"[..]);
    +    /// assert_eq!(buf.last_ref()[..], b"world"[..]);
         /// ```
         pub fn last_ref(&self) -> &U {
             &self.b
    @@ -340,13 +341,13 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let mut buf = (&b"hello "[..])
    -    ///     .chain(&b"world"[..]);
    +    /// let mut buf = (&b"hello "[..])
    +    ///     .chain(&b"world"[..]);
         ///
         /// buf.last_mut().advance(1);
         ///
         /// let full = buf.copy_to_bytes(10);
    -    /// assert_eq!(full, b"hello orld"[..]);
    +    /// assert_eq!(full, b"hello orld"[..]);
         /// ```
         pub fn last_mut(&mut self) -> &mut U {
             &mut self.b
    @@ -359,12 +360,12 @@
         /// ```
         /// use bytes::Buf;
         ///
    -    /// let chain = (&b"hello"[..])
    -    ///     .chain(&b"world"[..]);
    +    /// let chain = (&b"hello"[..])
    +    ///     .chain(&b"world"[..]);
         ///
         /// let (first, last) = chain.into_inner();
    -    /// assert_eq!(first[..], b"hello"[..]);
    -    /// assert_eq!(last[..], b"world"[..]);
    +    /// assert_eq!(first[..], b"hello"[..]);
    +    /// assert_eq!(last[..], b"world"[..]);
         /// ```
         pub fn into_inner(self) -> (T, U) {
             (self.a, self.b)
    @@ -406,8 +407,8 @@
             self.b.advance(cnt);
         }
     
    -    #[cfg(feature = "std")]
    -    fn chunks_vectored<'a>(&'a self, dst: &mut [IoSlice<'a>]) -> usize {
    +    #[cfg(feature = "std")]
    +    fn chunks_vectored<'a>(&'a self, dst: &mut [IoSlice<'a>]) -> usize {
             let mut n = self.a.chunks_vectored(dst);
             n += self.b.chunks_vectored(&mut dst[n..]);
             n
    @@ -422,7 +423,7 @@
             } else {
                 assert!(
                     len - a_rem <= self.b.remaining(),
    -                "`len` greater than remaining"
    +                "`len` greater than remaining"
                 );
                 let mut ret = crate::BytesMut::with_capacity(len);
                 ret.put(&mut self.a);
    diff --git a/src/bytes/buf/iter.rs.html b/src/bytes/buf/iter.rs.html
    index b03cf6bcd..2a7c7798d 100644
    --- a/src/bytes/buf/iter.rs.html
    +++ b/src/bytes/buf/iter.rs.html
    @@ -1,4 +1,5 @@
    -iter.rs - source
    1
    +iter.rs - source
    +    
    1
     2
     3
     4
    @@ -139,12 +140,12 @@
     /// ```
     /// use bytes::Bytes;
     ///
    -/// let buf = Bytes::from(&b"abc"[..]);
    +/// let buf = Bytes::from(&b"abc"[..]);
     /// let mut iter = buf.into_iter();
     ///
    -/// assert_eq!(iter.next(), Some(b'a'));
    -/// assert_eq!(iter.next(), Some(b'b'));
    -/// assert_eq!(iter.next(), Some(b'c'));
    +/// assert_eq!(iter.next(), Some(b'a'));
    +/// assert_eq!(iter.next(), Some(b'b'));
    +/// assert_eq!(iter.next(), Some(b'c'));
     /// assert_eq!(iter.next(), None);
     /// ```
     ///
    @@ -163,12 +164,12 @@
         /// ```
         /// use bytes::Bytes;
         ///
    -    /// let buf = Bytes::from_static(b"abc");
    +    /// let buf = Bytes::from_static(b"abc");
         /// let mut iter = buf.into_iter();
         ///
    -    /// assert_eq!(iter.next(), Some(b'a'));
    -    /// assert_eq!(iter.next(), Some(b'b'));
    -    /// assert_eq!(iter.next(), Some(b'c'));
    +    /// assert_eq!(iter.next(), Some(b'a'));
    +    /// assert_eq!(iter.next(), Some(b'b'));
    +    /// assert_eq!(iter.next(), Some(b'c'));
         /// assert_eq!(iter.next(), None);
         /// ```
         pub fn new(inner: T) -> IntoIter<T> {
    @@ -182,10 +183,10 @@
         /// ```rust
         /// use bytes::{Buf, Bytes};
         ///
    -    /// let buf = Bytes::from(&b"abc"[..]);
    +    /// let buf = Bytes::from(&b"abc"[..]);
         /// let mut iter = buf.into_iter();
         ///
    -    /// assert_eq!(iter.next(), Some(b'a'));
    +    /// assert_eq!(iter.next(), Some(b'a'));
         ///
         /// let buf = iter.into_inner();
         /// assert_eq!(2, buf.remaining());
    @@ -203,10 +204,10 @@
         /// ```rust
         /// use bytes::{Buf, Bytes};
         ///
    -    /// let buf = Bytes::from(&b"abc"[..]);
    +    /// let buf = Bytes::from(&b"abc"[..]);
         /// let mut iter = buf.into_iter();
         ///
    -    /// assert_eq!(iter.next(), Some(b'a'));
    +    /// assert_eq!(iter.next(), Some(b'a'));
         ///
         /// assert_eq!(2, iter.get_ref().remaining());
         /// ```
    @@ -223,14 +224,14 @@
         /// ```rust
         /// use bytes::{Buf, BytesMut};
         ///
    -    /// let buf = BytesMut::from(&b"abc"[..]);
    +    /// let buf = BytesMut::from(&b"abc"[..]);
         /// let mut iter = buf.into_iter();
         ///
    -    /// assert_eq!(iter.next(), Some(b'a'));
    +    /// assert_eq!(iter.next(), Some(b'a'));
         ///
         /// iter.get_mut().advance(1);
         ///
    -    /// assert_eq!(iter.next(), Some(b'c'));
    +    /// assert_eq!(iter.next(), Some(b'c'));
         /// ```
         pub fn get_mut(&mut self) -> &mut T {
             &mut self.inner
    diff --git a/src/bytes/buf/limit.rs.html b/src/bytes/buf/limit.rs.html
    index 8b5817aa3..9c28c9fc6 100644
    --- a/src/bytes/buf/limit.rs.html
    +++ b/src/bytes/buf/limit.rs.html
    @@ -1,4 +1,5 @@
    -limit.rs - source
    1
    +limit.rs - source
    +    
    1
     2
     3
     4
    diff --git a/src/bytes/buf/mod.rs.html b/src/bytes/buf/mod.rs.html
    index 261f4c781..ef2c5539a 100644
    --- a/src/bytes/buf/mod.rs.html
    +++ b/src/bytes/buf/mod.rs.html
    @@ -1,4 +1,5 @@
    -mod.rs - source
    1
    +mod.rs - source
    +    
    1
     2
     3
     4
    @@ -62,12 +63,12 @@
     mod chain;
     mod iter;
     mod limit;
    -#[cfg(feature = "std")]
    +#[cfg(feature = "std")]
     mod reader;
     mod take;
     mod uninit_slice;
     mod vec_deque;
    -#[cfg(feature = "std")]
    +#[cfg(feature = "std")]
     mod writer;
     
     pub use self::buf_impl::Buf;
    @@ -78,6 +79,6 @@
     pub use self::take::Take;
     pub use self::uninit_slice::UninitSlice;
     
    -#[cfg(feature = "std")]
    +#[cfg(feature = "std")]
     pub use self::{reader::Reader, writer::Writer};
     
    \ No newline at end of file diff --git a/src/bytes/buf/reader.rs.html b/src/bytes/buf/reader.rs.html index c4e0608db..98a64f56e 100644 --- a/src/bytes/buf/reader.rs.html +++ b/src/bytes/buf/reader.rs.html @@ -1,4 +1,5 @@ -reader.rs - source
    1
    +reader.rs - source
    +    
    1
     2
     3
     4
    @@ -107,9 +108,9 @@
         /// ```rust
         /// use bytes::Buf;
         ///
    -    /// let buf = b"hello world".reader();
    +    /// let buf = b"hello world".reader();
         ///
    -    /// assert_eq!(b"hello world", buf.get_ref());
    +    /// assert_eq!(b"hello world", buf.get_ref());
         /// ```
         pub fn get_ref(&self) -> &B {
             &self.buf
    @@ -130,7 +131,7 @@
         /// use bytes::Buf;
         /// use std::io;
         ///
    -    /// let mut buf = b"hello world".reader();
    +    /// let mut buf = b"hello world".reader();
         /// let mut dst = vec![];
         ///
         /// io::copy(&mut buf, &mut dst).unwrap();
    diff --git a/src/bytes/buf/take.rs.html b/src/bytes/buf/take.rs.html
    index edd02aaf5..1792c8499 100644
    --- a/src/bytes/buf/take.rs.html
    +++ b/src/bytes/buf/take.rs.html
    @@ -1,4 +1,5 @@
    -take.rs - source
    1
    +take.rs - source
    +    
    1
     2
     3
     4
    @@ -179,17 +180,17 @@
         /// ```rust
         /// use bytes::{Buf, BufMut};
         ///
    -    /// let mut buf = b"hello world".take(2);
    +    /// let mut buf = b"hello world".take(2);
         /// let mut dst = vec![];
         ///
         /// dst.put(&mut buf);
    -    /// assert_eq!(*dst, b"he"[..]);
    +    /// assert_eq!(*dst, b"he"[..]);
         ///
         /// let mut buf = buf.into_inner();
         ///
         /// dst.clear();
         /// dst.put(&mut buf);
    -    /// assert_eq!(*dst, b"llo world"[..]);
    +    /// assert_eq!(*dst, b"llo world"[..]);
         /// ```
         pub fn into_inner(self) -> T {
             self.inner
    @@ -204,7 +205,7 @@
         /// ```rust
         /// use bytes::Buf;
         ///
    -    /// let buf = b"hello world".take(2);
    +    /// let buf = b"hello world".take(2);
         ///
         /// assert_eq!(11, buf.get_ref().remaining());
         /// ```
    @@ -221,13 +222,13 @@
         /// ```rust
         /// use bytes::{Buf, BufMut};
         ///
    -    /// let mut buf = b"hello world".take(2);
    +    /// let mut buf = b"hello world".take(2);
         /// let mut dst = vec![];
         ///
         /// buf.get_mut().advance(2);
         ///
         /// dst.put(&mut buf);
    -    /// assert_eq!(*dst, b"ll"[..]);
    +    /// assert_eq!(*dst, b"ll"[..]);
         /// ```
         pub fn get_mut(&mut self) -> &mut T {
             &mut self.inner
    @@ -245,10 +246,10 @@
         /// ```rust
         /// use bytes::Buf;
         ///
    -    /// let mut buf = b"hello world".take(2);
    +    /// let mut buf = b"hello world".take(2);
         ///
         /// assert_eq!(2, buf.limit());
    -    /// assert_eq!(b'h', buf.get_u8());
    +    /// assert_eq!(b'h', buf.get_u8());
         /// assert_eq!(1, buf.limit());
         /// ```
         pub fn limit(&self) -> usize {
    @@ -267,17 +268,17 @@
         /// ```rust
         /// use bytes::{Buf, BufMut};
         ///
    -    /// let mut buf = b"hello world".take(2);
    +    /// let mut buf = b"hello world".take(2);
         /// let mut dst = vec![];
         ///
         /// dst.put(&mut buf);
    -    /// assert_eq!(*dst, b"he"[..]);
    +    /// assert_eq!(*dst, b"he"[..]);
         ///
         /// dst.clear();
         ///
         /// buf.set_limit(3);
         /// dst.put(&mut buf);
    -    /// assert_eq!(*dst, b"llo"[..]);
    +    /// assert_eq!(*dst, b"llo"[..]);
         /// ```
         pub fn set_limit(&mut self, lim: usize) {
             self.limit = lim
    @@ -301,7 +302,7 @@
         }
     
         fn copy_to_bytes(&mut self, len: usize) -> Bytes {
    -        assert!(len <= self.remaining(), "`len` greater than remaining");
    +        assert!(len <= self.remaining(), "`len` greater than remaining");
     
             let r = self.inner.copy_to_bytes(len);
             self.limit -= len;
    diff --git a/src/bytes/buf/uninit_slice.rs.html b/src/bytes/buf/uninit_slice.rs.html
    index d608b3ce8..305d3c301 100644
    --- a/src/bytes/buf/uninit_slice.rs.html
    +++ b/src/bytes/buf/uninit_slice.rs.html
    @@ -1,4 +1,5 @@
    -uninit_slice.rs - source
    1
    +uninit_slice.rs - source
    +    
    1
     2
     3
     4
    @@ -322,21 +323,21 @@
         /// # Safety
         ///
         /// The caller must ensure that `ptr` references a valid memory region owned
    -    /// by the caller representing a byte slice for the duration of `'a`.
    +    /// by the caller representing a byte slice for the duration of `'a`.
         ///
         /// # Examples
         ///
         /// ```
         /// use bytes::buf::UninitSlice;
         ///
    -    /// let bytes = b"hello world".to_vec();
    +    /// let bytes = b"hello world".to_vec();
         /// let ptr = bytes.as_ptr() as *mut _;
         /// let len = bytes.len();
         ///
         /// let slice = unsafe { UninitSlice::from_raw_parts_mut(ptr, len) };
         /// ```
         #[inline]
    -    pub unsafe fn from_raw_parts_mut<'a>(ptr: *mut u8, len: usize) -> &'a mut UninitSlice {
    +    pub unsafe fn from_raw_parts_mut<'a>(ptr: *mut u8, len: usize) -> &'a mut UninitSlice {
             let maybe_init: &mut [MaybeUninit<u8>] =
                 core::slice::from_raw_parts_mut(ptr as *mut _, len);
             Self::uninit(maybe_init)
    @@ -353,12 +354,12 @@
         /// ```
         /// use bytes::buf::UninitSlice;
         ///
    -    /// let mut data = [b'f', b'o', b'o'];
    +    /// let mut data = [b'f', b'o', b'o'];
         /// let slice = unsafe { UninitSlice::from_raw_parts_mut(data.as_mut_ptr(), 3) };
         ///
    -    /// slice.write_byte(0, b'b');
    +    /// slice.write_byte(0, b'b');
         ///
    -    /// assert_eq!(b"boo", &data[..]);
    +    /// assert_eq!(b"boo", &data[..]);
         /// ```
         #[inline]
         pub fn write_byte(&mut self, index: usize, byte: u8) {
    @@ -380,12 +381,12 @@
         /// ```
         /// use bytes::buf::UninitSlice;
         ///
    -    /// let mut data = [b'f', b'o', b'o'];
    +    /// let mut data = [b'f', b'o', b'o'];
         /// let slice = unsafe { UninitSlice::from_raw_parts_mut(data.as_mut_ptr(), 3) };
         ///
    -    /// slice.copy_from_slice(b"bar");
    +    /// slice.copy_from_slice(b"bar");
         ///
    -    /// assert_eq!(b"bar", &data[..]);
    +    /// assert_eq!(b"bar", &data[..]);
         /// ```
         #[inline]
         pub fn copy_from_slice(&mut self, src: &[u8]) {
    @@ -398,7 +399,7 @@
             }
         }
     
    -    /// Return a raw pointer to the slice's buffer.
    +    /// Return a raw pointer to the slice's buffer.
         ///
         /// # Safety
         ///
    @@ -419,7 +420,7 @@
             self.0.as_mut_ptr() as *mut _
         }
     
    -    /// Return a `&mut [MaybeUninit<u8>]` to this slice's buffer.
    +    /// Return a `&mut [MaybeUninit<u8>]` to this slice's buffer.
         ///
         /// # Safety
         ///
    @@ -441,7 +442,7 @@
         /// };
         /// ```
         #[inline]
    -    pub unsafe fn as_uninit_slice_mut<'a>(&'a mut self) -> &'a mut [MaybeUninit<u8>] {
    +    pub unsafe fn as_uninit_slice_mut<'a>(&'a mut self) -> &'a mut [MaybeUninit<u8>] {
             &mut *(self as *mut _ as *mut [MaybeUninit<u8>])
         }
     
    @@ -465,19 +466,19 @@
     }
     
     impl fmt::Debug for UninitSlice {
    -    fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
    -        fmt.debug_struct("UninitSlice[...]").finish()
    +    fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
    +        fmt.debug_struct("UninitSlice[...]").finish()
         }
     }
     
    -impl<'a> From<&'a mut [u8]> for &'a mut UninitSlice {
    -    fn from(slice: &'a mut [u8]) -> Self {
    +impl<'a> From<&'a mut [u8]> for &'a mut UninitSlice {
    +    fn from(slice: &'a mut [u8]) -> Self {
             UninitSlice::new(slice)
         }
     }
     
    -impl<'a> From<&'a mut [MaybeUninit<u8>]> for &'a mut UninitSlice {
    -    fn from(slice: &'a mut [MaybeUninit<u8>]) -> Self {
    +impl<'a> From<&'a mut [MaybeUninit<u8>]> for &'a mut UninitSlice {
    +    fn from(slice: &'a mut [MaybeUninit<u8>]) -> Self {
             UninitSlice::uninit(slice)
         }
     }
    diff --git a/src/bytes/buf/vec_deque.rs.html b/src/bytes/buf/vec_deque.rs.html
    index 4a7e6e10c..5a89d98ce 100644
    --- a/src/bytes/buf/vec_deque.rs.html
    +++ b/src/bytes/buf/vec_deque.rs.html
    @@ -1,4 +1,5 @@
    -vec_deque.rs - source
    1
    +vec_deque.rs - source
    +    
    1
     2
     3
     4
    diff --git a/src/bytes/buf/writer.rs.html b/src/bytes/buf/writer.rs.html
    index ff9183068..6e03b04b5 100644
    --- a/src/bytes/buf/writer.rs.html
    +++ b/src/bytes/buf/writer.rs.html
    @@ -1,4 +1,5 @@
    -writer.rs - source
    1
    +writer.rs - source
    +    
    1
     2
     3
     4
    @@ -150,12 +151,12 @@
         /// use std::io;
         ///
         /// let mut buf = vec![].writer();
    -    /// let mut src = &b"hello world"[..];
    +    /// let mut src = &b"hello world"[..];
         ///
         /// io::copy(&mut src, &mut buf).unwrap();
         ///
         /// let buf = buf.into_inner();
    -    /// assert_eq!(*buf, b"hello world"[..]);
    +    /// assert_eq!(*buf, b"hello world"[..]);
         /// ```
         pub fn into_inner(self) -> B {
             self.buf
    diff --git a/src/bytes/bytes.rs.html b/src/bytes/bytes.rs.html
    index f857713e4..615b17dd8 100644
    --- a/src/bytes/bytes.rs.html
    +++ b/src/bytes/bytes.rs.html
    @@ -1,4 +1,5 @@
    -bytes.rs - source
    1
    +bytes.rs - source
    +    
    1
     2
     3
     4
    @@ -1341,15 +1342,15 @@
     /// ```
     /// use bytes::Bytes;
     ///
    -/// let mut mem = Bytes::from("Hello world");
    +/// let mut mem = Bytes::from("Hello world");
     /// let a = mem.slice(0..5);
     ///
    -/// assert_eq!(a, "Hello");
    +/// assert_eq!(a, "Hello");
     ///
     /// let b = mem.split_to(6);
     ///
    -/// assert_eq!(mem, "world");
    -/// assert_eq!(b, "Hello ");
    +/// assert_eq!(mem, "world");
    +/// assert_eq!(b, "Hello ");
     /// ```
     ///
     /// # Memory layout
    @@ -1404,9 +1405,9 @@
     pub struct Bytes {
         ptr: *const u8,
         len: usize,
    -    // inlined "trait object"
    +    // inlined "trait object"
         data: AtomicPtr<()>,
    -    vtable: &'static Vtable,
    +    vtable: &'static Vtable,
     }
     
     pub(crate) struct Vtable {
    @@ -1431,13 +1432,13 @@
         /// use bytes::Bytes;
         ///
         /// let b = Bytes::new();
    -    /// assert_eq!(&b[..], b"");
    +    /// assert_eq!(&b[..], b"");
         /// ```
         #[inline]
         #[cfg(not(all(loom, test)))]
         pub const fn new() -> Self {
             // Make it a named const to work around
    -        // "unsizing casts are not allowed in const fn"
    +        // "unsizing casts are not allowed in const fn"
             const EMPTY: &[u8] = &[];
             Bytes::from_static(EMPTY)
         }
    @@ -1458,12 +1459,12 @@
         /// ```
         /// use bytes::Bytes;
         ///
    -    /// let b = Bytes::from_static(b"hello");
    -    /// assert_eq!(&b[..], b"hello");
    +    /// let b = Bytes::from_static(b"hello");
    +    /// assert_eq!(&b[..], b"hello");
         /// ```
         #[inline]
         #[cfg(not(all(loom, test)))]
    -    pub const fn from_static(bytes: &'static [u8]) -> Self {
    +    pub const fn from_static(bytes: &'static [u8]) -> Self {
             Bytes {
                 ptr: bytes.as_ptr(),
                 len: bytes.len(),
    @@ -1473,7 +1474,7 @@
         }
     
         #[cfg(all(loom, test))]
    -    pub fn from_static(bytes: &'static [u8]) -> Self {
    +    pub fn from_static(bytes: &'static [u8]) -> Self {
             Bytes {
                 ptr: bytes.as_ptr(),
                 len: bytes.len(),
    @@ -1489,7 +1490,7 @@
         /// ```
         /// use bytes::Bytes;
         ///
    -    /// let b = Bytes::from(&b"hello"[..]);
    +    /// let b = Bytes::from(&b"hello"[..]);
         /// assert_eq!(b.len(), 5);
         /// ```
         #[inline]
    @@ -1529,10 +1530,10 @@
         /// ```
         /// use bytes::Bytes;
         ///
    -    /// let a = Bytes::from(&b"hello world"[..]);
    +    /// let a = Bytes::from(&b"hello world"[..]);
         /// let b = a.slice(2..5);
         ///
    -    /// assert_eq!(&b[..], b"llo");
    +    /// assert_eq!(&b[..], b"llo");
         /// ```
         ///
         /// # Panics
    @@ -1551,20 +1552,20 @@
             };
     
             let end = match range.end_bound() {
    -            Bound::Included(&n) => n.checked_add(1).expect("out of range"),
    +            Bound::Included(&n) => n.checked_add(1).expect("out of range"),
                 Bound::Excluded(&n) => n,
                 Bound::Unbounded => len,
             };
     
             assert!(
                 begin <= end,
    -            "range start must not be greater than end: {:?} <= {:?}",
    +            "range start must not be greater than end: {:?} <= {:?}",
                 begin,
                 end,
             );
             assert!(
                 end <= len,
    -            "range end out of bounds: {:?} <= {:?}",
    +            "range end out of bounds: {:?} <= {:?}",
                 end,
                 len,
             );
    @@ -1595,11 +1596,11 @@
         /// ```
         /// use bytes::Bytes;
         ///
    -    /// let bytes = Bytes::from(&b"012345678"[..]);
    +    /// let bytes = Bytes::from(&b"012345678"[..]);
         /// let as_slice = bytes.as_ref();
         /// let subset = &as_slice[2..6];
         /// let subslice = bytes.slice_ref(&subset);
    -    /// assert_eq!(&subslice[..], b"2345");
    +    /// assert_eq!(&subslice[..], b"2345");
         /// ```
         ///
         /// # Panics
    @@ -1621,13 +1622,13 @@
     
             assert!(
                 sub_p >= bytes_p,
    -            "subset pointer ({:p}) is smaller than self pointer ({:p})",
    +            "subset pointer ({:p}) is smaller than self pointer ({:p})",
                 subset.as_ptr(),
                 self.as_ptr(),
             );
             assert!(
                 sub_p + sub_len <= bytes_p + bytes_len,
    -            "subset is out of bounds: self = ({:p}, {}), subset = ({:p}, {})",
    +            "subset is out of bounds: self = ({:p}, {}), subset = ({:p}, {})",
                 self.as_ptr(),
                 bytes_len,
                 subset.as_ptr(),
    @@ -1652,21 +1653,21 @@
         /// ```
         /// use bytes::Bytes;
         ///
    -    /// let mut a = Bytes::from(&b"hello world"[..]);
    +    /// let mut a = Bytes::from(&b"hello world"[..]);
         /// let b = a.split_off(5);
         ///
    -    /// assert_eq!(&a[..], b"hello");
    -    /// assert_eq!(&b[..], b" world");
    +    /// assert_eq!(&a[..], b"hello");
    +    /// assert_eq!(&b[..], b" world");
         /// ```
         ///
         /// # Panics
         ///
         /// Panics if `at > len`.
    -    #[must_use = "consider Bytes::truncate if you don't need the other half"]
    +    #[must_use = "consider Bytes::truncate if you don't need the other half"]
         pub fn split_off(&mut self, at: usize) -> Self {
             assert!(
                 at <= self.len(),
    -            "split_off out of bounds: {:?} <= {:?}",
    +            "split_off out of bounds: {:?} <= {:?}",
                 at,
                 self.len(),
             );
    @@ -1701,21 +1702,21 @@
         /// ```
         /// use bytes::Bytes;
         ///
    -    /// let mut a = Bytes::from(&b"hello world"[..]);
    +    /// let mut a = Bytes::from(&b"hello world"[..]);
         /// let b = a.split_to(5);
         ///
    -    /// assert_eq!(&a[..], b" world");
    -    /// assert_eq!(&b[..], b"hello");
    +    /// assert_eq!(&a[..], b" world");
    +    /// assert_eq!(&b[..], b"hello");
         /// ```
         ///
         /// # Panics
         ///
         /// Panics if `at > len`.
    -    #[must_use = "consider Bytes::advance if you don't need the other half"]
    +    #[must_use = "consider Bytes::advance if you don't need the other half"]
         pub fn split_to(&mut self, at: usize) -> Self {
             assert!(
                 at <= self.len(),
    -            "split_to out of bounds: {:?} <= {:?}",
    +            "split_to out of bounds: {:?} <= {:?}",
                 at,
                 self.len(),
             );
    @@ -1739,7 +1740,7 @@
         /// Shortens the buffer, keeping the first `len` bytes and dropping the
         /// rest.
         ///
    -    /// If `len` is greater than the buffer's current length, this has no
    +    /// If `len` is greater than the buffer's current length, this has no
         /// effect.
         ///
         /// The [`split_off`] method can emulate `truncate`, but this causes the
    @@ -1750,16 +1751,16 @@
         /// ```
         /// use bytes::Bytes;
         ///
    -    /// let mut buf = Bytes::from(&b"hello world"[..]);
    +    /// let mut buf = Bytes::from(&b"hello world"[..]);
         /// buf.truncate(5);
    -    /// assert_eq!(buf, b"hello"[..]);
    +    /// assert_eq!(buf, b"hello"[..]);
         /// ```
         ///
         /// [`split_off`]: #method.split_off
         #[inline]
         pub fn truncate(&mut self, len: usize) {
             if len < self.len {
    -            // The Vec "promotable" vtables do not store the capacity,
    +            // The Vec "promotable" vtables do not store the capacity,
                 // so we cannot truncate while using this repr. We *have* to
                 // promote using `split_off` so the capacity can be stored.
                 if self.vtable as *const Vtable == &PROMOTABLE_EVEN_VTABLE
    @@ -1779,7 +1780,7 @@
         /// ```
         /// use bytes::Bytes;
         ///
    -    /// let mut buf = Bytes::from(&b"hello world"[..]);
    +    /// let mut buf = Bytes::from(&b"hello world"[..]);
         /// buf.clear();
         /// assert!(buf.is_empty());
         /// ```
    @@ -1793,7 +1794,7 @@
             ptr: *const u8,
             len: usize,
             data: AtomicPtr<()>,
    -        vtable: &'static Vtable,
    +        vtable: &'static Vtable,
         ) -> Bytes {
             Bytes {
                 ptr,
    @@ -1813,7 +1814,7 @@
         #[inline]
         unsafe fn inc_start(&mut self, by: usize) {
             // should already be asserted, but debug assert for tests
    -        debug_assert!(self.len >= by, "internal: inc_start out of bounds");
    +        debug_assert!(self.len >= by, "internal: inc_start out of bounds");
             self.len -= by;
             self.ptr = self.ptr.add(by);
         }
    @@ -1852,7 +1853,7 @@
         fn advance(&mut self, cnt: usize) {
             assert!(
                 cnt <= self.len(),
    -            "cannot advance past `remaining`: {:?} <= {:?}",
    +            "cannot advance past `remaining`: {:?} <= {:?}",
                 cnt,
                 self.len(),
             );
    @@ -1913,9 +1914,9 @@
         }
     }
     
    -impl<'a> IntoIterator for &'a Bytes {
    -    type Item = &'a u8;
    -    type IntoIter = core::slice::Iter<'a, u8>;
    +impl<'a> IntoIterator for &'a Bytes {
    +    type Item = &'a u8;
    +    type IntoIter = core::slice::Iter<'a, u8>;
     
         fn into_iter(self) -> Self::IntoIter {
             self.as_slice().iter()
    @@ -2070,20 +2071,20 @@
         }
     }
     
    -impl<'a, T: ?Sized> PartialEq<&'a T> for Bytes
    +impl<'a, T: ?Sized> PartialEq<&'a T> for Bytes
     where
         Bytes: PartialEq<T>,
     {
    -    fn eq(&self, other: &&'a T) -> bool {
    +    fn eq(&self, other: &&'a T) -> bool {
             *self == **other
         }
     }
     
    -impl<'a, T: ?Sized> PartialOrd<&'a T> for Bytes
    +impl<'a, T: ?Sized> PartialOrd<&'a T> for Bytes
     where
         Bytes: PartialOrd<T>,
     {
    -    fn partial_cmp(&self, other: &&'a T) -> Option<cmp::Ordering> {
    +    fn partial_cmp(&self, other: &&'a T) -> Option<cmp::Ordering> {
             self.partial_cmp(&**other)
         }
     }
    @@ -2097,14 +2098,14 @@
         }
     }
     
    -impl From<&'static [u8]> for Bytes {
    -    fn from(slice: &'static [u8]) -> Bytes {
    +impl From<&'static [u8]> for Bytes {
    +    fn from(slice: &'static [u8]) -> Bytes {
             Bytes::from_static(slice)
         }
     }
     
    -impl From<&'static str> for Bytes {
    -    fn from(slice: &'static str) -> Bytes {
    +impl From<&'static str> for Bytes {
    +    fn from(slice: &'static str) -> Bytes {
             Bytes::from_static(slice.as_bytes())
         }
     }
    @@ -2133,7 +2134,7 @@
             // always succeed.
             debug_assert!(
                 0 == (shared as usize & KIND_MASK),
    -            "internal: Box<Shared> should have an aligned pointer",
    +            "internal: Box<Shared> should have an aligned pointer",
             );
             Bytes {
                 ptr,
    @@ -2146,8 +2147,8 @@
     
     impl From<Box<[u8]>> for Bytes {
         fn from(slice: Box<[u8]>) -> Bytes {
    -        // Box<[u8]> doesn't contain a heap allocation for empty slices,
    -        // so the pointer isn't aligned enough for the KIND_VEC stashing to
    +        // Box<[u8]> doesn't contain a heap allocation for empty slices,
    +        // so the pointer isn't aligned enough for the KIND_VEC stashing to
             // work.
             if slice.is_empty() {
                 return Bytes::new();
    @@ -2191,10 +2192,10 @@
     // ===== impl Vtable =====
     
     impl fmt::Debug for Vtable {
    -    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
    -        f.debug_struct("Vtable")
    -            .field("clone", &(self.clone as *const ()))
    -            .field("drop", &(self.drop as *const ()))
    +    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
    +        f.debug_struct("Vtable")
    +            .field("clone", &(self.clone as *const ()))
    +            .field("drop", &(self.drop as *const ()))
                 .finish()
         }
     }
    @@ -2218,7 +2219,7 @@
     }
     
     unsafe fn static_drop(_: &mut AtomicPtr<()>, _: *const u8, _: usize) {
    -    // nothing to drop for &'static [u8]
    +    // nothing to drop for &'static [u8]
     }
     
     // ===== impl PromotableVtable =====
    @@ -2334,7 +2335,7 @@
     // ===== impl SharedVtable =====
     
     struct Shared {
    -    // Holds arguments to dealloc upon Drop, but otherwise doesn't use them
    +    // Holds arguments to dealloc upon Drop, but otherwise doesn't use them
         buf: *mut u8,
         cap: usize,
         ref_cnt: AtomicUsize,
    @@ -2434,10 +2435,10 @@
         // concurrently, so some care must be taken.
     
         // First, allocate a new `Shared` instance containing the
    -    // `Vec` fields. It's important to note that `ptr`, `len`,
    +    // `Vec` fields. It's important to note that `ptr`, `len`,
         // and `cap` cannot be mutated without having `&mut self`.
         // This means that these fields will not be concurrently
    -    // updated and since the buffer hasn't been promoted to an
    +    // updated and since the buffer hasn't been promoted to an
         // `Arc`, those three fields still are the components of the
         // vector.
         let shared = Box::new(Shared {
    @@ -2455,7 +2456,7 @@
         // always succeed.
         debug_assert!(
             0 == (shared as usize & KIND_MASK),
    -        "internal: Box<Shared> should have an aligned pointer",
    +        "internal: Box<Shared> should have an aligned pointer",
         );
     
         // Try compare & swapping the pointer into the `arc` field.
    @@ -2510,10 +2511,10 @@
         //
         // > It is important to enforce any possible access to the object in one
         // > thread (through an existing reference) to *happen before* deleting
    -    // > the object in a different thread. This is achieved by a "release"
    +    // > the object in a different thread. This is achieved by a "release"
         // > operation after dropping a reference (any access to the object
         // > through this reference must obviously happened before), and an
    -    // > "acquire" operation before deleting the object.
    +    // > "acquire" operation before deleting the object.
         //
         // [1]: (www.boost.org/doc/libs/1_55_0/doc/html/atomic/usage_examples.html)
         //
    @@ -2558,7 +2559,7 @@
     /// use bytes::Bytes;
     /// #[deny(unused_must_use)]
     /// {
    -///     let mut b1 = Bytes::from("hello world");
    +///     let mut b1 = Bytes::from("hello world");
     ///     b1.split_to(6);
     /// }
     /// ```
    @@ -2568,7 +2569,7 @@
     /// use bytes::Bytes;
     /// #[deny(unused_must_use)]
     /// {
    -///     let mut b1 = Bytes::from("hello world");
    +///     let mut b1 = Bytes::from("hello world");
     ///     b1.split_off(6);
     /// }
     /// ```
    @@ -2584,7 +2585,7 @@
         #[test]
         fn bytes_cloning_vec() {
             loom::model(|| {
    -            let a = Bytes::from(b"abcdefgh".to_vec());
    +            let a = Bytes::from(b"abcdefgh".to_vec());
                 let addr = a.as_ptr() as usize;
     
                 // test the Bytes::clone is Sync by putting it in an Arc
    diff --git a/src/bytes/bytes_mut.rs.html b/src/bytes/bytes_mut.rs.html
    index 456937fbe..2b1cb3bf2 100644
    --- a/src/bytes/bytes_mut.rs.html
    +++ b/src/bytes/bytes_mut.rs.html
    @@ -1,4 +1,5 @@
    -bytes_mut.rs - source
    1
    +bytes_mut.rs - source
    +    
    1
     2
     3
     4
    @@ -1845,7 +1846,7 @@
     ///
     /// # Growth
     ///
    -/// `BytesMut`'s `BufMut` implementation will implicitly grow its buffer as
    +/// `BytesMut`'s `BufMut` implementation will implicitly grow its buffer as
     /// necessary. However, explicitly reserving the required space up-front before
     /// a series of inserts will be more efficient.
     ///
    @@ -1856,11 +1857,11 @@
     ///
     /// let mut buf = BytesMut::with_capacity(64);
     ///
    -/// buf.put_u8(b'h');
    -/// buf.put_u8(b'e');
    -/// buf.put(&b"llo"[..]);
    +/// buf.put_u8(b'h');
    +/// buf.put_u8(b'e');
    +/// buf.put(&b"llo"[..]);
     ///
    -/// assert_eq!(&buf[..], b"hello");
    +/// assert_eq!(&buf[..], b"hello");
     ///
     /// // Freeze the buffer so that it can be shared
     /// let a = buf.freeze();
    @@ -1868,8 +1869,8 @@
     /// // This does not allocate, instead `b` points to the same memory.
     /// let b = a.clone();
     ///
    -/// assert_eq!(&a[..], b"hello");
    -/// assert_eq!(&b[..], b"hello");
    +/// assert_eq!(&a[..], b"hello");
    +/// assert_eq!(&b[..], b"hello");
     /// ```
     pub struct BytesMut {
         ptr: NonNull<u8>,
    @@ -1917,9 +1918,9 @@
     const MAX_VEC_POS: usize = usize::MAX >> VEC_POS_OFFSET;
     const NOT_VEC_POS_MASK: usize = 0b11111;
     
    -#[cfg(target_pointer_width = "64")]
    +#[cfg(target_pointer_width = "64")]
     const PTR_WIDTH: usize = 64;
    -#[cfg(target_pointer_width = "32")]
    +#[cfg(target_pointer_width = "32")]
     const PTR_WIDTH: usize = 32;
     
     /*
    @@ -1947,9 +1948,9 @@
         /// // `bytes` contains no data, even though there is capacity
         /// assert_eq!(bytes.len(), 0);
         ///
    -    /// bytes.put(&b"hello world"[..]);
    +    /// bytes.put(&b"hello world"[..]);
         ///
    -    /// assert_eq!(&bytes[..], b"hello world");
    +    /// assert_eq!(&bytes[..], b"hello world");
         /// ```
         #[inline]
         pub fn with_capacity(capacity: usize) -> BytesMut {
    @@ -1971,9 +1972,9 @@
         /// assert_eq!(0, bytes.len());
         ///
         /// bytes.reserve(2);
    -    /// bytes.put_slice(b"xy");
    +    /// bytes.put_slice(b"xy");
         ///
    -    /// assert_eq!(&b"xy"[..], &bytes[..]);
    +    /// assert_eq!(&b"xy"[..], &bytes[..]);
         /// ```
         #[inline]
         pub fn new() -> BytesMut {
    @@ -1987,7 +1988,7 @@
         /// ```
         /// use bytes::BytesMut;
         ///
    -    /// let b = BytesMut::from(&b"hello"[..]);
    +    /// let b = BytesMut::from(&b"hello"[..]);
         /// assert_eq!(b.len(), 5);
         /// ```
         #[inline]
    @@ -2038,15 +2039,15 @@
         /// use std::thread;
         ///
         /// let mut b = BytesMut::with_capacity(64);
    -    /// b.put(&b"hello world"[..]);
    +    /// b.put(&b"hello world"[..]);
         /// let b1 = b.freeze();
         /// let b2 = b1.clone();
         ///
         /// let th = thread::spawn(move || {
    -    ///     assert_eq!(&b1[..], b"hello world");
    +    ///     assert_eq!(&b1[..], b"hello world");
         /// });
         ///
    -    /// assert_eq!(&b2[..], b"hello world");
    +    /// assert_eq!(&b2[..], b"hello world");
         /// th.join().unwrap();
         /// ```
         #[inline]
    @@ -2101,24 +2102,24 @@
         /// ```
         /// use bytes::BytesMut;
         ///
    -    /// let mut a = BytesMut::from(&b"hello world"[..]);
    +    /// let mut a = BytesMut::from(&b"hello world"[..]);
         /// let mut b = a.split_off(5);
         ///
    -    /// a[0] = b'j';
    -    /// b[0] = b'!';
    +    /// a[0] = b'j';
    +    /// b[0] = b'!';
         ///
    -    /// assert_eq!(&a[..], b"jello");
    -    /// assert_eq!(&b[..], b"!world");
    +    /// assert_eq!(&a[..], b"jello");
    +    /// assert_eq!(&b[..], b"!world");
         /// ```
         ///
         /// # Panics
         ///
         /// Panics if `at > capacity`.
    -    #[must_use = "consider BytesMut::truncate if you don't need the other half"]
    +    #[must_use = "consider BytesMut::truncate if you don't need the other half"]
         pub fn split_off(&mut self, at: usize) -> BytesMut {
             assert!(
                 at <= self.capacity(),
    -            "split_off out of bounds: {:?} <= {:?}",
    +            "split_off out of bounds: {:?} <= {:?}",
                 at,
                 self.capacity(),
             );
    @@ -2146,16 +2147,16 @@
         /// use bytes::{BytesMut, BufMut};
         ///
         /// let mut buf = BytesMut::with_capacity(1024);
    -    /// buf.put(&b"hello world"[..]);
    +    /// buf.put(&b"hello world"[..]);
         ///
         /// let other = buf.split();
         ///
         /// assert!(buf.is_empty());
         /// assert_eq!(1013, buf.capacity());
         ///
    -    /// assert_eq!(other, b"hello world"[..]);
    +    /// assert_eq!(other, b"hello world"[..]);
         /// ```
    -    #[must_use = "consider BytesMut::advance(len()) if you don't need the other half"]
    +    #[must_use = "consider BytesMut::advance(len()) if you don't need the other half"]
         pub fn split(&mut self) -> BytesMut {
             let len = self.len();
             self.split_to(len)
    @@ -2174,24 +2175,24 @@
         /// ```
         /// use bytes::BytesMut;
         ///
    -    /// let mut a = BytesMut::from(&b"hello world"[..]);
    +    /// let mut a = BytesMut::from(&b"hello world"[..]);
         /// let mut b = a.split_to(5);
         ///
    -    /// a[0] = b'!';
    -    /// b[0] = b'j';
    +    /// a[0] = b'!';
    +    /// b[0] = b'j';
         ///
    -    /// assert_eq!(&a[..], b"!world");
    -    /// assert_eq!(&b[..], b"jello");
    +    /// assert_eq!(&a[..], b"!world");
    +    /// assert_eq!(&b[..], b"jello");
         /// ```
         ///
         /// # Panics
         ///
         /// Panics if `at > len`.
    -    #[must_use = "consider BytesMut::advance if you don't need the other half"]
    +    #[must_use = "consider BytesMut::advance if you don't need the other half"]
         pub fn split_to(&mut self, at: usize) -> BytesMut {
             assert!(
                 at <= self.len(),
    -            "split_to out of bounds: {:?} <= {:?}",
    +            "split_to out of bounds: {:?} <= {:?}",
                 at,
                 self.len(),
             );
    @@ -2207,7 +2208,7 @@
         /// Shortens the buffer, keeping the first `len` bytes and dropping the
         /// rest.
         ///
    -    /// If `len` is greater than the buffer's current length, this has no
    +    /// If `len` is greater than the buffer's current length, this has no
         /// effect.
         ///
         /// Existing underlying capacity is preserved.
    @@ -2220,9 +2221,9 @@
         /// ```
         /// use bytes::BytesMut;
         ///
    -    /// let mut buf = BytesMut::from(&b"hello world"[..]);
    +    /// let mut buf = BytesMut::from(&b"hello world"[..]);
         /// buf.truncate(5);
    -    /// assert_eq!(buf, b"hello"[..]);
    +    /// assert_eq!(buf, b"hello"[..]);
         /// ```
         ///
         /// [`split_off`]: #method.split_off
    @@ -2241,7 +2242,7 @@
         /// ```
         /// use bytes::BytesMut;
         ///
    -    /// let mut buf = BytesMut::from(&b"hello world"[..]);
    +    /// let mut buf = BytesMut::from(&b"hello world"[..]);
         /// buf.clear();
         /// assert!(buf.is_empty());
         /// ```
    @@ -2297,23 +2298,23 @@
         /// ```
         /// use bytes::BytesMut;
         ///
    -    /// let mut b = BytesMut::from(&b"hello world"[..]);
    +    /// let mut b = BytesMut::from(&b"hello world"[..]);
         ///
         /// unsafe {
         ///     b.set_len(5);
         /// }
         ///
    -    /// assert_eq!(&b[..], b"hello");
    +    /// assert_eq!(&b[..], b"hello");
         ///
         /// unsafe {
         ///     b.set_len(11);
         /// }
         ///
    -    /// assert_eq!(&b[..], b"hello world");
    +    /// assert_eq!(&b[..], b"hello world");
         /// ```
         #[inline]
         pub unsafe fn set_len(&mut self, len: usize) {
    -        debug_assert!(len <= self.cap, "set_len out of bounds");
    +        debug_assert!(len <= self.cap, "set_len out of bounds");
             self.len = len;
         }
     
    @@ -2335,7 +2336,7 @@
         /// view to the front of the buffer is not too expensive in terms of the
         /// (amortized) time required. The precise condition is subject to change;
         /// as of now, the length of the data being shifted needs to be at least as
    -    /// large as the distance that it's shifted by. If the current view is empty
    +    /// large as the distance that it's shifted by. If the current view is empty
         /// and the original buffer is large enough to fit the requested additional
         /// capacity, then reallocations will never happen.
         ///
    @@ -2346,7 +2347,7 @@
         /// ```
         /// use bytes::BytesMut;
         ///
    -    /// let mut buf = BytesMut::from(&b"hello"[..]);
    +    /// let mut buf = BytesMut::from(&b"hello"[..]);
         /// buf.reserve(64);
         /// assert!(buf.capacity() >= 69);
         /// ```
    @@ -2396,14 +2397,14 @@
             let kind = self.kind();
     
             if kind == KIND_VEC {
    -            // If there's enough free space before the start of the buffer, then
    +            // If there's enough free space before the start of the buffer, then
                 // just copy the data backwards and reuse the already-allocated
                 // space.
                 //
                 // Otherwise, since backed by a vector, use `Vec::reserve`
                 //
                 // We need to make sure that this optimization does not kill the
    -            // amortized runtimes of BytesMut's operations.
    +            // amortized runtimes of BytesMut's operations.
                 unsafe {
                     let (off, prev) = self.get_vec_pos();
     
    @@ -2421,13 +2422,13 @@
                     //
                     // [For more details check issue #524, and PR #525.]
                     if self.capacity() - self.len() + off >= additional && off >= self.len() {
    -                    // There's enough space, and it's not too much overhead:
    +                    // There's enough space, and it's not too much overhead:
                         // reuse the space!
                         //
                         // Just move the pointer back to the start after copying
                         // data back.
                         let base_ptr = self.ptr.as_ptr().offset(-(off as isize));
    -                    // Since `off >= self.len()`, the two regions don't overlap.
    +                    // Since `off >= self.len()`, the two regions don't overlap.
                         ptr::copy_nonoverlapping(self.ptr.as_ptr(), base_ptr, self.len);
                         self.ptr = vptr(base_ptr);
                         self.set_vec_pos(0, prev);
    @@ -2459,7 +2460,7 @@
             // allocating a new vector with the requested capacity.
             //
             // Compute the new capacity
    -        let mut new_cap = len.checked_add(additional).expect("overflow");
    +        let mut new_cap = len.checked_add(additional).expect("overflow");
     
             let original_capacity;
             let original_capacity_repr;
    @@ -2503,7 +2504,7 @@
                         // `Vec`, so it does not take the offset into account.
                         //
                         // Thus we have to manually add it here.
    -                    new_cap = new_cap.checked_add(off).expect("overflow");
    +                    new_cap = new_cap.checked_add(off).expect("overflow");
     
                         // The vector capacity is not sufficient. The reserve request is
                         // asking for more than the initial buffer capacity. Allocate more
    @@ -2521,9 +2522,9 @@
                         //
                         // The length field of `Shared::vec` is not used by the `BytesMut`;
                         // instead we use the `len` field in the `BytesMut` itself. However,
    -                    // when calling `reserve`, it doesn't guarantee that data stored in
    +                    // when calling `reserve`, it doesn't guarantee that data stored in
                         // the unused capacity of the vector is copied over to the new
    -                    // allocation, so we need to ensure that we don't have any data we
    +                    // allocation, so we need to ensure that we don't have any data we
                         // care about in the unused capacity before calling `reserve`.
                         debug_assert!(off + len <= v.capacity());
                         v.set_len(off + len);
    @@ -2569,10 +2570,10 @@
         /// use bytes::BytesMut;
         ///
         /// let mut buf = BytesMut::with_capacity(0);
    -    /// buf.extend_from_slice(b"aaabbb");
    -    /// buf.extend_from_slice(b"cccddd");
    +    /// buf.extend_from_slice(b"aaabbb");
    +    /// buf.extend_from_slice(b"cccddd");
         ///
    -    /// assert_eq!(b"aaabbbcccddd", &buf[..]);
    +    /// assert_eq!(b"aaabbbcccddd", &buf[..]);
         /// ```
         #[inline]
         pub fn extend_from_slice(&mut self, extend: &[u8]) {
    @@ -2607,14 +2608,14 @@
         /// use bytes::BytesMut;
         ///
         /// let mut buf = BytesMut::with_capacity(64);
    -    /// buf.extend_from_slice(b"aaabbbcccddd");
    +    /// buf.extend_from_slice(b"aaabbbcccddd");
         ///
         /// let split = buf.split_off(6);
    -    /// assert_eq!(b"aaabbb", &buf[..]);
    -    /// assert_eq!(b"cccddd", &split[..]);
    +    /// assert_eq!(b"aaabbb", &buf[..]);
    +    /// assert_eq!(b"cccddd", &split[..]);
         ///
         /// buf.unsplit(split);
    -    /// assert_eq!(b"aaabbbcccddd", &buf[..]);
    +    /// assert_eq!(b"aaabbbcccddd", &buf[..]);
         /// ```
         pub fn unsplit(&mut self, other: BytesMut) {
             if self.is_empty() {
    @@ -2632,7 +2633,7 @@
         // For now, use a `Vec` to manage the memory for us, but we may want to
         // change that in the future to some alternate allocator strategy.
         //
    -    // Thus, we don't expose an easy way to construct from a `Vec` since an
    +    // Thus, we don't expose an easy way to construct from a `Vec` since an
         // internal change could make a simple pattern (`BytesMut::from(vec)`)
         // suddenly a lot more expensive.
         #[inline]
    @@ -2670,15 +2671,15 @@
                 return;
             }
     
    -        debug_assert!(start <= self.cap, "internal: set_start out of bounds");
    +        debug_assert!(start <= self.cap, "internal: set_start out of bounds");
     
             let kind = self.kind();
     
             if kind == KIND_VEC {
                 // Setting the start when in vec representation is a little more
                 // complicated. First, we have to track how far ahead the
    -            // "start" of the byte buffer from the beginning of the vec. We
    -            // also have to ensure that we don't exceed the maximum shift.
    +            // "start" of the byte buffer from the beginning of the vec. We
    +            // also have to ensure that we don't exceed the maximum shift.
                 let (mut pos, prev) = self.get_vec_pos();
                 pos += start;
     
    @@ -2687,7 +2688,7 @@
                 } else {
                     // The repr must be upgraded to ARC. This will never happen
                     // on 64 bit systems and will only happen on 32 bit systems
    -                // when shifting past 134,217,727 bytes. As such, we don't
    +                // when shifting past 134,217,727 bytes. As such, we don't
                     // worry too much about performance here.
                     self.promote_to_shared(/*ref_count = */ 1);
                 }
    @@ -2709,7 +2710,7 @@
     
         unsafe fn set_end(&mut self, end: usize) {
             debug_assert_eq!(self.kind(), KIND_ARC);
    -        assert!(end <= self.cap, "set_end out of bounds");
    +        assert!(end <= self.cap, "set_end out of bounds");
     
             self.cap = end;
             self.len = cmp::min(self.len, end);
    @@ -2752,10 +2753,10 @@
             let off = (self.data as usize) >> VEC_POS_OFFSET;
     
             // First, allocate a new `Shared` instance containing the
    -        // `Vec` fields. It's important to note that `ptr`, `len`,
    +        // `Vec` fields. It's important to note that `ptr`, `len`,
             // and `cap` cannot be mutated without having `&mut self`.
             // This means that these fields will not be concurrently
    -        // updated and since the buffer hasn't been promoted to an
    +        // updated and since the buffer hasn't been promoted to an
             // `Arc`, those three fields still are the components of the
             // vector.
             let shared = Box::new(Shared {
    @@ -2775,9 +2776,9 @@
     
         /// Makes an exact shallow clone of `self`.
         ///
    -    /// The kind of `self` doesn't matter, but this is unsafe
    +    /// The kind of `self` doesn't matter, but this is unsafe
         /// because the clone will have the same offsets. You must
    -    /// be sure the returned value to the user doesn't allow
    +    /// be sure the returned value to the user doesn't allow
         /// two views into the same range.
         #[inline]
         unsafe fn shallow_clone(&mut self) -> BytesMut {
    @@ -2878,7 +2879,7 @@
         fn advance(&mut self, cnt: usize) {
             assert!(
                 cnt <= self.remaining(),
    -            "cannot advance past `remaining`: {:?} <= {:?}",
    +            "cannot advance past `remaining`: {:?} <= {:?}",
                 cnt,
                 self.remaining(),
             );
    @@ -2903,7 +2904,7 @@
             let new_len = self.len() + cnt;
             assert!(
                 new_len <= self.cap,
    -            "new_len = {}; capacity = {}",
    +            "new_len = {}; capacity = {}",
                 new_len,
                 self.cap
             );
    @@ -2981,14 +2982,14 @@
         }
     }
     
    -impl<'a> From<&'a [u8]> for BytesMut {
    -    fn from(src: &'a [u8]) -> BytesMut {
    +impl<'a> From<&'a [u8]> for BytesMut {
    +    fn from(src: &'a [u8]) -> BytesMut {
             BytesMut::from_vec(src.to_vec())
         }
     }
     
    -impl<'a> From<&'a str> for BytesMut {
    -    fn from(src: &'a str) -> BytesMut {
    +impl<'a> From<&'a str> for BytesMut {
    +    fn from(src: &'a str) -> BytesMut {
             BytesMut::from(src.as_bytes())
         }
     }
    @@ -3060,7 +3061,7 @@
         }
     
         #[inline]
    -    fn write_fmt(&mut self, args: fmt::Arguments<'_>) -> fmt::Result {
    +    fn write_fmt(&mut self, args: fmt::Arguments<'_>) -> fmt::Result {
             fmt::write(self, args)
         }
     }
    @@ -3080,9 +3081,9 @@
         }
     }
     
    -impl<'a> IntoIterator for &'a BytesMut {
    -    type Item = &'a u8;
    -    type IntoIter = core::slice::Iter<'a, u8>;
    +impl<'a> IntoIterator for &'a BytesMut {
    +    type Item = &'a u8;
    +    type IntoIter = core::slice::Iter<'a, u8>;
     
         fn into_iter(self) -> Self::IntoIter {
             self.as_ref().iter()
    @@ -3109,10 +3110,10 @@
         }
     }
     
    -impl<'a> Extend<&'a u8> for BytesMut {
    +impl<'a> Extend<&'a u8> for BytesMut {
         fn extend<T>(&mut self, iter: T)
         where
    -        T: IntoIterator<Item = &'a u8>,
    +        T: IntoIterator<Item = &'a u8>,
         {
             self.extend(iter.into_iter().copied())
         }
    @@ -3135,8 +3136,8 @@
         }
     }
     
    -impl<'a> FromIterator<&'a u8> for BytesMut {
    -    fn from_iter<T: IntoIterator<Item = &'a u8>>(into_iter: T) -> Self {
    +impl<'a> FromIterator<&'a u8> for BytesMut {
    +    fn from_iter<T: IntoIterator<Item = &'a u8>>(into_iter: T) -> Self {
             BytesMut::from_iter(into_iter.into_iter().copied())
         }
     }
    @@ -3172,10 +3173,10 @@
         //
         // > It is important to enforce any possible access to the object in one
         // > thread (through an existing reference) to *happen before* deleting
    -    // > the object in a different thread. This is achieved by a "release"
    +    // > the object in a different thread. This is achieved by a "release"
         // > operation after dropping a reference (any access to the object
         // > through this reference must obviously happened before), and an
    -    // > "acquire" operation before deleting the object.
    +    // > "acquire" operation before deleting the object.
         //
         // [1]: (www.boost.org/doc/libs/1_55_0/doc/html/atomic/usage_examples.html)
         //
    @@ -3376,20 +3377,20 @@
         }
     }
     
    -impl<'a, T: ?Sized> PartialEq<&'a T> for BytesMut
    +impl<'a, T: ?Sized> PartialEq<&'a T> for BytesMut
     where
         BytesMut: PartialEq<T>,
     {
    -    fn eq(&self, other: &&'a T) -> bool {
    +    fn eq(&self, other: &&'a T) -> bool {
             *self == **other
         }
     }
     
    -impl<'a, T: ?Sized> PartialOrd<&'a T> for BytesMut
    +impl<'a, T: ?Sized> PartialOrd<&'a T> for BytesMut
     where
         BytesMut: PartialOrd<T>,
     {
    -    fn partial_cmp(&self, other: &&'a T) -> Option<cmp::Ordering> {
    +    fn partial_cmp(&self, other: &&'a T) -> Option<cmp::Ordering> {
             self.partial_cmp(*other)
         }
     }
    @@ -3471,7 +3472,7 @@
     #[inline]
     fn vptr(ptr: *mut u8) -> NonNull<u8> {
         if cfg!(debug_assertions) {
    -        NonNull::new(ptr).expect("Vec pointer should be non-null")
    +        NonNull::new(ptr).expect("Vec pointer should be non-null")
         } else {
             unsafe { NonNull::new_unchecked(ptr) }
         }
    @@ -3564,7 +3565,7 @@
     /// use bytes::BytesMut;
     /// #[deny(unused_must_use)]
     /// {
    -///     let mut b1 = BytesMut::from("hello world");
    +///     let mut b1 = BytesMut::from("hello world");
     ///     b1.split_to(6);
     /// }
     /// ```
    @@ -3574,7 +3575,7 @@
     /// use bytes::BytesMut;
     /// #[deny(unused_must_use)]
     /// {
    -///     let mut b1 = BytesMut::from("hello world");
    +///     let mut b1 = BytesMut::from("hello world");
     ///     b1.split_off(6);
     /// }
     /// ```
    @@ -3584,7 +3585,7 @@
     /// use bytes::BytesMut;
     /// #[deny(unused_must_use)]
     /// {
    -///     let mut b1 = BytesMut::from("hello world");
    +///     let mut b1 = BytesMut::from("hello world");
     ///     b1.split();
     /// }
     /// ```
    @@ -3602,7 +3603,7 @@
         #[test]
         fn bytes_mut_cloning_frozen() {
             loom::model(|| {
    -            let a = BytesMut::from(&b"abcdefgh"[..]).split().freeze();
    +            let a = BytesMut::from(&b"abcdefgh"[..]).split().freeze();
                 let addr = a.as_ptr() as usize;
     
                 // test the Bytes::clone is Sync by putting it in an Arc
    diff --git a/src/bytes/fmt/debug.rs.html b/src/bytes/fmt/debug.rs.html
    index 18e4cf736..67c1e68c7 100644
    --- a/src/bytes/fmt/debug.rs.html
    +++ b/src/bytes/fmt/debug.rs.html
    @@ -1,4 +1,5 @@
    -debug.rs - source
    1
    +debug.rs - source
    +    
    1
     2
     3
     4
    @@ -58,41 +59,41 @@
     /// list of numbers. Since large amount of byte strings are in fact
     /// ASCII strings or contain a lot of ASCII strings (e. g. HTTP),
     /// it is convenient to print strings as ASCII when possible.
    -impl Debug for BytesRef<'_> {
    -    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
    -        write!(f, "b\"")?;
    +impl Debug for BytesRef<'_> {
    +    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
    +        write!(f, "b\"")?;
             for &b in self.0 {
                 // https://doc.rust-lang.org/reference/tokens.html#byte-escapes
    -            if b == b'\n' {
    -                write!(f, "\\n")?;
    -            } else if b == b'\r' {
    -                write!(f, "\\r")?;
    -            } else if b == b'\t' {
    -                write!(f, "\\t")?;
    -            } else if b == b'\\' || b == b'"' {
    -                write!(f, "\\{}", b as char)?;
    -            } else if b == b'\0' {
    -                write!(f, "\\0")?;
    +            if b == b'\n' {
    +                write!(f, "\\n")?;
    +            } else if b == b'\r' {
    +                write!(f, "\\r")?;
    +            } else if b == b'\t' {
    +                write!(f, "\\t")?;
    +            } else if b == b'\\' || b == b'"' {
    +                write!(f, "\\{}", b as char)?;
    +            } else if b == b'\0' {
    +                write!(f, "\\0")?;
                 // ASCII printable
                 } else if (0x20..0x7f).contains(&b) {
    -                write!(f, "{}", b as char)?;
    +                write!(f, "{}", b as char)?;
                 } else {
    -                write!(f, "\\x{:02x}", b)?;
    +                write!(f, "\\x{:02x}", b)?;
                 }
             }
    -        write!(f, "\"")?;
    +        write!(f, "\"")?;
             Ok(())
         }
     }
     
     impl Debug for Bytes {
    -    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
    +    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
             Debug::fmt(&BytesRef(self.as_ref()), f)
         }
     }
     
     impl Debug for BytesMut {
    -    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
    +    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
             Debug::fmt(&BytesRef(self.as_ref()), f)
         }
     }
    diff --git a/src/bytes/fmt/hex.rs.html b/src/bytes/fmt/hex.rs.html
    index d979a0a15..261d887be 100644
    --- a/src/bytes/fmt/hex.rs.html
    +++ b/src/bytes/fmt/hex.rs.html
    @@ -1,4 +1,5 @@
    -hex.rs - source
    1
    +hex.rs - source
    +    
    1
     2
     3
     4
    @@ -40,19 +41,19 @@
     use super::BytesRef;
     use crate::{Bytes, BytesMut};
     
    -impl LowerHex for BytesRef<'_> {
    -    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
    +impl LowerHex for BytesRef<'_> {
    +    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
             for &b in self.0 {
    -            write!(f, "{:02x}", b)?;
    +            write!(f, "{:02x}", b)?;
             }
             Ok(())
         }
     }
     
    -impl UpperHex for BytesRef<'_> {
    -    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
    +impl UpperHex for BytesRef<'_> {
    +    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
             for &b in self.0 {
    -            write!(f, "{:02X}", b)?;
    +            write!(f, "{:02X}", b)?;
             }
             Ok(())
         }
    @@ -61,7 +62,7 @@
     macro_rules! hex_impl {
         ($tr:ident, $ty:ty) => {
             impl $tr for $ty {
    -            fn fmt(&self, f: &mut Formatter<'_>) -> Result {
    +            fn fmt(&self, f: &mut Formatter<'_>) -> Result {
                     $tr::fmt(&BytesRef(self.as_ref()), f)
                 }
             }
    diff --git a/src/bytes/fmt/mod.rs.html b/src/bytes/fmt/mod.rs.html
    index 259135de6..adf18f39b 100644
    --- a/src/bytes/fmt/mod.rs.html
    +++ b/src/bytes/fmt/mod.rs.html
    @@ -1,4 +1,5 @@
    -mod.rs - source
    1
    +mod.rs - source
    +    
    1
     2
     3
     4
    @@ -7,5 +8,5 @@
     mod hex;
     
     /// `BytesRef` is not a part of public API of bytes crate.
    -struct BytesRef<'a>(&'a [u8]);
    +struct BytesRef<'a>(&'a [u8]);
     
    \ No newline at end of file diff --git a/src/bytes/lib.rs.html b/src/bytes/lib.rs.html index bb9a562b0..126314db2 100644 --- a/src/bytes/lib.rs.html +++ b/src/bytes/lib.rs.html @@ -1,4 +1,5 @@ -lib.rs - source
    1
    +lib.rs - source
    +    
    1
     2
     3
     4
    @@ -151,16 +152,16 @@
     //! use bytes::{BytesMut, BufMut};
     //!
     //! let mut buf = BytesMut::with_capacity(1024);
    -//! buf.put(&b"hello world"[..]);
    +//! buf.put(&b"hello world"[..]);
     //! buf.put_u16(1234);
     //!
     //! let a = buf.split();
    -//! assert_eq!(a, b"hello world\x04\xD2"[..]);
    +//! assert_eq!(a, b"hello world\x04\xD2"[..]);
     //!
    -//! buf.put(&b"goodbye world"[..]);
    +//! buf.put(&b"goodbye world"[..]);
     //!
     //! let b = buf.split();
    -//! assert_eq!(b, b"goodbye world"[..]);
    +//! assert_eq!(b, b"goodbye world"[..]);
     //!
     //! assert_eq!(buf.capacity(), 998);
     //! ```
    @@ -195,7 +196,7 @@
     
     extern crate alloc;
     
    -#[cfg(feature = "std")]
    +#[cfg(feature = "std")]
     extern crate std;
     
     pub mod buf;
    @@ -209,18 +210,18 @@
     pub use crate::bytes_mut::BytesMut;
     
     // Optional Serde support
    -#[cfg(feature = "serde")]
    +#[cfg(feature = "serde")]
     mod serde;
     
     #[inline(never)]
     #[cold]
     fn abort() -> ! {
    -    #[cfg(feature = "std")]
    +    #[cfg(feature = "std")]
         {
             std::process::abort();
         }
     
    -    #[cfg(not(feature = "std"))]
    +    #[cfg(not(feature = "std"))]
         {
             struct Abort;
             impl Drop for Abort {
    @@ -229,7 +230,7 @@
                 }
             }
             let _a = Abort;
    -        panic!("abort");
    +        panic!("abort");
         }
     }
     
    \ No newline at end of file diff --git a/src/bytes/loom.rs.html b/src/bytes/loom.rs.html index bab48af63..ef32e3f8e 100644 --- a/src/bytes/loom.rs.html +++ b/src/bytes/loom.rs.html @@ -1,4 +1,5 @@ -loom.rs - source
    1
    +loom.rs - source
    +    
    1
     2
     3
     4
    diff --git a/src/ping_rs/decoder.rs.html b/src/ping_rs/decoder.rs.html
    index 651d62aea..659ee5236 100644
    --- a/src/ping_rs/decoder.rs.html
    +++ b/src/ping_rs/decoder.rs.html
    @@ -1,4 +1,5 @@
    -decoder.rs - source
    1
    +decoder.rs - source
    +    
    1
     2
     3
     4
    diff --git a/src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-d6dfbce8a49b4140/out/bluebps.rs.html b/src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-b755b5855bdec7a7/out/bluebps.rs.html
    similarity index 79%
    rename from src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-d6dfbce8a49b4140/out/bluebps.rs.html
    rename to src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-b755b5855bdec7a7/out/bluebps.rs.html
    index 15969315b..d8af60409 100644
    --- a/src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-d6dfbce8a49b4140/out/bluebps.rs.html
    +++ b/src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-b755b5855bdec7a7/out/bluebps.rs.html
    @@ -1,4 +1,5 @@
    -bluebps.rs - source
    1
    +bluebps.rs - source
    +    
    1
     2
     3
     4
    @@ -710,119 +711,119 @@
     use crate::message::DeserializePayload;
     use crate::message::PingMessage;
     use crate::message::SerializePayload;
    -#[cfg(feature = "serde")]
    +#[cfg(feature = "serde")]
     use serde::{Deserialize, Serialize};
     use std::convert::TryInto;
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
     pub struct PingProtocolHead {
         pub source_device_id: u8,
         pub destiny_device_id: u8,
     }
     #[derive(Debug, Clone, PartialEq)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
     pub enum Messages {
    -    CellVoltageMin(CellVoltageMinStruct),
         SetTemperatureMax(SetTemperatureMaxStruct),
    -    TemperatureTimeout(TemperatureTimeoutStruct),
    -    Reboot(RebootStruct),
    -    ResetDefaults(ResetDefaultsStruct),
         SetCellVoltageTimeout(SetCellVoltageTimeoutStruct),
    -    State(StateStruct),
    -    CurrentTimeout(CurrentTimeoutStruct),
    -    SetLpfSetting(SetLpfSettingStruct),
    +    CellTimeout(CellTimeoutStruct),
    +    Reboot(RebootStruct),
    +    TemperatureMax(TemperatureMaxStruct),
    +    SetTemperatureTimeout(SetTemperatureTimeoutStruct),
    +    SetCurrentTimeout(SetCurrentTimeoutStruct),
    +    EraseFlash(EraseFlashStruct),
    +    SetCurrentMax(SetCurrentMaxStruct),
    +    TemperatureTimeout(TemperatureTimeoutStruct),
         SetStreamRate(SetStreamRateStruct),
         SetCellVoltageMinimum(SetCellVoltageMinimumStruct),
    +    SetLpfSetting(SetLpfSettingStruct),
    +    CellVoltageMin(CellVoltageMinStruct),
    +    State(StateStruct),
    +    CurrentTimeout(CurrentTimeoutStruct),
    +    ResetDefaults(ResetDefaultsStruct),
         SetLpfSampleFrequency(SetLpfSampleFrequencyStruct),
    -    SetCurrentTimeout(SetCurrentTimeoutStruct),
    -    CellTimeout(CellTimeoutStruct),
    -    EraseFlash(EraseFlashStruct),
    -    SetTemperatureTimeout(SetTemperatureTimeoutStruct),
    -    CurrentMax(CurrentMaxStruct),
    -    TemperatureMax(TemperatureMaxStruct),
         Events(EventsStruct),
    -    SetCurrentMax(SetCurrentMaxStruct),
    +    CurrentMax(CurrentMaxStruct),
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Get the minimum allowed cell voltage"]
    -pub struct CellVoltageMinStruct {
    -    #[doc = "The minimum voltage allowed for any individual cell. 0~5000: 0~5V"]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Set the maximum allowed battery temperature"]
    +pub struct SetTemperatureMaxStruct {
    +    #[doc = "The maximum temperature allowed at the thermistor probe installed on the battery. 0~5000: 0~5V"]
         pub limit: u16,
     }
    -impl SerializePayload for CellVoltageMinStruct {
    +impl SerializePayload for SetTemperatureMaxStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
             buffer.extend_from_slice(&self.limit.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for CellVoltageMinStruct {
    +impl DeserializePayload for SetTemperatureMaxStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
                 limit: u16::from_le_bytes(
                     payload[0usize..0usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Set the maximum allowed battery temperature"]
    -pub struct SetTemperatureMaxStruct {
    -    #[doc = "The maximum temperature allowed at the thermistor probe installed on the battery. 0~5000: 0~5V"]
    -    pub limit: u16,
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Set the under-voltage timeout"]
    +pub struct SetCellVoltageTimeoutStruct {
    +    #[doc = "If an individual cell exceeds the configured limit for this duration of time, the power will be locked-out"]
    +    pub timeout: u16,
     }
    -impl SerializePayload for SetTemperatureMaxStruct {
    +impl SerializePayload for SetCellVoltageTimeoutStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.limit.to_le_bytes());
    +        buffer.extend_from_slice(&self.timeout.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for SetTemperatureMaxStruct {
    +impl DeserializePayload for SetCellVoltageTimeoutStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            limit: u16::from_le_bytes(
    +            timeout: u16::from_le_bytes(
                     payload[0usize..0usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Get the over-temperature timeout"]
    -pub struct TemperatureTimeoutStruct {
    -    #[doc = "If the battery temperature exceeds the configured limit for this duration of time, the power will be locked-out"]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Get the undervoltage timeout"]
    +pub struct CellTimeoutStruct {
    +    #[doc = "If an individual cell exceeds the configured limit for this duration of time, the power will be locked-out"]
         pub timeout: u16,
     }
    -impl SerializePayload for TemperatureTimeoutStruct {
    +impl SerializePayload for CellTimeoutStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
             buffer.extend_from_slice(&self.timeout.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for TemperatureTimeoutStruct {
    +impl DeserializePayload for CellTimeoutStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
                 timeout: u16::from_le_bytes(
                     payload[0usize..0usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "reboot the system"]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "reboot the system"]
     pub struct RebootStruct {
    -    #[doc = "0 = normal reboot, run main application after reboot 1 = hold the device in bootloader after reboot"]
    +    #[doc = "0 = normal reboot, run main application after reboot 1 = hold the device in bootloader after reboot"]
         pub goto_bootloader: u8,
     }
     impl SerializePayload for RebootStruct {
    @@ -840,166 +841,150 @@
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Reset parameter configuration to default values."]
    -pub struct ResetDefaultsStruct {}
    -impl SerializePayload for ResetDefaultsStruct {
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Get the maximum allowed battery temperature"]
    +pub struct TemperatureMaxStruct {
    +    #[doc = "The minimum voltage allowed for any individual cell. 0~5000: 0~5V"]
    +    pub limit: u16,
    +}
    +impl SerializePayload for TemperatureMaxStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    +        buffer.extend_from_slice(&self.limit.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for ResetDefaultsStruct {
    +impl DeserializePayload for TemperatureMaxStruct {
         fn deserialize(payload: &[u8]) -> Self {
    -        Self {}
    +        Self {
    +            limit: u16::from_le_bytes(
    +                payload[0usize..0usize + 2usize]
    +                    .try_into()
    +                    .expect("Wrong slice length"),
    +            ),
    +        }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Set the under-voltage timeout"]
    -pub struct SetCellVoltageTimeoutStruct {
    -    #[doc = "If an individual cell exceeds the configured limit for this duration of time, the power will be locked-out"]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Set the over-temperature timeout"]
    +pub struct SetTemperatureTimeoutStruct {
    +    #[doc = "If the battery temperature exceeds the configured limit for this duration of time, the power will be locked-out"]
         pub timeout: u16,
     }
    -impl SerializePayload for SetCellVoltageTimeoutStruct {
    +impl SerializePayload for SetTemperatureTimeoutStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
             buffer.extend_from_slice(&self.timeout.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for SetCellVoltageTimeoutStruct {
    +impl DeserializePayload for SetTemperatureTimeoutStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
                 timeout: u16::from_le_bytes(
                     payload[0usize..0usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Get the current state of the device"]
    -pub struct StateStruct {
    -    #[doc = "The main battery voltage"]
    -    pub battery_voltage: u16,
    -    #[doc = "The current measurement"]
    -    pub battery_current: u16,
    -    #[doc = "The battery temperature"]
    -    pub battery_temperature: u16,
    -    #[doc = "The cpu temperature"]
    -    pub cpu_temperature: u16,
    -    #[doc = "flags indicating if any of the configured limits are currently exceeded"]
    -    pub flags: u8,
    -    #[doc = "Array containing cell voltages"]
    -    pub cell_voltages_length: u8,
    -    pub cell_voltages: Vec<u16>,
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Set the over-current timeout"]
    +pub struct SetCurrentTimeoutStruct {
    +    #[doc = "If the battery current exceeds the configured limit for this duration of time, the power will be locked-out"]
    +    pub timeout: u16,
     }
    -impl SerializePayload for StateStruct {
    +impl SerializePayload for SetCurrentTimeoutStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.battery_voltage.to_le_bytes());
    -        buffer.extend_from_slice(&self.battery_current.to_le_bytes());
    -        buffer.extend_from_slice(&self.battery_temperature.to_le_bytes());
    -        buffer.extend_from_slice(&self.cpu_temperature.to_le_bytes());
    -        buffer.extend_from_slice(&self.flags.to_le_bytes());
    -        buffer.extend_from_slice(&self.cell_voltages_length.to_le_bytes());
    -        for value in self.cell_voltages.iter() {
    -            buffer.extend_from_slice(&value.to_le_bytes());
    -        }
    +        buffer.extend_from_slice(&self.timeout.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for StateStruct {
    +impl DeserializePayload for SetCurrentTimeoutStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            battery_voltage: u16::from_le_bytes(
    +            timeout: u16::from_le_bytes(
                     payload[0usize..0usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    -            ),
    -            battery_current: u16::from_le_bytes(
    -                payload[2usize..2usize + 2usize]
    -                    .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
    -            battery_temperature: u16::from_le_bytes(
    -                payload[4usize..4usize + 2usize]
    -                    .try_into()
    -                    .expect("Wrong slice length"),
    -            ),
    -            cpu_temperature: u16::from_le_bytes(
    -                payload[6usize..6usize + 2usize]
    -                    .try_into()
    -                    .expect("Wrong slice length"),
    -            ),
    -            flags: payload[8usize].into(),
    -            cell_voltages_length: payload.len() as u8,
    -            cell_voltages: payload[9usize..9usize + payload.len()]
    -                .chunks_exact(2usize)
    -                .into_iter()
    -                .map(|a| u16::from_le_bytes((*a).try_into().expect("Wrong slice length")))
    -                .collect::<Vec<u16>>(),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Get the over-current timeout"]
    -pub struct CurrentTimeoutStruct {
    -    #[doc = "If the battery current exceeds the configured limit for this duration of time, the power will be locked-out"]
    -    pub timeout: u16,
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Erase flash, including parameter configuration and event counters. The mcu has a limited number of write/erase cycles (1k)!"]
    +pub struct EraseFlashStruct {}
    +impl SerializePayload for EraseFlashStruct {
    +    fn serialize(&self) -> Vec<u8> {
    +        let mut buffer: Vec<u8> = Default::default();
    +        buffer
    +    }
     }
    -impl SerializePayload for CurrentTimeoutStruct {
    +impl DeserializePayload for EraseFlashStruct {
    +    fn deserialize(payload: &[u8]) -> Self {
    +        Self {}
    +    }
    +}
    +#[derive(Debug, Clone, PartialEq, Default)]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Set the maximum allowed battery current"]
    +pub struct SetCurrentMaxStruct {
    +    #[doc = "The maximum allowed battery current 0~20000 = 0~200A"]
    +    pub limit: u16,
    +}
    +impl SerializePayload for SetCurrentMaxStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.timeout.to_le_bytes());
    +        buffer.extend_from_slice(&self.limit.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for CurrentTimeoutStruct {
    +impl DeserializePayload for SetCurrentMaxStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            timeout: u16::from_le_bytes(
    +            limit: u16::from_le_bytes(
                     payload[0usize..0usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Low pass filter setting. This value represents x in the equation `value = value * x + sample * (1-x)`. 0.0 = no filtering, 0.99 = heavy filtering."]
    -pub struct SetLpfSettingStruct {
    -    #[doc = "0~999: x = 0~0.999"]
    -    pub setting: u16,
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Get the over-temperature timeout"]
    +pub struct TemperatureTimeoutStruct {
    +    #[doc = "If the battery temperature exceeds the configured limit for this duration of time, the power will be locked-out"]
    +    pub timeout: u16,
     }
    -impl SerializePayload for SetLpfSettingStruct {
    +impl SerializePayload for TemperatureTimeoutStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.setting.to_le_bytes());
    +        buffer.extend_from_slice(&self.timeout.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for SetLpfSettingStruct {
    +impl DeserializePayload for TemperatureTimeoutStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            setting: u16::from_le_bytes(
    +            timeout: u16::from_le_bytes(
                     payload[0usize..0usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Set the frequency to automatically output state messages."]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Set the frequency to automatically output state messages."]
     pub struct SetStreamRateStruct {
    -    #[doc = "Rate to stream `state` messages. 0~100000Hz"]
    +    #[doc = "Rate to stream `state` messages. 0~100000Hz"]
         pub rate: u32,
     }
     impl SerializePayload for SetStreamRateStruct {
    @@ -1015,16 +1000,16 @@
                 rate: u32::from_le_bytes(
                     payload[0usize..0usize + 4usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Set the minimum allowed cell voltage"]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Set the minimum allowed cell voltage"]
     pub struct SetCellVoltageMinimumStruct {
    -    #[doc = "The minimum voltage allowed for any individual cell. 0~5000: 0~5V"]
    +    #[doc = "The minimum voltage allowed for any individual cell. 0~5000: 0~5V"]
         pub limit: u16,
     }
     impl SerializePayload for SetCellVoltageMinimumStruct {
    @@ -1040,185 +1025,201 @@
                 limit: u16::from_le_bytes(
                     payload[0usize..0usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "the frequency to take adc samples and run the filter."]
    -pub struct SetLpfSampleFrequencyStruct {
    -    #[doc = "sample frequency in Hz. 1~100000"]
    -    pub sample_frequency: u32,
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Low pass filter setting. This value represents x in the equation `value = value * x + sample * (1-x)`. 0.0 = no filtering, 0.99 = heavy filtering."]
    +pub struct SetLpfSettingStruct {
    +    #[doc = "0~999: x = 0~0.999"]
    +    pub setting: u16,
     }
    -impl SerializePayload for SetLpfSampleFrequencyStruct {
    +impl SerializePayload for SetLpfSettingStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.sample_frequency.to_le_bytes());
    +        buffer.extend_from_slice(&self.setting.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for SetLpfSampleFrequencyStruct {
    +impl DeserializePayload for SetLpfSettingStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            sample_frequency: u32::from_le_bytes(
    -                payload[0usize..0usize + 4usize]
    +            setting: u16::from_le_bytes(
    +                payload[0usize..0usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Set the over-current timeout"]
    -pub struct SetCurrentTimeoutStruct {
    -    #[doc = "If the battery current exceeds the configured limit for this duration of time, the power will be locked-out"]
    -    pub timeout: u16,
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Get the minimum allowed cell voltage"]
    +pub struct CellVoltageMinStruct {
    +    #[doc = "The minimum voltage allowed for any individual cell. 0~5000: 0~5V"]
    +    pub limit: u16,
     }
    -impl SerializePayload for SetCurrentTimeoutStruct {
    +impl SerializePayload for CellVoltageMinStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.timeout.to_le_bytes());
    +        buffer.extend_from_slice(&self.limit.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for SetCurrentTimeoutStruct {
    +impl DeserializePayload for CellVoltageMinStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            timeout: u16::from_le_bytes(
    +            limit: u16::from_le_bytes(
                     payload[0usize..0usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Get the undervoltage timeout"]
    -pub struct CellTimeoutStruct {
    -    #[doc = "If an individual cell exceeds the configured limit for this duration of time, the power will be locked-out"]
    -    pub timeout: u16,
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Get the current state of the device"]
    +pub struct StateStruct {
    +    #[doc = "The main battery voltage"]
    +    pub battery_voltage: u16,
    +    #[doc = "The current measurement"]
    +    pub battery_current: u16,
    +    #[doc = "The battery temperature"]
    +    pub battery_temperature: u16,
    +    #[doc = "The cpu temperature"]
    +    pub cpu_temperature: u16,
    +    #[doc = "flags indicating if any of the configured limits are currently exceeded"]
    +    pub flags: u8,
    +    #[doc = "Array containing cell voltages"]
    +    pub cell_voltages_length: u8,
    +    pub cell_voltages: Vec<u16>,
     }
    -impl SerializePayload for CellTimeoutStruct {
    +impl SerializePayload for StateStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.timeout.to_le_bytes());
    +        buffer.extend_from_slice(&self.battery_voltage.to_le_bytes());
    +        buffer.extend_from_slice(&self.battery_current.to_le_bytes());
    +        buffer.extend_from_slice(&self.battery_temperature.to_le_bytes());
    +        buffer.extend_from_slice(&self.cpu_temperature.to_le_bytes());
    +        buffer.extend_from_slice(&self.flags.to_le_bytes());
    +        buffer.extend_from_slice(&self.cell_voltages_length.to_le_bytes());
    +        for value in self.cell_voltages.iter() {
    +            buffer.extend_from_slice(&value.to_le_bytes());
    +        }
             buffer
         }
     }
    -impl DeserializePayload for CellTimeoutStruct {
    +impl DeserializePayload for StateStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            timeout: u16::from_le_bytes(
    +            battery_voltage: u16::from_le_bytes(
                     payload[0usize..0usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
    +            battery_current: u16::from_le_bytes(
    +                payload[2usize..2usize + 2usize]
    +                    .try_into()
    +                    .expect("Wrong slice length"),
    +            ),
    +            battery_temperature: u16::from_le_bytes(
    +                payload[4usize..4usize + 2usize]
    +                    .try_into()
    +                    .expect("Wrong slice length"),
    +            ),
    +            cpu_temperature: u16::from_le_bytes(
    +                payload[6usize..6usize + 2usize]
    +                    .try_into()
    +                    .expect("Wrong slice length"),
    +            ),
    +            flags: payload[8usize].into(),
    +            cell_voltages_length: payload.len() as u8,
    +            cell_voltages: payload[9usize..9usize + payload.len()]
    +                .chunks_exact(2usize)
    +                .into_iter()
    +                .map(|a| u16::from_le_bytes((*a).try_into().expect("Wrong slice length")))
    +                .collect::<Vec<u16>>(),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Erase flash, including parameter configuration and event counters. The mcu has a limited number of write/erase cycles (1k)!"]
    -pub struct EraseFlashStruct {}
    -impl SerializePayload for EraseFlashStruct {
    -    fn serialize(&self) -> Vec<u8> {
    -        let mut buffer: Vec<u8> = Default::default();
    -        buffer
    -    }
    -}
    -impl DeserializePayload for EraseFlashStruct {
    -    fn deserialize(payload: &[u8]) -> Self {
    -        Self {}
    -    }
    -}
    -#[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Set the over-temperature timeout"]
    -pub struct SetTemperatureTimeoutStruct {
    -    #[doc = "If the battery temperature exceeds the configured limit for this duration of time, the power will be locked-out"]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Get the over-current timeout"]
    +pub struct CurrentTimeoutStruct {
    +    #[doc = "If the battery current exceeds the configured limit for this duration of time, the power will be locked-out"]
         pub timeout: u16,
     }
    -impl SerializePayload for SetTemperatureTimeoutStruct {
    +impl SerializePayload for CurrentTimeoutStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
             buffer.extend_from_slice(&self.timeout.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for SetTemperatureTimeoutStruct {
    +impl DeserializePayload for CurrentTimeoutStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
                 timeout: u16::from_le_bytes(
                     payload[0usize..0usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "get the maximum allowed battery current"]
    -pub struct CurrentMaxStruct {
    -    #[doc = "The maximum allowed battery current 0~20000 = 0~200A"]
    -    pub limit: u16,
    -}
    -impl SerializePayload for CurrentMaxStruct {
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Reset parameter configuration to default values."]
    +pub struct ResetDefaultsStruct {}
    +impl SerializePayload for ResetDefaultsStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.limit.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for CurrentMaxStruct {
    +impl DeserializePayload for ResetDefaultsStruct {
         fn deserialize(payload: &[u8]) -> Self {
    -        Self {
    -            limit: u16::from_le_bytes(
    -                payload[0usize..0usize + 2usize]
    -                    .try_into()
    -                    .expect("Wrong slice length"),
    -            ),
    -        }
    +        Self {}
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Get the maximum allowed battery temperature"]
    -pub struct TemperatureMaxStruct {
    -    #[doc = "The minimum voltage allowed for any individual cell. 0~5000: 0~5V"]
    -    pub limit: u16,
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "the frequency to take adc samples and run the filter."]
    +pub struct SetLpfSampleFrequencyStruct {
    +    #[doc = "sample frequency in Hz. 1~100000"]
    +    pub sample_frequency: u32,
     }
    -impl SerializePayload for TemperatureMaxStruct {
    +impl SerializePayload for SetLpfSampleFrequencyStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.limit.to_le_bytes());
    +        buffer.extend_from_slice(&self.sample_frequency.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for TemperatureMaxStruct {
    +impl DeserializePayload for SetLpfSampleFrequencyStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            limit: u16::from_le_bytes(
    -                payload[0usize..0usize + 2usize]
    +            sample_frequency: u32::from_le_bytes(
    +                payload[0usize..0usize + 4usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "A record of events causing a power lock-out. These numbers are non-volatile and reset only with the erase_flash control message."]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "A record of events causing a power lock-out. These numbers are non-volatile and reset only with the erase_flash control message."]
     pub struct EventsStruct {
    -    #[doc = "The number of under-voltage events"]
    +    #[doc = "The number of under-voltage events"]
         pub voltage: u16,
    -    #[doc = "The number of over-current events"]
    +    #[doc = "The number of over-current events"]
         pub current: u16,
    -    #[doc = "The number of over-temperature events"]
    +    #[doc = "The number of over-temperature events"]
         pub temperature: u16,
     }
     impl SerializePayload for EventsStruct {
    @@ -1236,180 +1237,180 @@
                 voltage: u16::from_le_bytes(
                     payload[0usize..0usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
                 current: u16::from_le_bytes(
                     payload[2usize..2usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
                 temperature: u16::from_le_bytes(
                     payload[4usize..4usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Set the maximum allowed battery current"]
    -pub struct SetCurrentMaxStruct {
    -    #[doc = "The maximum allowed battery current 0~20000 = 0~200A"]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "get the maximum allowed battery current"]
    +pub struct CurrentMaxStruct {
    +    #[doc = "The maximum allowed battery current 0~20000 = 0~200A"]
         pub limit: u16,
     }
    -impl SerializePayload for SetCurrentMaxStruct {
    +impl SerializePayload for CurrentMaxStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
             buffer.extend_from_slice(&self.limit.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for SetCurrentMaxStruct {
    +impl DeserializePayload for CurrentMaxStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
                 limit: u16::from_le_bytes(
                     payload[0usize..0usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
             }
         }
     }
     impl PingMessage for Messages {
    -    fn message_name(&self) -> &'static str {
    +    fn message_name(&self) -> &'static str {
             match self {
    -            Messages::CellVoltageMin(..) => "cell_voltage_min",
    -            Messages::SetTemperatureMax(..) => "set_temperature_max",
    -            Messages::TemperatureTimeout(..) => "temperature_timeout",
    -            Messages::Reboot(..) => "reboot",
    -            Messages::ResetDefaults(..) => "reset_defaults",
    -            Messages::SetCellVoltageTimeout(..) => "set_cell_voltage_timeout",
    -            Messages::State(..) => "state",
    -            Messages::CurrentTimeout(..) => "current_timeout",
    -            Messages::SetLpfSetting(..) => "set_lpf_setting",
    -            Messages::SetStreamRate(..) => "set_stream_rate",
    -            Messages::SetCellVoltageMinimum(..) => "set_cell_voltage_minimum",
    -            Messages::SetLpfSampleFrequency(..) => "set_lpf_sample_frequency",
    -            Messages::SetCurrentTimeout(..) => "set_current_timeout",
    -            Messages::CellTimeout(..) => "cell_timeout",
    -            Messages::EraseFlash(..) => "erase_flash",
    -            Messages::SetTemperatureTimeout(..) => "set_temperature_timeout",
    -            Messages::CurrentMax(..) => "current_max",
    -            Messages::TemperatureMax(..) => "temperature_max",
    -            Messages::Events(..) => "events",
    -            Messages::SetCurrentMax(..) => "set_current_max",
    +            Messages::SetTemperatureMax(..) => "set_temperature_max",
    +            Messages::SetCellVoltageTimeout(..) => "set_cell_voltage_timeout",
    +            Messages::CellTimeout(..) => "cell_timeout",
    +            Messages::Reboot(..) => "reboot",
    +            Messages::TemperatureMax(..) => "temperature_max",
    +            Messages::SetTemperatureTimeout(..) => "set_temperature_timeout",
    +            Messages::SetCurrentTimeout(..) => "set_current_timeout",
    +            Messages::EraseFlash(..) => "erase_flash",
    +            Messages::SetCurrentMax(..) => "set_current_max",
    +            Messages::TemperatureTimeout(..) => "temperature_timeout",
    +            Messages::SetStreamRate(..) => "set_stream_rate",
    +            Messages::SetCellVoltageMinimum(..) => "set_cell_voltage_minimum",
    +            Messages::SetLpfSetting(..) => "set_lpf_setting",
    +            Messages::CellVoltageMin(..) => "cell_voltage_min",
    +            Messages::State(..) => "state",
    +            Messages::CurrentTimeout(..) => "current_timeout",
    +            Messages::ResetDefaults(..) => "reset_defaults",
    +            Messages::SetLpfSampleFrequency(..) => "set_lpf_sample_frequency",
    +            Messages::Events(..) => "events",
    +            Messages::CurrentMax(..) => "current_max",
             }
         }
         fn message_id(&self) -> u16 {
             match self {
    -            Messages::CellVoltageMin(..) => 9100u16,
                 Messages::SetTemperatureMax(..) => 9004u16,
    -            Messages::TemperatureTimeout(..) => 9105u16,
    -            Messages::Reboot(..) => 9200u16,
    -            Messages::ResetDefaults(..) => 9202u16,
                 Messages::SetCellVoltageTimeout(..) => 9001u16,
    -            Messages::State(..) => 9106u16,
    -            Messages::CurrentTimeout(..) => 9103u16,
    -            Messages::SetLpfSetting(..) => 9008u16,
    +            Messages::CellTimeout(..) => 9101u16,
    +            Messages::Reboot(..) => 9200u16,
    +            Messages::TemperatureMax(..) => 9104u16,
    +            Messages::SetTemperatureTimeout(..) => 9005u16,
    +            Messages::SetCurrentTimeout(..) => 9003u16,
    +            Messages::EraseFlash(..) => 9201u16,
    +            Messages::SetCurrentMax(..) => 9002u16,
    +            Messages::TemperatureTimeout(..) => 9105u16,
                 Messages::SetStreamRate(..) => 9006u16,
                 Messages::SetCellVoltageMinimum(..) => 9000u16,
    +            Messages::SetLpfSetting(..) => 9008u16,
    +            Messages::CellVoltageMin(..) => 9100u16,
    +            Messages::State(..) => 9106u16,
    +            Messages::CurrentTimeout(..) => 9103u16,
    +            Messages::ResetDefaults(..) => 9202u16,
                 Messages::SetLpfSampleFrequency(..) => 9007u16,
    -            Messages::SetCurrentTimeout(..) => 9003u16,
    -            Messages::CellTimeout(..) => 9101u16,
    -            Messages::EraseFlash(..) => 9201u16,
    -            Messages::SetTemperatureTimeout(..) => 9005u16,
    -            Messages::CurrentMax(..) => 9102u16,
    -            Messages::TemperatureMax(..) => 9104u16,
                 Messages::Events(..) => 9107u16,
    -            Messages::SetCurrentMax(..) => 9002u16,
    +            Messages::CurrentMax(..) => 9102u16,
             }
         }
         fn message_id_from_name(name: &str) -> Result<u16, String> {
             match name {
    -            "cell_voltage_min" => Ok(9100u16),
    -            "set_temperature_max" => Ok(9004u16),
    -            "temperature_timeout" => Ok(9105u16),
    -            "reboot" => Ok(9200u16),
    -            "reset_defaults" => Ok(9202u16),
    -            "set_cell_voltage_timeout" => Ok(9001u16),
    -            "state" => Ok(9106u16),
    -            "current_timeout" => Ok(9103u16),
    -            "set_lpf_setting" => Ok(9008u16),
    -            "set_stream_rate" => Ok(9006u16),
    -            "set_cell_voltage_minimum" => Ok(9000u16),
    -            "set_lpf_sample_frequency" => Ok(9007u16),
    -            "set_current_timeout" => Ok(9003u16),
    -            "cell_timeout" => Ok(9101u16),
    -            "erase_flash" => Ok(9201u16),
    -            "set_temperature_timeout" => Ok(9005u16),
    -            "current_max" => Ok(9102u16),
    -            "temperature_max" => Ok(9104u16),
    -            "events" => Ok(9107u16),
    -            "set_current_max" => Ok(9002u16),
    -            _ => Err(format!("Failed to find message ID from name: {name}.")),
    +            "set_temperature_max" => Ok(9004u16),
    +            "set_cell_voltage_timeout" => Ok(9001u16),
    +            "cell_timeout" => Ok(9101u16),
    +            "reboot" => Ok(9200u16),
    +            "temperature_max" => Ok(9104u16),
    +            "set_temperature_timeout" => Ok(9005u16),
    +            "set_current_timeout" => Ok(9003u16),
    +            "erase_flash" => Ok(9201u16),
    +            "set_current_max" => Ok(9002u16),
    +            "temperature_timeout" => Ok(9105u16),
    +            "set_stream_rate" => Ok(9006u16),
    +            "set_cell_voltage_minimum" => Ok(9000u16),
    +            "set_lpf_setting" => Ok(9008u16),
    +            "cell_voltage_min" => Ok(9100u16),
    +            "state" => Ok(9106u16),
    +            "current_timeout" => Ok(9103u16),
    +            "reset_defaults" => Ok(9202u16),
    +            "set_lpf_sample_frequency" => Ok(9007u16),
    +            "events" => Ok(9107u16),
    +            "current_max" => Ok(9102u16),
    +            _ => Err(format!("Failed to find message ID from name: {name}.")),
             }
         }
     }
     impl SerializePayload for Messages {
         fn serialize(&self) -> Vec<u8> {
             match self {
    -            Messages::CellVoltageMin(content) => content.serialize(),
                 Messages::SetTemperatureMax(content) => content.serialize(),
    -            Messages::TemperatureTimeout(content) => content.serialize(),
    -            Messages::Reboot(content) => content.serialize(),
    -            Messages::ResetDefaults(content) => content.serialize(),
                 Messages::SetCellVoltageTimeout(content) => content.serialize(),
    -            Messages::State(content) => content.serialize(),
    -            Messages::CurrentTimeout(content) => content.serialize(),
    -            Messages::SetLpfSetting(content) => content.serialize(),
    +            Messages::CellTimeout(content) => content.serialize(),
    +            Messages::Reboot(content) => content.serialize(),
    +            Messages::TemperatureMax(content) => content.serialize(),
    +            Messages::SetTemperatureTimeout(content) => content.serialize(),
    +            Messages::SetCurrentTimeout(content) => content.serialize(),
    +            Messages::EraseFlash(content) => content.serialize(),
    +            Messages::SetCurrentMax(content) => content.serialize(),
    +            Messages::TemperatureTimeout(content) => content.serialize(),
                 Messages::SetStreamRate(content) => content.serialize(),
                 Messages::SetCellVoltageMinimum(content) => content.serialize(),
    +            Messages::SetLpfSetting(content) => content.serialize(),
    +            Messages::CellVoltageMin(content) => content.serialize(),
    +            Messages::State(content) => content.serialize(),
    +            Messages::CurrentTimeout(content) => content.serialize(),
    +            Messages::ResetDefaults(content) => content.serialize(),
                 Messages::SetLpfSampleFrequency(content) => content.serialize(),
    -            Messages::SetCurrentTimeout(content) => content.serialize(),
    -            Messages::CellTimeout(content) => content.serialize(),
    -            Messages::EraseFlash(content) => content.serialize(),
    -            Messages::SetTemperatureTimeout(content) => content.serialize(),
    -            Messages::CurrentMax(content) => content.serialize(),
    -            Messages::TemperatureMax(content) => content.serialize(),
                 Messages::Events(content) => content.serialize(),
    -            Messages::SetCurrentMax(content) => content.serialize(),
    +            Messages::CurrentMax(content) => content.serialize(),
             }
         }
     }
     impl DeserializeGenericMessage for Messages {
    -    fn deserialize(message_id: u16, payload: &[u8]) -> Result<Self, &'static str> {
    +    fn deserialize(message_id: u16, payload: &[u8]) -> Result<Self, &'static str> {
             Ok(match message_id {
    -            9100u16 => Messages::CellVoltageMin(CellVoltageMinStruct::deserialize(payload)),
                 9004u16 => Messages::SetTemperatureMax(SetTemperatureMaxStruct::deserialize(payload)),
    -            9105u16 => Messages::TemperatureTimeout(TemperatureTimeoutStruct::deserialize(payload)),
    -            9200u16 => Messages::Reboot(RebootStruct::deserialize(payload)),
    -            9202u16 => Messages::ResetDefaults(ResetDefaultsStruct::deserialize(payload)),
                 9001u16 => {
                     Messages::SetCellVoltageTimeout(SetCellVoltageTimeoutStruct::deserialize(payload))
                 }
    -            9106u16 => Messages::State(StateStruct::deserialize(payload)),
    -            9103u16 => Messages::CurrentTimeout(CurrentTimeoutStruct::deserialize(payload)),
    -            9008u16 => Messages::SetLpfSetting(SetLpfSettingStruct::deserialize(payload)),
    +            9101u16 => Messages::CellTimeout(CellTimeoutStruct::deserialize(payload)),
    +            9200u16 => Messages::Reboot(RebootStruct::deserialize(payload)),
    +            9104u16 => Messages::TemperatureMax(TemperatureMaxStruct::deserialize(payload)),
    +            9005u16 => {
    +                Messages::SetTemperatureTimeout(SetTemperatureTimeoutStruct::deserialize(payload))
    +            }
    +            9003u16 => Messages::SetCurrentTimeout(SetCurrentTimeoutStruct::deserialize(payload)),
    +            9201u16 => Messages::EraseFlash(EraseFlashStruct::deserialize(payload)),
    +            9002u16 => Messages::SetCurrentMax(SetCurrentMaxStruct::deserialize(payload)),
    +            9105u16 => Messages::TemperatureTimeout(TemperatureTimeoutStruct::deserialize(payload)),
                 9006u16 => Messages::SetStreamRate(SetStreamRateStruct::deserialize(payload)),
                 9000u16 => {
                     Messages::SetCellVoltageMinimum(SetCellVoltageMinimumStruct::deserialize(payload))
                 }
    +            9008u16 => Messages::SetLpfSetting(SetLpfSettingStruct::deserialize(payload)),
    +            9100u16 => Messages::CellVoltageMin(CellVoltageMinStruct::deserialize(payload)),
    +            9106u16 => Messages::State(StateStruct::deserialize(payload)),
    +            9103u16 => Messages::CurrentTimeout(CurrentTimeoutStruct::deserialize(payload)),
    +            9202u16 => Messages::ResetDefaults(ResetDefaultsStruct::deserialize(payload)),
                 9007u16 => {
                     Messages::SetLpfSampleFrequency(SetLpfSampleFrequencyStruct::deserialize(payload))
                 }
    -            9003u16 => Messages::SetCurrentTimeout(SetCurrentTimeoutStruct::deserialize(payload)),
    -            9101u16 => Messages::CellTimeout(CellTimeoutStruct::deserialize(payload)),
    -            9201u16 => Messages::EraseFlash(EraseFlashStruct::deserialize(payload)),
    -            9005u16 => {
    -                Messages::SetTemperatureTimeout(SetTemperatureTimeoutStruct::deserialize(payload))
    -            }
    -            9102u16 => Messages::CurrentMax(CurrentMaxStruct::deserialize(payload)),
    -            9104u16 => Messages::TemperatureMax(TemperatureMaxStruct::deserialize(payload)),
                 9107u16 => Messages::Events(EventsStruct::deserialize(payload)),
    -            9002u16 => Messages::SetCurrentMax(SetCurrentMaxStruct::deserialize(payload)),
    +            9102u16 => Messages::CurrentMax(CurrentMaxStruct::deserialize(payload)),
                 _ => {
    -                return Err(&"Unknown message id");
    +                return Err(&"Unknown message id");
                 }
             })
         }
    diff --git a/src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-d6dfbce8a49b4140/out/common.rs.html b/src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-b755b5855bdec7a7/out/common.rs.html
    similarity index 79%
    rename from src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-d6dfbce8a49b4140/out/common.rs.html
    rename to src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-b755b5855bdec7a7/out/common.rs.html
    index d913e5924..15c26c3a6 100644
    --- a/src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-d6dfbce8a49b4140/out/common.rs.html
    +++ b/src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-b755b5855bdec7a7/out/common.rs.html
    @@ -1,4 +1,5 @@
    -common.rs - source
    1
    +common.rs - source
    +    
    1
     2
     3
     4
    @@ -290,33 +291,33 @@
     use crate::message::DeserializePayload;
     use crate::message::PingMessage;
     use crate::message::SerializePayload;
    -#[cfg(feature = "serde")]
    +#[cfg(feature = "serde")]
     use serde::{Deserialize, Serialize};
     use std::convert::TryInto;
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
     pub struct PingProtocolHead {
         pub source_device_id: u8,
         pub destiny_device_id: u8,
     }
     #[derive(Debug, Clone, PartialEq)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
     pub enum Messages {
         Nack(NackStruct),
         AsciiText(AsciiTextStruct),
    +    DeviceInformation(DeviceInformationStruct),
         ProtocolVersion(ProtocolVersionStruct),
    +    Ack(AckStruct),
         GeneralRequest(GeneralRequestStruct),
         SetDeviceId(SetDeviceIdStruct),
    -    Ack(AckStruct),
    -    DeviceInformation(DeviceInformationStruct),
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Not acknowledged."]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Not acknowledged."]
     pub struct NackStruct {
    -    #[doc = "The message ID that is Not ACKnowledged."]
    +    #[doc = "The message ID that is Not ACKnowledged."]
         pub nacked_id: u16,
    -    #[doc = "ASCII text message indicating NACK condition. (not necessarily NULL terminated)"]
    +    #[doc = "ASCII text message indicating NACK condition. (not necessarily NULL terminated)"]
         pub nack_message: String,
     }
     impl SerializePayload for NackStruct {
    @@ -334,7 +335,7 @@
                 nacked_id: u16::from_le_bytes(
                     payload[0usize..0usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
                 nack_message: String::from_utf8(payload[2usize..2usize + payload.len()].to_vec())
                     .unwrap(),
    @@ -342,10 +343,10 @@
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "A message for transmitting text data."]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "A message for transmitting text data."]
     pub struct AsciiTextStruct {
    -    #[doc = "ASCII text message. (not necessarily NULL terminated)"]
    +    #[doc = "ASCII text message. (not necessarily NULL terminated)"]
         pub ascii_message: String,
     }
     impl SerializePayload for AsciiTextStruct {
    @@ -365,16 +366,57 @@
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "The protocol version"]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Device information"]
    +pub struct DeviceInformationStruct {
    +    #[doc = "Device type. 0: Unknown; 1: Ping Echosounder; 2: Ping360"]
    +    pub device_type: u8,
    +    #[doc = "device-specific hardware revision"]
    +    pub device_revision: u8,
    +    #[doc = "Firmware version major number."]
    +    pub firmware_version_major: u8,
    +    #[doc = "Firmware version minor number."]
    +    pub firmware_version_minor: u8,
    +    #[doc = "Firmware version patch number."]
    +    pub firmware_version_patch: u8,
    +    #[doc = "reserved"]
    +    pub reserved: u8,
    +}
    +impl SerializePayload for DeviceInformationStruct {
    +    fn serialize(&self) -> Vec<u8> {
    +        let mut buffer: Vec<u8> = Default::default();
    +        buffer.extend_from_slice(&self.device_type.to_le_bytes());
    +        buffer.extend_from_slice(&self.device_revision.to_le_bytes());
    +        buffer.extend_from_slice(&self.firmware_version_major.to_le_bytes());
    +        buffer.extend_from_slice(&self.firmware_version_minor.to_le_bytes());
    +        buffer.extend_from_slice(&self.firmware_version_patch.to_le_bytes());
    +        buffer.extend_from_slice(&self.reserved.to_le_bytes());
    +        buffer
    +    }
    +}
    +impl DeserializePayload for DeviceInformationStruct {
    +    fn deserialize(payload: &[u8]) -> Self {
    +        Self {
    +            device_type: payload[0usize].into(),
    +            device_revision: payload[1usize].into(),
    +            firmware_version_major: payload[2usize].into(),
    +            firmware_version_minor: payload[3usize].into(),
    +            firmware_version_patch: payload[4usize].into(),
    +            reserved: payload[5usize].into(),
    +        }
    +    }
    +}
    +#[derive(Debug, Clone, PartialEq, Default)]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "The protocol version"]
     pub struct ProtocolVersionStruct {
    -    #[doc = "Protocol version major number."]
    +    #[doc = "Protocol version major number."]
         pub version_major: u8,
    -    #[doc = "Protocol version minor number."]
    +    #[doc = "Protocol version minor number."]
         pub version_minor: u8,
    -    #[doc = "Protocol version patch number."]
    +    #[doc = "Protocol version patch number."]
         pub version_patch: u8,
    -    #[doc = "reserved"]
    +    #[doc = "reserved"]
         pub reserved: u8,
     }
     impl SerializePayload for ProtocolVersionStruct {
    @@ -398,150 +440,109 @@
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Requests a specific message to be sent from the sonar to the host. Command timeout should be set to 50 msec."]
    -pub struct GeneralRequestStruct {
    -    #[doc = "Message ID to be requested."]
    -    pub requested_id: u16,
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Acknowledged."]
    +pub struct AckStruct {
    +    #[doc = "The message ID that is ACKnowledged."]
    +    pub acked_id: u16,
     }
    -impl SerializePayload for GeneralRequestStruct {
    +impl SerializePayload for AckStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.requested_id.to_le_bytes());
    +        buffer.extend_from_slice(&self.acked_id.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for GeneralRequestStruct {
    +impl DeserializePayload for AckStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            requested_id: u16::from_le_bytes(
    +            acked_id: u16::from_le_bytes(
                     payload[0usize..0usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Set the device ID."]
    -pub struct SetDeviceIdStruct {
    -    #[doc = "Device ID (1-254). 0 is unknown and 255 is reserved for broadcast messages."]
    -    pub device_id: u8,
    -}
    -impl SerializePayload for SetDeviceIdStruct {
    -    fn serialize(&self) -> Vec<u8> {
    -        let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.device_id.to_le_bytes());
    -        buffer
    -    }
    -}
    -impl DeserializePayload for SetDeviceIdStruct {
    -    fn deserialize(payload: &[u8]) -> Self {
    -        Self {
    -            device_id: payload[0usize].into(),
    -        }
    -    }
    -}
    -#[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Acknowledged."]
    -pub struct AckStruct {
    -    #[doc = "The message ID that is ACKnowledged."]
    -    pub acked_id: u16,
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Requests a specific message to be sent from the sonar to the host. Command timeout should be set to 50 msec."]
    +pub struct GeneralRequestStruct {
    +    #[doc = "Message ID to be requested."]
    +    pub requested_id: u16,
     }
    -impl SerializePayload for AckStruct {
    +impl SerializePayload for GeneralRequestStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.acked_id.to_le_bytes());
    +        buffer.extend_from_slice(&self.requested_id.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for AckStruct {
    +impl DeserializePayload for GeneralRequestStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            acked_id: u16::from_le_bytes(
    +            requested_id: u16::from_le_bytes(
                     payload[0usize..0usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Device information"]
    -pub struct DeviceInformationStruct {
    -    #[doc = "Device type. 0: Unknown; 1: Ping Echosounder; 2: Ping360"]
    -    pub device_type: u8,
    -    #[doc = "device-specific hardware revision"]
    -    pub device_revision: u8,
    -    #[doc = "Firmware version major number."]
    -    pub firmware_version_major: u8,
    -    #[doc = "Firmware version minor number."]
    -    pub firmware_version_minor: u8,
    -    #[doc = "Firmware version patch number."]
    -    pub firmware_version_patch: u8,
    -    #[doc = "reserved"]
    -    pub reserved: u8,
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Set the device ID."]
    +pub struct SetDeviceIdStruct {
    +    #[doc = "Device ID (1-254). 0 is unknown and 255 is reserved for broadcast messages."]
    +    pub device_id: u8,
     }
    -impl SerializePayload for DeviceInformationStruct {
    +impl SerializePayload for SetDeviceIdStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.device_type.to_le_bytes());
    -        buffer.extend_from_slice(&self.device_revision.to_le_bytes());
    -        buffer.extend_from_slice(&self.firmware_version_major.to_le_bytes());
    -        buffer.extend_from_slice(&self.firmware_version_minor.to_le_bytes());
    -        buffer.extend_from_slice(&self.firmware_version_patch.to_le_bytes());
    -        buffer.extend_from_slice(&self.reserved.to_le_bytes());
    +        buffer.extend_from_slice(&self.device_id.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for DeviceInformationStruct {
    +impl DeserializePayload for SetDeviceIdStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            device_type: payload[0usize].into(),
    -            device_revision: payload[1usize].into(),
    -            firmware_version_major: payload[2usize].into(),
    -            firmware_version_minor: payload[3usize].into(),
    -            firmware_version_patch: payload[4usize].into(),
    -            reserved: payload[5usize].into(),
    +            device_id: payload[0usize].into(),
             }
         }
     }
     impl PingMessage for Messages {
    -    fn message_name(&self) -> &'static str {
    +    fn message_name(&self) -> &'static str {
             match self {
    -            Messages::Nack(..) => "nack",
    -            Messages::AsciiText(..) => "ascii_text",
    -            Messages::ProtocolVersion(..) => "protocol_version",
    -            Messages::GeneralRequest(..) => "general_request",
    -            Messages::SetDeviceId(..) => "set_device_id",
    -            Messages::Ack(..) => "ack",
    -            Messages::DeviceInformation(..) => "device_information",
    +            Messages::Nack(..) => "nack",
    +            Messages::AsciiText(..) => "ascii_text",
    +            Messages::DeviceInformation(..) => "device_information",
    +            Messages::ProtocolVersion(..) => "protocol_version",
    +            Messages::Ack(..) => "ack",
    +            Messages::GeneralRequest(..) => "general_request",
    +            Messages::SetDeviceId(..) => "set_device_id",
             }
         }
         fn message_id(&self) -> u16 {
             match self {
                 Messages::Nack(..) => 2u16,
                 Messages::AsciiText(..) => 3u16,
    +            Messages::DeviceInformation(..) => 4u16,
                 Messages::ProtocolVersion(..) => 5u16,
    +            Messages::Ack(..) => 1u16,
                 Messages::GeneralRequest(..) => 6u16,
                 Messages::SetDeviceId(..) => 100u16,
    -            Messages::Ack(..) => 1u16,
    -            Messages::DeviceInformation(..) => 4u16,
             }
         }
         fn message_id_from_name(name: &str) -> Result<u16, String> {
             match name {
    -            "nack" => Ok(2u16),
    -            "ascii_text" => Ok(3u16),
    -            "protocol_version" => Ok(5u16),
    -            "general_request" => Ok(6u16),
    -            "set_device_id" => Ok(100u16),
    -            "ack" => Ok(1u16),
    -            "device_information" => Ok(4u16),
    -            _ => Err(format!("Failed to find message ID from name: {name}.")),
    +            "nack" => Ok(2u16),
    +            "ascii_text" => Ok(3u16),
    +            "device_information" => Ok(4u16),
    +            "protocol_version" => Ok(5u16),
    +            "ack" => Ok(1u16),
    +            "general_request" => Ok(6u16),
    +            "set_device_id" => Ok(100u16),
    +            _ => Err(format!("Failed to find message ID from name: {name}.")),
             }
         }
     }
    @@ -550,26 +551,26 @@
             match self {
                 Messages::Nack(content) => content.serialize(),
                 Messages::AsciiText(content) => content.serialize(),
    +            Messages::DeviceInformation(content) => content.serialize(),
                 Messages::ProtocolVersion(content) => content.serialize(),
    +            Messages::Ack(content) => content.serialize(),
                 Messages::GeneralRequest(content) => content.serialize(),
                 Messages::SetDeviceId(content) => content.serialize(),
    -            Messages::Ack(content) => content.serialize(),
    -            Messages::DeviceInformation(content) => content.serialize(),
             }
         }
     }
     impl DeserializeGenericMessage for Messages {
    -    fn deserialize(message_id: u16, payload: &[u8]) -> Result<Self, &'static str> {
    +    fn deserialize(message_id: u16, payload: &[u8]) -> Result<Self, &'static str> {
             Ok(match message_id {
                 2u16 => Messages::Nack(NackStruct::deserialize(payload)),
                 3u16 => Messages::AsciiText(AsciiTextStruct::deserialize(payload)),
    +            4u16 => Messages::DeviceInformation(DeviceInformationStruct::deserialize(payload)),
                 5u16 => Messages::ProtocolVersion(ProtocolVersionStruct::deserialize(payload)),
    +            1u16 => Messages::Ack(AckStruct::deserialize(payload)),
                 6u16 => Messages::GeneralRequest(GeneralRequestStruct::deserialize(payload)),
                 100u16 => Messages::SetDeviceId(SetDeviceIdStruct::deserialize(payload)),
    -            1u16 => Messages::Ack(AckStruct::deserialize(payload)),
    -            4u16 => Messages::DeviceInformation(DeviceInformationStruct::deserialize(payload)),
                 _ => {
    -                return Err(&"Unknown message id");
    +                return Err(&"Unknown message id");
                 }
             })
         }
    diff --git a/src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-d6dfbce8a49b4140/out/mod.rs.html b/src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-b755b5855bdec7a7/out/mod.rs.html
    similarity index 81%
    rename from src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-d6dfbce8a49b4140/out/mod.rs.html
    rename to src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-b755b5855bdec7a7/out/mod.rs.html
    index eb5d2b2d4..32c4efc2c 100644
    --- a/src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-d6dfbce8a49b4140/out/mod.rs.html
    +++ b/src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-b755b5855bdec7a7/out/mod.rs.html
    @@ -1,4 +1,5 @@
    -mod.rs - source
    1
    +mod.rs - source
    +    
    1
     2
     3
     4
    @@ -89,54 +90,54 @@
     89
     90
     91
    -
    pub mod bluebps {
    -    include!("bluebps.rs");
    +
    pub mod ping360 {
    +    include!("ping360.rs");
     }
    -pub mod ping360 {
    -    include!("ping360.rs");
    +pub mod ping1d {
    +    include!("ping1d.rs");
     }
     pub mod common {
    -    include!("common.rs");
    +    include!("common.rs");
     }
    -pub mod ping1d {
    -    include!("ping1d.rs");
    +pub mod bluebps {
    +    include!("bluebps.rs");
     }
     pub enum Messages {
    -    Bluebps(bluebps::Messages),
         Ping360(ping360::Messages),
    -    Common(common::Messages),
         Ping1D(ping1d::Messages),
    +    Common(common::Messages),
    +    Bluebps(bluebps::Messages),
     }
     impl TryFrom<&ProtocolMessage> for Messages {
         type Error = String;
         fn try_from(message: &ProtocolMessage) -> Result<Self, Self::Error> {
             if !message.has_valid_crc() {
                 return Err(format!(
    -                "Missmatch crc, expected: 0x{:04x}, received: 0x{:04x}",
    +                "Missmatch crc, expected: 0x{:04x}, received: 0x{:04x}",
                     message.calculate_crc(),
                     message.checksum
                 ));
             }
    -        if let Ok(message) = bluebps::Messages::deserialize(message.message_id, &message.payload) {
    -            return Ok(Messages::Bluebps(message));
    -        }
             if let Ok(message) = ping360::Messages::deserialize(message.message_id, &message.payload) {
                 return Ok(Messages::Ping360(message));
             }
    +        if let Ok(message) = ping1d::Messages::deserialize(message.message_id, &message.payload) {
    +            return Ok(Messages::Ping1D(message));
    +        }
             if let Ok(message) = common::Messages::deserialize(message.message_id, &message.payload) {
                 return Ok(Messages::Common(message));
             }
    -        if let Ok(message) = ping1d::Messages::deserialize(message.message_id, &message.payload) {
    -            return Ok(Messages::Ping1D(message));
    +        if let Ok(message) = bluebps::Messages::deserialize(message.message_id, &message.payload) {
    +            return Ok(Messages::Bluebps(message));
             }
    -        Err("Unknown message".into())
    +        Err("Unknown message".into())
         }
     }
     impl TryFrom<&Vec<u8>> for Messages {
         type Error = String;
         fn try_from(buffer: &Vec<u8>) -> Result<Self, Self::Error> {
             if !((buffer[0] == HEADER[0]) && (buffer[1] == HEADER[1])) {
    -            return Err (format ! ("Message should start with \"BR\" ASCII sequence, received: [{0}({:0x}), {1}({:0x})]" , buffer [0] , buffer [1])) ;
    +            return Err (format ! ("Message should start with \"BR\" ASCII sequence, received: [{0}({:0x}), {1}({:0x})]" , buffer [0] , buffer [1])) ;
             }
             let payload_length = u16::from_le_bytes([buffer[2], buffer[3]]);
             let protocol_message = ProtocolMessage {
    @@ -152,20 +153,20 @@
             };
             if !protocol_message.has_valid_crc() {
                 return Err(format!(
    -                "Missmatch crc, expected: 0x{:04x}, received: 0x{:04x}",
    +                "Missmatch crc, expected: 0x{:04x}, received: 0x{:04x}",
                     protocol_message.calculate_crc(),
                     protocol_message.checksum
                 ));
             }
             if let Ok(message) =
    -            bluebps::Messages::deserialize(protocol_message.message_id, &protocol_message.payload)
    +            ping360::Messages::deserialize(protocol_message.message_id, &protocol_message.payload)
             {
    -            return Ok(Messages::Bluebps(message));
    +            return Ok(Messages::Ping360(message));
             }
             if let Ok(message) =
    -            ping360::Messages::deserialize(protocol_message.message_id, &protocol_message.payload)
    +            ping1d::Messages::deserialize(protocol_message.message_id, &protocol_message.payload)
             {
    -            return Ok(Messages::Ping360(message));
    +            return Ok(Messages::Ping1D(message));
             }
             if let Ok(message) =
                 common::Messages::deserialize(protocol_message.message_id, &protocol_message.payload)
    @@ -173,11 +174,11 @@
                 return Ok(Messages::Common(message));
             }
             if let Ok(message) =
    -            ping1d::Messages::deserialize(protocol_message.message_id, &protocol_message.payload)
    +            bluebps::Messages::deserialize(protocol_message.message_id, &protocol_message.payload)
             {
    -            return Ok(Messages::Ping1D(message));
    +            return Ok(Messages::Bluebps(message));
             }
    -        Err("Unknown message".into())
    +        Err("Unknown message".into())
         }
     }
     
    \ No newline at end of file diff --git a/src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-d6dfbce8a49b4140/out/ping1d.rs.html b/src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-b755b5855bdec7a7/out/ping1d.rs.html similarity index 79% rename from src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-d6dfbce8a49b4140/out/ping1d.rs.html rename to src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-b755b5855bdec7a7/out/ping1d.rs.html index d38e24861..260ea8e18 100644 --- a/src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-d6dfbce8a49b4140/out/ping1d.rs.html +++ b/src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-b755b5855bdec7a7/out/ping1d.rs.html @@ -1,4 +1,5 @@ -ping1d.rs - source
    1
    +ping1d.rs - source
    +    
    1
     2
     3
     4
    @@ -992,338 +993,346 @@
     use crate::message::DeserializePayload;
     use crate::message::PingMessage;
     use crate::message::SerializePayload;
    -#[cfg(feature = "serde")]
    +#[cfg(feature = "serde")]
     use serde::{Deserialize, Serialize};
     use std::convert::TryInto;
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
     pub struct PingProtocolHead {
         pub source_device_id: u8,
         pub destiny_device_id: u8,
     }
     #[derive(Debug, Clone, PartialEq)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
     pub enum Messages {
    -    SetGainSetting(SetGainSettingStruct),
    -    ContinuousStart(ContinuousStartStruct),
    -    ProcessorTemperature(ProcessorTemperatureStruct),
    -    FirmwareVersion(FirmwareVersionStruct),
    -    PingEnable(PingEnableStruct),
         SetPingEnable(SetPingEnableStruct),
    -    DistanceSimple(DistanceSimpleStruct),
    -    GeneralInfo(GeneralInfoStruct),
    -    SetSpeedOfSound(SetSpeedOfSoundStruct),
         PcbTemperature(PcbTemperatureStruct),
    -    GotoBootloader(GotoBootloaderStruct),
    -    ModeAuto(ModeAutoStruct),
    -    SetDeviceId(SetDeviceIdStruct),
    +    SpeedOfSound(SpeedOfSoundStruct),
    +    Distance(DistanceStruct),
    +    ProcessorTemperature(ProcessorTemperatureStruct),
    +    Range(RangeStruct),
         ContinuousStop(ContinuousStopStruct),
    +    PingInterval(PingIntervalStruct),
    +    ContinuousStart(ContinuousStartStruct),
    +    SetDeviceId(SetDeviceIdStruct),
    +    GotoBootloader(GotoBootloaderStruct),
    +    SetPingInterval(SetPingIntervalStruct),
         DeviceId(DeviceIdStruct),
    +    Profile(ProfileStruct),
    +    FirmwareVersion(FirmwareVersionStruct),
    +    TransmitDuration(TransmitDurationStruct),
         SetRange(SetRangeStruct),
    +    SetModeAuto(SetModeAutoStruct),
         Voltage5(Voltage5Struct),
    -    Profile(ProfileStruct),
    +    ModeAuto(ModeAutoStruct),
    +    SetSpeedOfSound(SetSpeedOfSoundStruct),
         GainSetting(GainSettingStruct),
    -    Range(RangeStruct),
    -    Distance(DistanceStruct),
    -    SpeedOfSound(SpeedOfSoundStruct),
    -    SetModeAuto(SetModeAutoStruct),
    -    TransmitDuration(TransmitDurationStruct),
    -    PingInterval(PingIntervalStruct),
    -    SetPingInterval(SetPingIntervalStruct),
    +    PingEnable(PingEnableStruct),
    +    DistanceSimple(DistanceSimpleStruct),
    +    SetGainSetting(SetGainSettingStruct),
    +    GeneralInfo(GeneralInfoStruct),
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Set the current gain setting."]
    -pub struct SetGainSettingStruct {
    -    #[doc = "The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, 4: 30.2, 5: 66.1, 6: 144"]
    -    pub gain_setting: u8,
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Enable or disable acoustic measurements."]
    +pub struct SetPingEnableStruct {
    +    #[doc = "0: Disable, 1: Enable."]
    +    pub ping_enabled: u8,
     }
    -impl SerializePayload for SetGainSettingStruct {
    +impl SerializePayload for SetPingEnableStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.gain_setting.to_le_bytes());
    +        buffer.extend_from_slice(&self.ping_enabled.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for SetGainSettingStruct {
    +impl DeserializePayload for SetPingEnableStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            gain_setting: payload[0usize].into(),
    +            ping_enabled: payload[0usize].into(),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Command to initiate continuous data stream of profile messages."]
    -pub struct ContinuousStartStruct {
    -    #[doc = "The message id to stream. 1300: profile"]
    -    pub id: u16,
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Temperature of the on-board thermistor."]
    +pub struct PcbTemperatureStruct {
    +    #[doc = "The temperature in centi-degrees Centigrade (100 * degrees C)."]
    +    pub pcb_temperature: u16,
     }
    -impl SerializePayload for ContinuousStartStruct {
    +impl SerializePayload for PcbTemperatureStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.id.to_le_bytes());
    +        buffer.extend_from_slice(&self.pcb_temperature.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for ContinuousStartStruct {
    +impl DeserializePayload for PcbTemperatureStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            id: u16::from_le_bytes(
    +            pcb_temperature: u16::from_le_bytes(
                     payload[0usize..0usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Temperature of the device cpu."]
    -pub struct ProcessorTemperatureStruct {
    -    #[doc = "The temperature in centi-degrees Centigrade (100 * degrees C)."]
    -    pub processor_temperature: u16,
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "The speed of sound used for distance calculations."]
    +pub struct SpeedOfSoundStruct {
    +    #[doc = "The speed of sound in the measurement medium. ~1,500,000 mm/s for water."]
    +    pub speed_of_sound: u32,
     }
    -impl SerializePayload for ProcessorTemperatureStruct {
    +impl SerializePayload for SpeedOfSoundStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.processor_temperature.to_le_bytes());
    +        buffer.extend_from_slice(&self.speed_of_sound.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for ProcessorTemperatureStruct {
    +impl DeserializePayload for SpeedOfSoundStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            processor_temperature: u16::from_le_bytes(
    -                payload[0usize..0usize + 2usize]
    +            speed_of_sound: u32::from_le_bytes(
    +                payload[0usize..0usize + 4usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Device information"]
    -pub struct FirmwareVersionStruct {
    -    #[doc = "Device type. 0: Unknown; 1: Echosounder"]
    -    pub device_type: u8,
    -    #[doc = "Device model. 0: Unknown; 1: Ping1D"]
    -    pub device_model: u8,
    -    #[doc = "Firmware version major number."]
    -    pub firmware_version_major: u16,
    -    #[doc = "Firmware version minor number."]
    -    pub firmware_version_minor: u16,
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "The distance to target with confidence estimate. Relevant device parameters during the measurement are also provided."]
    +pub struct DistanceStruct {
    +    #[doc = "The current return distance determined for the most recent acoustic measurement."]
    +    pub distance: u32,
    +    #[doc = "Confidence in the most recent range measurement."]
    +    pub confidence: u16,
    +    #[doc = "The acoustic pulse length during acoustic transmission/activation."]
    +    pub transmit_duration: u16,
    +    #[doc = "The pulse/measurement count since boot."]
    +    pub ping_number: u32,
    +    #[doc = "The beginning of the scan region in mm from the transducer."]
    +    pub scan_start: u32,
    +    #[doc = "The length of the scan region."]
    +    pub scan_length: u32,
    +    #[doc = "The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, 4: 30.2, 5: 66.1, 6: 144"]
    +    pub gain_setting: u32,
     }
    -impl SerializePayload for FirmwareVersionStruct {
    +impl SerializePayload for DistanceStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.device_type.to_le_bytes());
    -        buffer.extend_from_slice(&self.device_model.to_le_bytes());
    -        buffer.extend_from_slice(&self.firmware_version_major.to_le_bytes());
    -        buffer.extend_from_slice(&self.firmware_version_minor.to_le_bytes());
    +        buffer.extend_from_slice(&self.distance.to_le_bytes());
    +        buffer.extend_from_slice(&self.confidence.to_le_bytes());
    +        buffer.extend_from_slice(&self.transmit_duration.to_le_bytes());
    +        buffer.extend_from_slice(&self.ping_number.to_le_bytes());
    +        buffer.extend_from_slice(&self.scan_start.to_le_bytes());
    +        buffer.extend_from_slice(&self.scan_length.to_le_bytes());
    +        buffer.extend_from_slice(&self.gain_setting.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for FirmwareVersionStruct {
    +impl DeserializePayload for DistanceStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            device_type: payload[0usize].into(),
    -            device_model: payload[1usize].into(),
    -            firmware_version_major: u16::from_le_bytes(
    -                payload[2usize..2usize + 2usize]
    +            distance: u32::from_le_bytes(
    +                payload[0usize..0usize + 4usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
    -            firmware_version_minor: u16::from_le_bytes(
    +            confidence: u16::from_le_bytes(
                     payload[4usize..4usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
    +            ),
    +            transmit_duration: u16::from_le_bytes(
    +                payload[6usize..6usize + 2usize]
    +                    .try_into()
    +                    .expect("Wrong slice length"),
    +            ),
    +            ping_number: u32::from_le_bytes(
    +                payload[8usize..8usize + 4usize]
    +                    .try_into()
    +                    .expect("Wrong slice length"),
    +            ),
    +            scan_start: u32::from_le_bytes(
    +                payload[12usize..12usize + 4usize]
    +                    .try_into()
    +                    .expect("Wrong slice length"),
    +            ),
    +            scan_length: u32::from_le_bytes(
    +                payload[16usize..16usize + 4usize]
    +                    .try_into()
    +                    .expect("Wrong slice length"),
    +            ),
    +            gain_setting: u32::from_le_bytes(
    +                payload[20usize..20usize + 4usize]
    +                    .try_into()
    +                    .expect("Wrong slice length"),
                 ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Acoustic output enabled state."]
    -pub struct PingEnableStruct {
    -    #[doc = "The state of the acoustic output. 0: disabled, 1:enabled"]
    -    pub ping_enabled: u8,
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Temperature of the device cpu."]
    +pub struct ProcessorTemperatureStruct {
    +    #[doc = "The temperature in centi-degrees Centigrade (100 * degrees C)."]
    +    pub processor_temperature: u16,
     }
    -impl SerializePayload for PingEnableStruct {
    +impl SerializePayload for ProcessorTemperatureStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.ping_enabled.to_le_bytes());
    +        buffer.extend_from_slice(&self.processor_temperature.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for PingEnableStruct {
    +impl DeserializePayload for ProcessorTemperatureStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            ping_enabled: payload[0usize].into(),
    +            processor_temperature: u16::from_le_bytes(
    +                payload[0usize..0usize + 2usize]
    +                    .try_into()
    +                    .expect("Wrong slice length"),
    +            ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Enable or disable acoustic measurements."]
    -pub struct SetPingEnableStruct {
    -    #[doc = "0: Disable, 1: Enable."]
    -    pub ping_enabled: u8,
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "The scan range for acoustic measurements. Measurements returned by the device will lie in the range (scan_start, scan_start + scan_length)."]
    +pub struct RangeStruct {
    +    #[doc = "The beginning of the scan range in mm from the transducer."]
    +    pub scan_start: u32,
    +    #[doc = "The length of the scan range."]
    +    pub scan_length: u32,
     }
    -impl SerializePayload for SetPingEnableStruct {
    +impl SerializePayload for RangeStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.ping_enabled.to_le_bytes());
    +        buffer.extend_from_slice(&self.scan_start.to_le_bytes());
    +        buffer.extend_from_slice(&self.scan_length.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for SetPingEnableStruct {
    +impl DeserializePayload for RangeStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            ping_enabled: payload[0usize].into(),
    +            scan_start: u32::from_le_bytes(
    +                payload[0usize..0usize + 4usize]
    +                    .try_into()
    +                    .expect("Wrong slice length"),
    +            ),
    +            scan_length: u32::from_le_bytes(
    +                payload[4usize..4usize + 4usize]
    +                    .try_into()
    +                    .expect("Wrong slice length"),
    +            ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "The distance to target with confidence estimate."]
    -pub struct DistanceSimpleStruct {
    -    #[doc = "Distance to the target."]
    -    pub distance: u32,
    -    #[doc = "Confidence in the distance measurement."]
    -    pub confidence: u8,
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Command to stop the continuous data stream of profile messages."]
    +pub struct ContinuousStopStruct {
    +    #[doc = "The message id to stop streaming. 1300: profile"]
    +    pub id: u16,
     }
    -impl SerializePayload for DistanceSimpleStruct {
    +impl SerializePayload for ContinuousStopStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.distance.to_le_bytes());
    -        buffer.extend_from_slice(&self.confidence.to_le_bytes());
    +        buffer.extend_from_slice(&self.id.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for DistanceSimpleStruct {
    +impl DeserializePayload for ContinuousStopStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            distance: u32::from_le_bytes(
    -                payload[0usize..0usize + 4usize]
    +            id: u16::from_le_bytes(
    +                payload[0usize..0usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
    -            confidence: payload[4usize].into(),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "General information."]
    -pub struct GeneralInfoStruct {
    -    #[doc = "Firmware major version."]
    -    pub firmware_version_major: u16,
    -    #[doc = "Firmware minor version."]
    -    pub firmware_version_minor: u16,
    -    #[doc = "Device supply voltage."]
    -    pub voltage_5: u16,
    -    #[doc = "The interval between acoustic measurements."]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "The interval between acoustic measurements."]
    +pub struct PingIntervalStruct {
    +    #[doc = "The minimum interval between acoustic measurements. The actual interval may be longer."]
         pub ping_interval: u16,
    -    #[doc = "The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, 4: 30.2, 5: 66.1, 6: 144"]
    -    pub gain_setting: u8,
    -    #[doc = "The current operating mode of the device. 0: manual mode, 1: auto mode"]
    -    pub mode_auto: u8,
     }
    -impl SerializePayload for GeneralInfoStruct {
    +impl SerializePayload for PingIntervalStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.firmware_version_major.to_le_bytes());
    -        buffer.extend_from_slice(&self.firmware_version_minor.to_le_bytes());
    -        buffer.extend_from_slice(&self.voltage_5.to_le_bytes());
             buffer.extend_from_slice(&self.ping_interval.to_le_bytes());
    -        buffer.extend_from_slice(&self.gain_setting.to_le_bytes());
    -        buffer.extend_from_slice(&self.mode_auto.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for GeneralInfoStruct {
    +impl DeserializePayload for PingIntervalStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            firmware_version_major: u16::from_le_bytes(
    -                payload[0usize..0usize + 2usize]
    -                    .try_into()
    -                    .expect("Wrong slice length"),
    -            ),
    -            firmware_version_minor: u16::from_le_bytes(
    -                payload[2usize..2usize + 2usize]
    -                    .try_into()
    -                    .expect("Wrong slice length"),
    -            ),
    -            voltage_5: u16::from_le_bytes(
    -                payload[4usize..4usize + 2usize]
    -                    .try_into()
    -                    .expect("Wrong slice length"),
    -            ),
                 ping_interval: u16::from_le_bytes(
    -                payload[6usize..6usize + 2usize]
    +                payload[0usize..0usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
    -            gain_setting: payload[8usize].into(),
    -            mode_auto: payload[9usize].into(),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Set the speed of sound used for distance calculations."]
    -pub struct SetSpeedOfSoundStruct {
    -    #[doc = "The speed of sound in the measurement medium. ~1,500,000 mm/s for water."]
    -    pub speed_of_sound: u32,
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Command to initiate continuous data stream of profile messages."]
    +pub struct ContinuousStartStruct {
    +    #[doc = "The message id to stream. 1300: profile"]
    +    pub id: u16,
     }
    -impl SerializePayload for SetSpeedOfSoundStruct {
    +impl SerializePayload for ContinuousStartStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.speed_of_sound.to_le_bytes());
    +        buffer.extend_from_slice(&self.id.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for SetSpeedOfSoundStruct {
    +impl DeserializePayload for ContinuousStartStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            speed_of_sound: u32::from_le_bytes(
    -                payload[0usize..0usize + 4usize]
    +            id: u16::from_le_bytes(
    +                payload[0usize..0usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Temperature of the on-board thermistor."]
    -pub struct PcbTemperatureStruct {
    -    #[doc = "The temperature in centi-degrees Centigrade (100 * degrees C)."]
    -    pub pcb_temperature: u16,
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Set the device ID."]
    +pub struct SetDeviceIdStruct {
    +    #[doc = "Device ID (0-254). 255 is reserved for broadcast messages."]
    +    pub device_id: u8,
     }
    -impl SerializePayload for PcbTemperatureStruct {
    +impl SerializePayload for SetDeviceIdStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.pcb_temperature.to_le_bytes());
    +        buffer.extend_from_slice(&self.device_id.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for PcbTemperatureStruct {
    +impl DeserializePayload for SetDeviceIdStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            pcb_temperature: u16::from_le_bytes(
    -                payload[0usize..0usize + 2usize]
    -                    .try_into()
    -                    .expect("Wrong slice length"),
    -            ),
    +            device_id: payload[0usize].into(),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Send the device into the bootloader. This is useful for firmware updates."]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Send the device into the bootloader. This is useful for firmware updates."]
     pub struct GotoBootloaderStruct {}
     impl SerializePayload for GotoBootloaderStruct {
         fn serialize(&self) -> Vec<u8> {
    @@ -1337,77 +1346,35 @@
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "The current operating mode of the device. Manual mode allows for manual selection of the gain and scan range."]
    -pub struct ModeAutoStruct {
    -    #[doc = "0: manual mode, 1: auto mode"]
    -    pub mode_auto: u8,
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "The interval between acoustic measurements."]
    +pub struct SetPingIntervalStruct {
    +    #[doc = "The interval between acoustic measurements."]
    +    pub ping_interval: u16,
     }
    -impl SerializePayload for ModeAutoStruct {
    +impl SerializePayload for SetPingIntervalStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.mode_auto.to_le_bytes());
    +        buffer.extend_from_slice(&self.ping_interval.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for ModeAutoStruct {
    +impl DeserializePayload for SetPingIntervalStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            mode_auto: payload[0usize].into(),
    -        }
    -    }
    -}
    -#[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Set the device ID."]
    -pub struct SetDeviceIdStruct {
    -    #[doc = "Device ID (0-254). 255 is reserved for broadcast messages."]
    -    pub device_id: u8,
    -}
    -impl SerializePayload for SetDeviceIdStruct {
    -    fn serialize(&self) -> Vec<u8> {
    -        let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.device_id.to_le_bytes());
    -        buffer
    -    }
    -}
    -impl DeserializePayload for SetDeviceIdStruct {
    -    fn deserialize(payload: &[u8]) -> Self {
    -        Self {
    -            device_id: payload[0usize].into(),
    -        }
    -    }
    -}
    -#[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Command to stop the continuous data stream of profile messages."]
    -pub struct ContinuousStopStruct {
    -    #[doc = "The message id to stop streaming. 1300: profile"]
    -    pub id: u16,
    -}
    -impl SerializePayload for ContinuousStopStruct {
    -    fn serialize(&self) -> Vec<u8> {
    -        let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.id.to_le_bytes());
    -        buffer
    -    }
    -}
    -impl DeserializePayload for ContinuousStopStruct {
    -    fn deserialize(payload: &[u8]) -> Self {
    -        Self {
    -            id: u16::from_le_bytes(
    +            ping_interval: u16::from_le_bytes(
                     payload[0usize..0usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "The device ID."]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "The device ID."]
     pub struct DeviceIdStruct {
    -    #[doc = "The device ID (0-254). 255 is reserved for broadcast messages."]
    +    #[doc = "The device ID (0-254). 255 is reserved for broadcast messages."]
         pub device_id: u8,
     }
     impl SerializePayload for DeviceIdStruct {
    @@ -1425,82 +1392,24 @@
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Set the scan range for acoustic measurements."]
    -pub struct SetRangeStruct {
    -    #[doc = "Not documented"]
    -    pub scan_start: u32,
    -    #[doc = "The length of the scan range."]
    -    pub scan_length: u32,
    -}
    -impl SerializePayload for SetRangeStruct {
    -    fn serialize(&self) -> Vec<u8> {
    -        let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.scan_start.to_le_bytes());
    -        buffer.extend_from_slice(&self.scan_length.to_le_bytes());
    -        buffer
    -    }
    -}
    -impl DeserializePayload for SetRangeStruct {
    -    fn deserialize(payload: &[u8]) -> Self {
    -        Self {
    -            scan_start: u32::from_le_bytes(
    -                payload[0usize..0usize + 4usize]
    -                    .try_into()
    -                    .expect("Wrong slice length"),
    -            ),
    -            scan_length: u32::from_le_bytes(
    -                payload[4usize..4usize + 4usize]
    -                    .try_into()
    -                    .expect("Wrong slice length"),
    -            ),
    -        }
    -    }
    -}
    -#[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "The 5V rail voltage."]
    -pub struct Voltage5Struct {
    -    #[doc = "The 5V rail voltage."]
    -    pub voltage_5: u16,
    -}
    -impl SerializePayload for Voltage5Struct {
    -    fn serialize(&self) -> Vec<u8> {
    -        let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.voltage_5.to_le_bytes());
    -        buffer
    -    }
    -}
    -impl DeserializePayload for Voltage5Struct {
    -    fn deserialize(payload: &[u8]) -> Self {
    -        Self {
    -            voltage_5: u16::from_le_bytes(
    -                payload[0usize..0usize + 2usize]
    -                    .try_into()
    -                    .expect("Wrong slice length"),
    -            ),
    -        }
    -    }
    -}
    -#[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "A profile produced from a single acoustic measurement. The data returned is an array of response strength at even intervals across the scan region. The scan region is defined as the region between <scan_start> and <scan_start + scan_length> millimeters away from the transducer. A distance measurement to the target is also provided."]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "A profile produced from a single acoustic measurement. The data returned is an array of response strength at even intervals across the scan region. The scan region is defined as the region between <scan_start> and <scan_start + scan_length> millimeters away from the transducer. A distance measurement to the target is also provided."]
     pub struct ProfileStruct {
    -    #[doc = "The current return distance determined for the most recent acoustic measurement."]
    +    #[doc = "The current return distance determined for the most recent acoustic measurement."]
         pub distance: u32,
    -    #[doc = "Confidence in the most recent range measurement."]
    +    #[doc = "Confidence in the most recent range measurement."]
         pub confidence: u16,
    -    #[doc = "The acoustic pulse length during acoustic transmission/activation."]
    +    #[doc = "The acoustic pulse length during acoustic transmission/activation."]
         pub transmit_duration: u16,
    -    #[doc = "The pulse/measurement count since boot."]
    +    #[doc = "The pulse/measurement count since boot."]
         pub ping_number: u32,
    -    #[doc = "The beginning of the scan region in mm from the transducer."]
    +    #[doc = "The beginning of the scan region in mm from the transducer."]
         pub scan_start: u32,
    -    #[doc = "The length of the scan region."]
    +    #[doc = "The length of the scan region."]
         pub scan_length: u32,
    -    #[doc = "The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, 4: 30.2, 5: 66.1, 6: 144"]
    +    #[doc = "The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, 4: 30.2, 5: 66.1, 6: 144"]
         pub gain_setting: u32,
    -    #[doc = "An array of return strength measurements taken at regular intervals across the scan region."]
    +    #[doc = "An array of return strength measurements taken at regular intervals across the scan region."]
         pub profile_data_length: u16,
         pub profile_data: Vec<u8>,
     }
    @@ -1527,37 +1436,37 @@
                 distance: u32::from_le_bytes(
                     payload[0usize..0usize + 4usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
                 confidence: u16::from_le_bytes(
                     payload[4usize..4usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
                 transmit_duration: u16::from_le_bytes(
                     payload[6usize..6usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
                 ping_number: u32::from_le_bytes(
                     payload[8usize..8usize + 4usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
                 scan_start: u32::from_le_bytes(
                     payload[12usize..12usize + 4usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
                 scan_length: u32::from_le_bytes(
                     payload[16usize..16usize + 4usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
                 gain_setting: u32::from_le_bytes(
                     payload[20usize..20usize + 4usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
                 profile_data_length: payload.len() as u16,
                 profile_data: payload[24usize..24usize + payload.len()].to_vec(),
    @@ -1565,415 +1474,507 @@
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "The current gain setting."]
    -pub struct GainSettingStruct {
    -    #[doc = "The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, 4: 30.2, 5: 66.1, 6: 144"]
    -    pub gain_setting: u32,
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Device information"]
    +pub struct FirmwareVersionStruct {
    +    #[doc = "Device type. 0: Unknown; 1: Echosounder"]
    +    pub device_type: u8,
    +    #[doc = "Device model. 0: Unknown; 1: Ping1D"]
    +    pub device_model: u8,
    +    #[doc = "Firmware version major number."]
    +    pub firmware_version_major: u16,
    +    #[doc = "Firmware version minor number."]
    +    pub firmware_version_minor: u16,
     }
    -impl SerializePayload for GainSettingStruct {
    +impl SerializePayload for FirmwareVersionStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.gain_setting.to_le_bytes());
    +        buffer.extend_from_slice(&self.device_type.to_le_bytes());
    +        buffer.extend_from_slice(&self.device_model.to_le_bytes());
    +        buffer.extend_from_slice(&self.firmware_version_major.to_le_bytes());
    +        buffer.extend_from_slice(&self.firmware_version_minor.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for GainSettingStruct {
    +impl DeserializePayload for FirmwareVersionStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            gain_setting: u32::from_le_bytes(
    -                payload[0usize..0usize + 4usize]
    +            device_type: payload[0usize].into(),
    +            device_model: payload[1usize].into(),
    +            firmware_version_major: u16::from_le_bytes(
    +                payload[2usize..2usize + 2usize]
    +                    .try_into()
    +                    .expect("Wrong slice length"),
    +            ),
    +            firmware_version_minor: u16::from_le_bytes(
    +                payload[4usize..4usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "The scan range for acoustic measurements. Measurements returned by the device will lie in the range (scan_start, scan_start + scan_length)."]
    -pub struct RangeStruct {
    -    #[doc = "The beginning of the scan range in mm from the transducer."]
    -    pub scan_start: u32,
    -    #[doc = "The length of the scan range."]
    -    pub scan_length: u32,
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "The duration of the acoustic activation/transmission."]
    +pub struct TransmitDurationStruct {
    +    #[doc = "Acoustic pulse duration."]
    +    pub transmit_duration: u16,
     }
    -impl SerializePayload for RangeStruct {
    +impl SerializePayload for TransmitDurationStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.scan_start.to_le_bytes());
    -        buffer.extend_from_slice(&self.scan_length.to_le_bytes());
    +        buffer.extend_from_slice(&self.transmit_duration.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for RangeStruct {
    +impl DeserializePayload for TransmitDurationStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            scan_start: u32::from_le_bytes(
    -                payload[0usize..0usize + 4usize]
    -                    .try_into()
    -                    .expect("Wrong slice length"),
    -            ),
    -            scan_length: u32::from_le_bytes(
    -                payload[4usize..4usize + 4usize]
    +            transmit_duration: u16::from_le_bytes(
    +                payload[0usize..0usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "The distance to target with confidence estimate. Relevant device parameters during the measurement are also provided."]
    -pub struct DistanceStruct {
    -    #[doc = "The current return distance determined for the most recent acoustic measurement."]
    -    pub distance: u32,
    -    #[doc = "Confidence in the most recent range measurement."]
    -    pub confidence: u16,
    -    #[doc = "The acoustic pulse length during acoustic transmission/activation."]
    -    pub transmit_duration: u16,
    -    #[doc = "The pulse/measurement count since boot."]
    -    pub ping_number: u32,
    -    #[doc = "The beginning of the scan region in mm from the transducer."]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Set the scan range for acoustic measurements."]
    +pub struct SetRangeStruct {
    +    #[doc = "Not documented"]
         pub scan_start: u32,
    -    #[doc = "The length of the scan region."]
    +    #[doc = "The length of the scan range."]
         pub scan_length: u32,
    -    #[doc = "The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, 4: 30.2, 5: 66.1, 6: 144"]
    -    pub gain_setting: u32,
     }
    -impl SerializePayload for DistanceStruct {
    +impl SerializePayload for SetRangeStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.distance.to_le_bytes());
    -        buffer.extend_from_slice(&self.confidence.to_le_bytes());
    -        buffer.extend_from_slice(&self.transmit_duration.to_le_bytes());
    -        buffer.extend_from_slice(&self.ping_number.to_le_bytes());
             buffer.extend_from_slice(&self.scan_start.to_le_bytes());
             buffer.extend_from_slice(&self.scan_length.to_le_bytes());
    -        buffer.extend_from_slice(&self.gain_setting.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for DistanceStruct {
    +impl DeserializePayload for SetRangeStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            distance: u32::from_le_bytes(
    -                payload[0usize..0usize + 4usize]
    -                    .try_into()
    -                    .expect("Wrong slice length"),
    -            ),
    -            confidence: u16::from_le_bytes(
    -                payload[4usize..4usize + 2usize]
    -                    .try_into()
    -                    .expect("Wrong slice length"),
    -            ),
    -            transmit_duration: u16::from_le_bytes(
    -                payload[6usize..6usize + 2usize]
    -                    .try_into()
    -                    .expect("Wrong slice length"),
    -            ),
    -            ping_number: u32::from_le_bytes(
    -                payload[8usize..8usize + 4usize]
    -                    .try_into()
    -                    .expect("Wrong slice length"),
    -            ),
                 scan_start: u32::from_le_bytes(
    -                payload[12usize..12usize + 4usize]
    +                payload[0usize..0usize + 4usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
                 scan_length: u32::from_le_bytes(
    -                payload[16usize..16usize + 4usize]
    +                payload[4usize..4usize + 4usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
    -            gain_setting: u32::from_le_bytes(
    -                payload[20usize..20usize + 4usize]
    +        }
    +    }
    +}
    +#[derive(Debug, Clone, PartialEq, Default)]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Set automatic or manual mode. Manual mode allows for manual selection of the gain and scan range."]
    +pub struct SetModeAutoStruct {
    +    #[doc = "0: manual mode. 1: auto mode."]
    +    pub mode_auto: u8,
    +}
    +impl SerializePayload for SetModeAutoStruct {
    +    fn serialize(&self) -> Vec<u8> {
    +        let mut buffer: Vec<u8> = Default::default();
    +        buffer.extend_from_slice(&self.mode_auto.to_le_bytes());
    +        buffer
    +    }
    +}
    +impl DeserializePayload for SetModeAutoStruct {
    +    fn deserialize(payload: &[u8]) -> Self {
    +        Self {
    +            mode_auto: payload[0usize].into(),
    +        }
    +    }
    +}
    +#[derive(Debug, Clone, PartialEq, Default)]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "The 5V rail voltage."]
    +pub struct Voltage5Struct {
    +    #[doc = "The 5V rail voltage."]
    +    pub voltage_5: u16,
    +}
    +impl SerializePayload for Voltage5Struct {
    +    fn serialize(&self) -> Vec<u8> {
    +        let mut buffer: Vec<u8> = Default::default();
    +        buffer.extend_from_slice(&self.voltage_5.to_le_bytes());
    +        buffer
    +    }
    +}
    +impl DeserializePayload for Voltage5Struct {
    +    fn deserialize(payload: &[u8]) -> Self {
    +        Self {
    +            voltage_5: u16::from_le_bytes(
    +                payload[0usize..0usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "The speed of sound used for distance calculations."]
    -pub struct SpeedOfSoundStruct {
    -    #[doc = "The speed of sound in the measurement medium. ~1,500,000 mm/s for water."]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "The current operating mode of the device. Manual mode allows for manual selection of the gain and scan range."]
    +pub struct ModeAutoStruct {
    +    #[doc = "0: manual mode, 1: auto mode"]
    +    pub mode_auto: u8,
    +}
    +impl SerializePayload for ModeAutoStruct {
    +    fn serialize(&self) -> Vec<u8> {
    +        let mut buffer: Vec<u8> = Default::default();
    +        buffer.extend_from_slice(&self.mode_auto.to_le_bytes());
    +        buffer
    +    }
    +}
    +impl DeserializePayload for ModeAutoStruct {
    +    fn deserialize(payload: &[u8]) -> Self {
    +        Self {
    +            mode_auto: payload[0usize].into(),
    +        }
    +    }
    +}
    +#[derive(Debug, Clone, PartialEq, Default)]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Set the speed of sound used for distance calculations."]
    +pub struct SetSpeedOfSoundStruct {
    +    #[doc = "The speed of sound in the measurement medium. ~1,500,000 mm/s for water."]
         pub speed_of_sound: u32,
     }
    -impl SerializePayload for SpeedOfSoundStruct {
    +impl SerializePayload for SetSpeedOfSoundStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
             buffer.extend_from_slice(&self.speed_of_sound.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for SpeedOfSoundStruct {
    +impl DeserializePayload for SetSpeedOfSoundStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
                 speed_of_sound: u32::from_le_bytes(
                     payload[0usize..0usize + 4usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Set automatic or manual mode. Manual mode allows for manual selection of the gain and scan range."]
    -pub struct SetModeAutoStruct {
    -    #[doc = "0: manual mode. 1: auto mode."]
    -    pub mode_auto: u8,
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "The current gain setting."]
    +pub struct GainSettingStruct {
    +    #[doc = "The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, 4: 30.2, 5: 66.1, 6: 144"]
    +    pub gain_setting: u32,
     }
    -impl SerializePayload for SetModeAutoStruct {
    +impl SerializePayload for GainSettingStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.mode_auto.to_le_bytes());
    +        buffer.extend_from_slice(&self.gain_setting.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for SetModeAutoStruct {
    +impl DeserializePayload for GainSettingStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            mode_auto: payload[0usize].into(),
    +            gain_setting: u32::from_le_bytes(
    +                payload[0usize..0usize + 4usize]
    +                    .try_into()
    +                    .expect("Wrong slice length"),
    +            ),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "The duration of the acoustic activation/transmission."]
    -pub struct TransmitDurationStruct {
    -    #[doc = "Acoustic pulse duration."]
    -    pub transmit_duration: u16,
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Acoustic output enabled state."]
    +pub struct PingEnableStruct {
    +    #[doc = "The state of the acoustic output. 0: disabled, 1:enabled"]
    +    pub ping_enabled: u8,
     }
    -impl SerializePayload for TransmitDurationStruct {
    +impl SerializePayload for PingEnableStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.transmit_duration.to_le_bytes());
    +        buffer.extend_from_slice(&self.ping_enabled.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for TransmitDurationStruct {
    +impl DeserializePayload for PingEnableStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            transmit_duration: u16::from_le_bytes(
    -                payload[0usize..0usize + 2usize]
    -                    .try_into()
    -                    .expect("Wrong slice length"),
    -            ),
    +            ping_enabled: payload[0usize].into(),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "The interval between acoustic measurements."]
    -pub struct PingIntervalStruct {
    -    #[doc = "The minimum interval between acoustic measurements. The actual interval may be longer."]
    -    pub ping_interval: u16,
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "The distance to target with confidence estimate."]
    +pub struct DistanceSimpleStruct {
    +    #[doc = "Distance to the target."]
    +    pub distance: u32,
    +    #[doc = "Confidence in the distance measurement."]
    +    pub confidence: u8,
     }
    -impl SerializePayload for PingIntervalStruct {
    +impl SerializePayload for DistanceSimpleStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.ping_interval.to_le_bytes());
    +        buffer.extend_from_slice(&self.distance.to_le_bytes());
    +        buffer.extend_from_slice(&self.confidence.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for PingIntervalStruct {
    +impl DeserializePayload for DistanceSimpleStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            ping_interval: u16::from_le_bytes(
    -                payload[0usize..0usize + 2usize]
    +            distance: u32::from_le_bytes(
    +                payload[0usize..0usize + 4usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
    +            confidence: payload[4usize].into(),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "The interval between acoustic measurements."]
    -pub struct SetPingIntervalStruct {
    -    #[doc = "The interval between acoustic measurements."]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Set the current gain setting."]
    +pub struct SetGainSettingStruct {
    +    #[doc = "The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, 4: 30.2, 5: 66.1, 6: 144"]
    +    pub gain_setting: u8,
    +}
    +impl SerializePayload for SetGainSettingStruct {
    +    fn serialize(&self) -> Vec<u8> {
    +        let mut buffer: Vec<u8> = Default::default();
    +        buffer.extend_from_slice(&self.gain_setting.to_le_bytes());
    +        buffer
    +    }
    +}
    +impl DeserializePayload for SetGainSettingStruct {
    +    fn deserialize(payload: &[u8]) -> Self {
    +        Self {
    +            gain_setting: payload[0usize].into(),
    +        }
    +    }
    +}
    +#[derive(Debug, Clone, PartialEq, Default)]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "General information."]
    +pub struct GeneralInfoStruct {
    +    #[doc = "Firmware major version."]
    +    pub firmware_version_major: u16,
    +    #[doc = "Firmware minor version."]
    +    pub firmware_version_minor: u16,
    +    #[doc = "Device supply voltage."]
    +    pub voltage_5: u16,
    +    #[doc = "The interval between acoustic measurements."]
         pub ping_interval: u16,
    +    #[doc = "The current gain setting. 0: 0.6, 1: 1.8, 2: 5.5, 3: 12.9, 4: 30.2, 5: 66.1, 6: 144"]
    +    pub gain_setting: u8,
    +    #[doc = "The current operating mode of the device. 0: manual mode, 1: auto mode"]
    +    pub mode_auto: u8,
     }
    -impl SerializePayload for SetPingIntervalStruct {
    +impl SerializePayload for GeneralInfoStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
    +        buffer.extend_from_slice(&self.firmware_version_major.to_le_bytes());
    +        buffer.extend_from_slice(&self.firmware_version_minor.to_le_bytes());
    +        buffer.extend_from_slice(&self.voltage_5.to_le_bytes());
             buffer.extend_from_slice(&self.ping_interval.to_le_bytes());
    +        buffer.extend_from_slice(&self.gain_setting.to_le_bytes());
    +        buffer.extend_from_slice(&self.mode_auto.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for SetPingIntervalStruct {
    +impl DeserializePayload for GeneralInfoStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
    -            ping_interval: u16::from_le_bytes(
    +            firmware_version_major: u16::from_le_bytes(
                     payload[0usize..0usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
    +            firmware_version_minor: u16::from_le_bytes(
    +                payload[2usize..2usize + 2usize]
    +                    .try_into()
    +                    .expect("Wrong slice length"),
    +            ),
    +            voltage_5: u16::from_le_bytes(
    +                payload[4usize..4usize + 2usize]
    +                    .try_into()
    +                    .expect("Wrong slice length"),
    +            ),
    +            ping_interval: u16::from_le_bytes(
    +                payload[6usize..6usize + 2usize]
    +                    .try_into()
    +                    .expect("Wrong slice length"),
    +            ),
    +            gain_setting: payload[8usize].into(),
    +            mode_auto: payload[9usize].into(),
             }
         }
     }
     impl PingMessage for Messages {
    -    fn message_name(&self) -> &'static str {
    +    fn message_name(&self) -> &'static str {
             match self {
    -            Messages::SetGainSetting(..) => "set_gain_setting",
    -            Messages::ContinuousStart(..) => "continuous_start",
    -            Messages::ProcessorTemperature(..) => "processor_temperature",
    -            Messages::FirmwareVersion(..) => "firmware_version",
    -            Messages::PingEnable(..) => "ping_enable",
    -            Messages::SetPingEnable(..) => "set_ping_enable",
    -            Messages::DistanceSimple(..) => "distance_simple",
    -            Messages::GeneralInfo(..) => "general_info",
    -            Messages::SetSpeedOfSound(..) => "set_speed_of_sound",
    -            Messages::PcbTemperature(..) => "pcb_temperature",
    -            Messages::GotoBootloader(..) => "goto_bootloader",
    -            Messages::ModeAuto(..) => "mode_auto",
    -            Messages::SetDeviceId(..) => "set_device_id",
    -            Messages::ContinuousStop(..) => "continuous_stop",
    -            Messages::DeviceId(..) => "device_id",
    -            Messages::SetRange(..) => "set_range",
    -            Messages::Voltage5(..) => "voltage_5",
    -            Messages::Profile(..) => "profile",
    -            Messages::GainSetting(..) => "gain_setting",
    -            Messages::Range(..) => "range",
    -            Messages::Distance(..) => "distance",
    -            Messages::SpeedOfSound(..) => "speed_of_sound",
    -            Messages::SetModeAuto(..) => "set_mode_auto",
    -            Messages::TransmitDuration(..) => "transmit_duration",
    -            Messages::PingInterval(..) => "ping_interval",
    -            Messages::SetPingInterval(..) => "set_ping_interval",
    +            Messages::SetPingEnable(..) => "set_ping_enable",
    +            Messages::PcbTemperature(..) => "pcb_temperature",
    +            Messages::SpeedOfSound(..) => "speed_of_sound",
    +            Messages::Distance(..) => "distance",
    +            Messages::ProcessorTemperature(..) => "processor_temperature",
    +            Messages::Range(..) => "range",
    +            Messages::ContinuousStop(..) => "continuous_stop",
    +            Messages::PingInterval(..) => "ping_interval",
    +            Messages::ContinuousStart(..) => "continuous_start",
    +            Messages::SetDeviceId(..) => "set_device_id",
    +            Messages::GotoBootloader(..) => "goto_bootloader",
    +            Messages::SetPingInterval(..) => "set_ping_interval",
    +            Messages::DeviceId(..) => "device_id",
    +            Messages::Profile(..) => "profile",
    +            Messages::FirmwareVersion(..) => "firmware_version",
    +            Messages::TransmitDuration(..) => "transmit_duration",
    +            Messages::SetRange(..) => "set_range",
    +            Messages::SetModeAuto(..) => "set_mode_auto",
    +            Messages::Voltage5(..) => "voltage_5",
    +            Messages::ModeAuto(..) => "mode_auto",
    +            Messages::SetSpeedOfSound(..) => "set_speed_of_sound",
    +            Messages::GainSetting(..) => "gain_setting",
    +            Messages::PingEnable(..) => "ping_enable",
    +            Messages::DistanceSimple(..) => "distance_simple",
    +            Messages::SetGainSetting(..) => "set_gain_setting",
    +            Messages::GeneralInfo(..) => "general_info",
             }
         }
         fn message_id(&self) -> u16 {
             match self {
    -            Messages::SetGainSetting(..) => 1005u16,
    -            Messages::ContinuousStart(..) => 1400u16,
    -            Messages::ProcessorTemperature(..) => 1213u16,
    -            Messages::FirmwareVersion(..) => 1200u16,
    -            Messages::PingEnable(..) => 1215u16,
                 Messages::SetPingEnable(..) => 1006u16,
    -            Messages::DistanceSimple(..) => 1211u16,
    -            Messages::GeneralInfo(..) => 1210u16,
    -            Messages::SetSpeedOfSound(..) => 1002u16,
                 Messages::PcbTemperature(..) => 1214u16,
    -            Messages::GotoBootloader(..) => 1100u16,
    -            Messages::ModeAuto(..) => 1205u16,
    -            Messages::SetDeviceId(..) => 1000u16,
    +            Messages::SpeedOfSound(..) => 1203u16,
    +            Messages::Distance(..) => 1212u16,
    +            Messages::ProcessorTemperature(..) => 1213u16,
    +            Messages::Range(..) => 1204u16,
                 Messages::ContinuousStop(..) => 1401u16,
    +            Messages::PingInterval(..) => 1206u16,
    +            Messages::ContinuousStart(..) => 1400u16,
    +            Messages::SetDeviceId(..) => 1000u16,
    +            Messages::GotoBootloader(..) => 1100u16,
    +            Messages::SetPingInterval(..) => 1004u16,
                 Messages::DeviceId(..) => 1201u16,
    +            Messages::Profile(..) => 1300u16,
    +            Messages::FirmwareVersion(..) => 1200u16,
    +            Messages::TransmitDuration(..) => 1208u16,
                 Messages::SetRange(..) => 1001u16,
    +            Messages::SetModeAuto(..) => 1003u16,
                 Messages::Voltage5(..) => 1202u16,
    -            Messages::Profile(..) => 1300u16,
    +            Messages::ModeAuto(..) => 1205u16,
    +            Messages::SetSpeedOfSound(..) => 1002u16,
                 Messages::GainSetting(..) => 1207u16,
    -            Messages::Range(..) => 1204u16,
    -            Messages::Distance(..) => 1212u16,
    -            Messages::SpeedOfSound(..) => 1203u16,
    -            Messages::SetModeAuto(..) => 1003u16,
    -            Messages::TransmitDuration(..) => 1208u16,
    -            Messages::PingInterval(..) => 1206u16,
    -            Messages::SetPingInterval(..) => 1004u16,
    +            Messages::PingEnable(..) => 1215u16,
    +            Messages::DistanceSimple(..) => 1211u16,
    +            Messages::SetGainSetting(..) => 1005u16,
    +            Messages::GeneralInfo(..) => 1210u16,
             }
         }
         fn message_id_from_name(name: &str) -> Result<u16, String> {
             match name {
    -            "set_gain_setting" => Ok(1005u16),
    -            "continuous_start" => Ok(1400u16),
    -            "processor_temperature" => Ok(1213u16),
    -            "firmware_version" => Ok(1200u16),
    -            "ping_enable" => Ok(1215u16),
    -            "set_ping_enable" => Ok(1006u16),
    -            "distance_simple" => Ok(1211u16),
    -            "general_info" => Ok(1210u16),
    -            "set_speed_of_sound" => Ok(1002u16),
    -            "pcb_temperature" => Ok(1214u16),
    -            "goto_bootloader" => Ok(1100u16),
    -            "mode_auto" => Ok(1205u16),
    -            "set_device_id" => Ok(1000u16),
    -            "continuous_stop" => Ok(1401u16),
    -            "device_id" => Ok(1201u16),
    -            "set_range" => Ok(1001u16),
    -            "voltage_5" => Ok(1202u16),
    -            "profile" => Ok(1300u16),
    -            "gain_setting" => Ok(1207u16),
    -            "range" => Ok(1204u16),
    -            "distance" => Ok(1212u16),
    -            "speed_of_sound" => Ok(1203u16),
    -            "set_mode_auto" => Ok(1003u16),
    -            "transmit_duration" => Ok(1208u16),
    -            "ping_interval" => Ok(1206u16),
    -            "set_ping_interval" => Ok(1004u16),
    -            _ => Err(format!("Failed to find message ID from name: {name}.")),
    +            "set_ping_enable" => Ok(1006u16),
    +            "pcb_temperature" => Ok(1214u16),
    +            "speed_of_sound" => Ok(1203u16),
    +            "distance" => Ok(1212u16),
    +            "processor_temperature" => Ok(1213u16),
    +            "range" => Ok(1204u16),
    +            "continuous_stop" => Ok(1401u16),
    +            "ping_interval" => Ok(1206u16),
    +            "continuous_start" => Ok(1400u16),
    +            "set_device_id" => Ok(1000u16),
    +            "goto_bootloader" => Ok(1100u16),
    +            "set_ping_interval" => Ok(1004u16),
    +            "device_id" => Ok(1201u16),
    +            "profile" => Ok(1300u16),
    +            "firmware_version" => Ok(1200u16),
    +            "transmit_duration" => Ok(1208u16),
    +            "set_range" => Ok(1001u16),
    +            "set_mode_auto" => Ok(1003u16),
    +            "voltage_5" => Ok(1202u16),
    +            "mode_auto" => Ok(1205u16),
    +            "set_speed_of_sound" => Ok(1002u16),
    +            "gain_setting" => Ok(1207u16),
    +            "ping_enable" => Ok(1215u16),
    +            "distance_simple" => Ok(1211u16),
    +            "set_gain_setting" => Ok(1005u16),
    +            "general_info" => Ok(1210u16),
    +            _ => Err(format!("Failed to find message ID from name: {name}.")),
             }
         }
     }
     impl SerializePayload for Messages {
         fn serialize(&self) -> Vec<u8> {
             match self {
    -            Messages::SetGainSetting(content) => content.serialize(),
    -            Messages::ContinuousStart(content) => content.serialize(),
    -            Messages::ProcessorTemperature(content) => content.serialize(),
    -            Messages::FirmwareVersion(content) => content.serialize(),
    -            Messages::PingEnable(content) => content.serialize(),
                 Messages::SetPingEnable(content) => content.serialize(),
    -            Messages::DistanceSimple(content) => content.serialize(),
    -            Messages::GeneralInfo(content) => content.serialize(),
    -            Messages::SetSpeedOfSound(content) => content.serialize(),
                 Messages::PcbTemperature(content) => content.serialize(),
    -            Messages::GotoBootloader(content) => content.serialize(),
    -            Messages::ModeAuto(content) => content.serialize(),
    -            Messages::SetDeviceId(content) => content.serialize(),
    +            Messages::SpeedOfSound(content) => content.serialize(),
    +            Messages::Distance(content) => content.serialize(),
    +            Messages::ProcessorTemperature(content) => content.serialize(),
    +            Messages::Range(content) => content.serialize(),
                 Messages::ContinuousStop(content) => content.serialize(),
    +            Messages::PingInterval(content) => content.serialize(),
    +            Messages::ContinuousStart(content) => content.serialize(),
    +            Messages::SetDeviceId(content) => content.serialize(),
    +            Messages::GotoBootloader(content) => content.serialize(),
    +            Messages::SetPingInterval(content) => content.serialize(),
                 Messages::DeviceId(content) => content.serialize(),
    +            Messages::Profile(content) => content.serialize(),
    +            Messages::FirmwareVersion(content) => content.serialize(),
    +            Messages::TransmitDuration(content) => content.serialize(),
                 Messages::SetRange(content) => content.serialize(),
    +            Messages::SetModeAuto(content) => content.serialize(),
                 Messages::Voltage5(content) => content.serialize(),
    -            Messages::Profile(content) => content.serialize(),
    +            Messages::ModeAuto(content) => content.serialize(),
    +            Messages::SetSpeedOfSound(content) => content.serialize(),
                 Messages::GainSetting(content) => content.serialize(),
    -            Messages::Range(content) => content.serialize(),
    -            Messages::Distance(content) => content.serialize(),
    -            Messages::SpeedOfSound(content) => content.serialize(),
    -            Messages::SetModeAuto(content) => content.serialize(),
    -            Messages::TransmitDuration(content) => content.serialize(),
    -            Messages::PingInterval(content) => content.serialize(),
    -            Messages::SetPingInterval(content) => content.serialize(),
    +            Messages::PingEnable(content) => content.serialize(),
    +            Messages::DistanceSimple(content) => content.serialize(),
    +            Messages::SetGainSetting(content) => content.serialize(),
    +            Messages::GeneralInfo(content) => content.serialize(),
             }
         }
     }
     impl DeserializeGenericMessage for Messages {
    -    fn deserialize(message_id: u16, payload: &[u8]) -> Result<Self, &'static str> {
    +    fn deserialize(message_id: u16, payload: &[u8]) -> Result<Self, &'static str> {
             Ok(match message_id {
    -            1005u16 => Messages::SetGainSetting(SetGainSettingStruct::deserialize(payload)),
    -            1400u16 => Messages::ContinuousStart(ContinuousStartStruct::deserialize(payload)),
    +            1006u16 => Messages::SetPingEnable(SetPingEnableStruct::deserialize(payload)),
    +            1214u16 => Messages::PcbTemperature(PcbTemperatureStruct::deserialize(payload)),
    +            1203u16 => Messages::SpeedOfSound(SpeedOfSoundStruct::deserialize(payload)),
    +            1212u16 => Messages::Distance(DistanceStruct::deserialize(payload)),
                 1213u16 => {
                     Messages::ProcessorTemperature(ProcessorTemperatureStruct::deserialize(payload))
                 }
    -            1200u16 => Messages::FirmwareVersion(FirmwareVersionStruct::deserialize(payload)),
    -            1215u16 => Messages::PingEnable(PingEnableStruct::deserialize(payload)),
    -            1006u16 => Messages::SetPingEnable(SetPingEnableStruct::deserialize(payload)),
    -            1211u16 => Messages::DistanceSimple(DistanceSimpleStruct::deserialize(payload)),
    -            1210u16 => Messages::GeneralInfo(GeneralInfoStruct::deserialize(payload)),
    -            1002u16 => Messages::SetSpeedOfSound(SetSpeedOfSoundStruct::deserialize(payload)),
    -            1214u16 => Messages::PcbTemperature(PcbTemperatureStruct::deserialize(payload)),
    -            1100u16 => Messages::GotoBootloader(GotoBootloaderStruct::deserialize(payload)),
    -            1205u16 => Messages::ModeAuto(ModeAutoStruct::deserialize(payload)),
    -            1000u16 => Messages::SetDeviceId(SetDeviceIdStruct::deserialize(payload)),
    +            1204u16 => Messages::Range(RangeStruct::deserialize(payload)),
                 1401u16 => Messages::ContinuousStop(ContinuousStopStruct::deserialize(payload)),
    +            1206u16 => Messages::PingInterval(PingIntervalStruct::deserialize(payload)),
    +            1400u16 => Messages::ContinuousStart(ContinuousStartStruct::deserialize(payload)),
    +            1000u16 => Messages::SetDeviceId(SetDeviceIdStruct::deserialize(payload)),
    +            1100u16 => Messages::GotoBootloader(GotoBootloaderStruct::deserialize(payload)),
    +            1004u16 => Messages::SetPingInterval(SetPingIntervalStruct::deserialize(payload)),
                 1201u16 => Messages::DeviceId(DeviceIdStruct::deserialize(payload)),
    +            1300u16 => Messages::Profile(ProfileStruct::deserialize(payload)),
    +            1200u16 => Messages::FirmwareVersion(FirmwareVersionStruct::deserialize(payload)),
    +            1208u16 => Messages::TransmitDuration(TransmitDurationStruct::deserialize(payload)),
                 1001u16 => Messages::SetRange(SetRangeStruct::deserialize(payload)),
    +            1003u16 => Messages::SetModeAuto(SetModeAutoStruct::deserialize(payload)),
                 1202u16 => Messages::Voltage5(Voltage5Struct::deserialize(payload)),
    -            1300u16 => Messages::Profile(ProfileStruct::deserialize(payload)),
    +            1205u16 => Messages::ModeAuto(ModeAutoStruct::deserialize(payload)),
    +            1002u16 => Messages::SetSpeedOfSound(SetSpeedOfSoundStruct::deserialize(payload)),
                 1207u16 => Messages::GainSetting(GainSettingStruct::deserialize(payload)),
    -            1204u16 => Messages::Range(RangeStruct::deserialize(payload)),
    -            1212u16 => Messages::Distance(DistanceStruct::deserialize(payload)),
    -            1203u16 => Messages::SpeedOfSound(SpeedOfSoundStruct::deserialize(payload)),
    -            1003u16 => Messages::SetModeAuto(SetModeAutoStruct::deserialize(payload)),
    -            1208u16 => Messages::TransmitDuration(TransmitDurationStruct::deserialize(payload)),
    -            1206u16 => Messages::PingInterval(PingIntervalStruct::deserialize(payload)),
    -            1004u16 => Messages::SetPingInterval(SetPingIntervalStruct::deserialize(payload)),
    +            1215u16 => Messages::PingEnable(PingEnableStruct::deserialize(payload)),
    +            1211u16 => Messages::DistanceSimple(DistanceSimpleStruct::deserialize(payload)),
    +            1005u16 => Messages::SetGainSetting(SetGainSettingStruct::deserialize(payload)),
    +            1210u16 => Messages::GeneralInfo(GeneralInfoStruct::deserialize(payload)),
                 _ => {
    -                return Err(&"Unknown message id");
    +                return Err(&"Unknown message id");
                 }
             })
         }
    diff --git a/src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-d6dfbce8a49b4140/out/ping360.rs.html b/src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-b755b5855bdec7a7/out/ping360.rs.html
    similarity index 73%
    rename from src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-d6dfbce8a49b4140/out/ping360.rs.html
    rename to src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-b755b5855bdec7a7/out/ping360.rs.html
    index 9f4a4eab7..c6eb1258d 100644
    --- a/src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-d6dfbce8a49b4140/out/ping360.rs.html
    +++ b/src/ping_rs/home/runner/work/ping-rs/ping-rs/target/debug/build/ping-rs-b755b5855bdec7a7/out/ping360.rs.html
    @@ -1,4 +1,5 @@
    -ping360.rs - source
    1
    +ping360.rs - source
    +    
    1
     2
     3
     4
    @@ -482,124 +483,130 @@
     use crate::message::DeserializePayload;
     use crate::message::PingMessage;
     use crate::message::SerializePayload;
    -#[cfg(feature = "serde")]
    +#[cfg(feature = "serde")]
     use serde::{Deserialize, Serialize};
     use std::convert::TryInto;
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
     pub struct PingProtocolHead {
         pub source_device_id: u8,
         pub destiny_device_id: u8,
     }
     #[derive(Debug, Clone, PartialEq)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
     pub enum Messages {
    -    DeviceData(DeviceDataStruct),
    -    Transducer(TransducerStruct),
         AutoTransmit(AutoTransmitStruct),
    +    DeviceData(DeviceDataStruct),
         Reset(ResetStruct),
    -    MotorOff(MotorOffStruct),
         AutoDeviceData(AutoDeviceDataStruct),
    +    Transducer(TransducerStruct),
    +    MotorOff(MotorOffStruct),
         DeviceId(DeviceIdStruct),
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "This message is used to communicate the current sonar state. If the data field is populated, the other fields indicate the sonar state when the data was captured. The time taken before the response to the command is sent depends on the difference between the last angle scanned and the new angle in the parameters as well as the number of samples and sample interval (range). To allow for the worst case reponse time the command timeout should be set to 4000 msec."]
    -pub struct DeviceDataStruct {
    -    #[doc = "Operating mode (1 for Ping360)"]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Extended *transducer* message with auto-scan function. The sonar will automatically scan the region between start_angle and end_angle and send auto_device_data messages as soon as new data is available. Send a line break to stop scanning (and also begin the autobaudrate procedure). Alternatively, a motor_off message may be sent (but retrys might be necessary on the half-duplex RS485 interface)."]
    +pub struct AutoTransmitStruct {
    +    #[doc = "Operating mode (1 for Ping360)"]
         pub mode: u8,
    -    #[doc = "Analog gain setting (0 = low, 1 = normal, 2 = high)"]
    +    #[doc = "Analog gain setting (0 = low, 1 = normal, 2 = high)"]
         pub gain_setting: u8,
    -    #[doc = "Head angle"]
    -    pub angle: u16,
    -    #[doc = "Acoustic transmission duration (1~1000 microseconds)"]
    +    #[doc = "Acoustic transmission duration (1~1000 microseconds)"]
         pub transmit_duration: u16,
    -    #[doc = "Time interval between individual signal intensity samples in 25nsec increments (80 to 40000 == 2 microseconds to 1000 microseconds)"]
    +    #[doc = "Time interval between individual signal intensity samples in 25nsec increments (80 to 40000 == 2 microseconds to 1000 microseconds)"]
         pub sample_period: u16,
    -    #[doc = "Acoustic operating frequency. Frequency range is 500kHz to 1000kHz, however it is only practical to use say 650kHz to 850kHz due to the narrow bandwidth of the acoustic receiver."]
    +    #[doc = "Acoustic operating frequency. Frequency range is 500kHz to 1000kHz, however it is only practical to use say 650kHz to 850kHz due to the narrow bandwidth of the acoustic receiver."]
         pub transmit_frequency: u16,
    -    #[doc = "Number of samples per reflected signal"]
    +    #[doc = "Number of samples per reflected signal"]
         pub number_of_samples: u16,
    -    #[doc = "8 bit binary data array representing sonar echo strength"]
    -    pub data_length: u16,
    -    pub data: Vec<u8>,
    +    #[doc = "Head angle to begin scan sector for autoscan in gradians (0~399 = 0~360 degrees)."]
    +    pub start_angle: u16,
    +    #[doc = "Head angle to end scan sector for autoscan in gradians (0~399 = 0~360 degrees)."]
    +    pub stop_angle: u16,
    +    #[doc = "Number of 0.9 degree motor steps between pings for auto scan (1~10 = 0.9~9.0 degrees)"]
    +    pub num_steps: u8,
    +    #[doc = "An additional delay between successive transmit pulses (0~100 ms). This may be necessary for some programs to avoid collisions on the RS485 USRT."]
    +    pub delay: u8,
     }
    -impl SerializePayload for DeviceDataStruct {
    +impl SerializePayload for AutoTransmitStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
             buffer.extend_from_slice(&self.mode.to_le_bytes());
             buffer.extend_from_slice(&self.gain_setting.to_le_bytes());
    -        buffer.extend_from_slice(&self.angle.to_le_bytes());
             buffer.extend_from_slice(&self.transmit_duration.to_le_bytes());
             buffer.extend_from_slice(&self.sample_period.to_le_bytes());
             buffer.extend_from_slice(&self.transmit_frequency.to_le_bytes());
             buffer.extend_from_slice(&self.number_of_samples.to_le_bytes());
    -        buffer.extend_from_slice(&self.data_length.to_le_bytes());
    -        for value in self.data.iter() {
    -            buffer.extend_from_slice(&value.to_le_bytes());
    -        }
    +        buffer.extend_from_slice(&self.start_angle.to_le_bytes());
    +        buffer.extend_from_slice(&self.stop_angle.to_le_bytes());
    +        buffer.extend_from_slice(&self.num_steps.to_le_bytes());
    +        buffer.extend_from_slice(&self.delay.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for DeviceDataStruct {
    +impl DeserializePayload for AutoTransmitStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
                 mode: payload[0usize].into(),
                 gain_setting: payload[1usize].into(),
    -            angle: u16::from_le_bytes(
    +            transmit_duration: u16::from_le_bytes(
                     payload[2usize..2usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
    -            transmit_duration: u16::from_le_bytes(
    +            sample_period: u16::from_le_bytes(
                     payload[4usize..4usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
    -            sample_period: u16::from_le_bytes(
    +            transmit_frequency: u16::from_le_bytes(
                     payload[6usize..6usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
    -            transmit_frequency: u16::from_le_bytes(
    +            number_of_samples: u16::from_le_bytes(
                     payload[8usize..8usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
    -            number_of_samples: u16::from_le_bytes(
    +            start_angle: u16::from_le_bytes(
                     payload[10usize..10usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
    -            data_length: payload.len() as u16,
    -            data: payload[12usize..12usize + payload.len()].to_vec(),
    +            stop_angle: u16::from_le_bytes(
    +                payload[12usize..12usize + 2usize]
    +                    .try_into()
    +                    .expect("Wrong slice length"),
    +            ),
    +            num_steps: payload[14usize].into(),
    +            delay: payload[15usize].into(),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "The transducer will apply the commanded settings. The sonar will reply with a `ping360_data` message. If the `transmit` field is 0, the sonar will not transmit after locating the transducer, and the `data` field in the `ping360_data` message reply will be empty. If the `transmit` field is 1, the sonar will make an acoustic transmission after locating the transducer, and the resulting data will be uploaded in the `data` field of the `ping360_data` message reply. To allow for the worst case reponse time the command timeout should be set to 4000 msec."]
    -pub struct TransducerStruct {
    -    #[doc = "Operating mode (1 for Ping360)"]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "This message is used to communicate the current sonar state. If the data field is populated, the other fields indicate the sonar state when the data was captured. The time taken before the response to the command is sent depends on the difference between the last angle scanned and the new angle in the parameters as well as the number of samples and sample interval (range). To allow for the worst case reponse time the command timeout should be set to 4000 msec."]
    +pub struct DeviceDataStruct {
    +    #[doc = "Operating mode (1 for Ping360)"]
         pub mode: u8,
    -    #[doc = "Analog gain setting (0 = low, 1 = normal, 2 = high)"]
    +    #[doc = "Analog gain setting (0 = low, 1 = normal, 2 = high)"]
         pub gain_setting: u8,
    -    #[doc = "Head angle"]
    +    #[doc = "Head angle"]
         pub angle: u16,
    -    #[doc = "Acoustic transmission duration (1~1000 microseconds)"]
    +    #[doc = "Acoustic transmission duration (1~1000 microseconds)"]
         pub transmit_duration: u16,
    -    #[doc = "Time interval between individual signal intensity samples in 25nsec increments (80 to 40000 == 2 microseconds to 1000 microseconds)"]
    +    #[doc = "Time interval between individual signal intensity samples in 25nsec increments (80 to 40000 == 2 microseconds to 1000 microseconds)"]
         pub sample_period: u16,
    -    #[doc = "Acoustic operating frequency. Frequency range is 500kHz to 1000kHz, however it is only practical to use say 650kHz to 850kHz due to the narrow bandwidth of the acoustic receiver."]
    +    #[doc = "Acoustic operating frequency. Frequency range is 500kHz to 1000kHz, however it is only practical to use say 650kHz to 850kHz due to the narrow bandwidth of the acoustic receiver."]
         pub transmit_frequency: u16,
    -    #[doc = "Number of samples per reflected signal"]
    +    #[doc = "Number of samples per reflected signal"]
         pub number_of_samples: u16,
    -    #[doc = "0 = do not transmit; 1 = transmit after the transducer has reached the specified angle"]
    -    pub transmit: u8,
    -    #[doc = "reserved"]
    -    pub reserved: u8,
    +    #[doc = "8 bit binary data array representing sonar echo strength"]
    +    pub data_length: u16,
    +    pub data: Vec<u8>,
     }
    -impl SerializePayload for TransducerStruct {
    +impl SerializePayload for DeviceDataStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
             buffer.extend_from_slice(&self.mode.to_le_bytes());
    @@ -609,12 +616,14 @@
             buffer.extend_from_slice(&self.sample_period.to_le_bytes());
             buffer.extend_from_slice(&self.transmit_frequency.to_le_bytes());
             buffer.extend_from_slice(&self.number_of_samples.to_le_bytes());
    -        buffer.extend_from_slice(&self.transmit.to_le_bytes());
    -        buffer.extend_from_slice(&self.reserved.to_le_bytes());
    +        buffer.extend_from_slice(&self.data_length.to_le_bytes());
    +        for value in self.data.iter() {
    +            buffer.extend_from_slice(&value.to_le_bytes());
    +        }
             buffer
         }
     }
    -impl DeserializePayload for TransducerStruct {
    +impl DeserializePayload for DeviceDataStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
                 mode: payload[0usize].into(),
    @@ -622,185 +631,180 @@
                 angle: u16::from_le_bytes(
                     payload[2usize..2usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
                 transmit_duration: u16::from_le_bytes(
                     payload[4usize..4usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
                 sample_period: u16::from_le_bytes(
                     payload[6usize..6usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
                 transmit_frequency: u16::from_le_bytes(
                     payload[8usize..8usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
                 number_of_samples: u16::from_le_bytes(
                     payload[10usize..10usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
    -            transmit: payload[12usize].into(),
    -            reserved: payload[13usize].into(),
    +            data_length: payload.len() as u16,
    +            data: payload[12usize..12usize + payload.len()].to_vec(),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Extended *transducer* message with auto-scan function. The sonar will automatically scan the region between start_angle and end_angle and send auto_device_data messages as soon as new data is available. Send a line break to stop scanning (and also begin the autobaudrate procedure). Alternatively, a motor_off message may be sent (but retrys might be necessary on the half-duplex RS485 interface)."]
    -pub struct AutoTransmitStruct {
    -    #[doc = "Operating mode (1 for Ping360)"]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Reset the sonar. The bootloader may run depending on the selection according to the `bootloader` payload field. When the bootloader runs, the external LED flashes at 5Hz. If the bootloader is not contacted within 5 seconds, it will run the current program. If there is no program, then the bootloader will wait forever for a connection. Note that if you issue a reset then you will have to close all your open comm ports and go back to issuing either a discovery message for UDP or go through the break sequence for serial comms before you can talk to the sonar again."]
    +pub struct ResetStruct {
    +    #[doc = "0 = skip bootloader; 1 = run bootloader"]
    +    pub bootloader: u8,
    +    #[doc = "reserved"]
    +    pub reserved: u8,
    +}
    +impl SerializePayload for ResetStruct {
    +    fn serialize(&self) -> Vec<u8> {
    +        let mut buffer: Vec<u8> = Default::default();
    +        buffer.extend_from_slice(&self.bootloader.to_le_bytes());
    +        buffer.extend_from_slice(&self.reserved.to_le_bytes());
    +        buffer
    +    }
    +}
    +impl DeserializePayload for ResetStruct {
    +    fn deserialize(payload: &[u8]) -> Self {
    +        Self {
    +            bootloader: payload[0usize].into(),
    +            reserved: payload[1usize].into(),
    +        }
    +    }
    +}
    +#[derive(Debug, Clone, PartialEq, Default)]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Extended version of *device_data* with *auto_transmit* information. The sensor emits this message when in *auto_transmit* mode."]
    +pub struct AutoDeviceDataStruct {
    +    #[doc = "Operating mode (1 for Ping360)"]
         pub mode: u8,
    -    #[doc = "Analog gain setting (0 = low, 1 = normal, 2 = high)"]
    +    #[doc = "Analog gain setting (0 = low, 1 = normal, 2 = high)"]
         pub gain_setting: u8,
    -    #[doc = "Acoustic transmission duration (1~1000 microseconds)"]
    +    #[doc = "Head angle"]
    +    pub angle: u16,
    +    #[doc = "Acoustic transmission duration (1~1000 microseconds)"]
         pub transmit_duration: u16,
    -    #[doc = "Time interval between individual signal intensity samples in 25nsec increments (80 to 40000 == 2 microseconds to 1000 microseconds)"]
    +    #[doc = "Time interval between individual signal intensity samples in 25nsec increments (80 to 40000 == 2 microseconds to 1000 microseconds)"]
         pub sample_period: u16,
    -    #[doc = "Acoustic operating frequency. Frequency range is 500kHz to 1000kHz, however it is only practical to use say 650kHz to 850kHz due to the narrow bandwidth of the acoustic receiver."]
    +    #[doc = "Acoustic operating frequency. Frequency range is 500kHz to 1000kHz, however it is only practical to use say 650kHz to 850kHz due to the narrow bandwidth of the acoustic receiver."]
         pub transmit_frequency: u16,
    -    #[doc = "Number of samples per reflected signal"]
    -    pub number_of_samples: u16,
    -    #[doc = "Head angle to begin scan sector for autoscan in gradians (0~399 = 0~360 degrees)."]
    +    #[doc = "Head angle to begin scan sector for autoscan in gradians (0~399 = 0~360 degrees)."]
         pub start_angle: u16,
    -    #[doc = "Head angle to end scan sector for autoscan in gradians (0~399 = 0~360 degrees)."]
    +    #[doc = "Head angle to end scan sector for autoscan in gradians (0~399 = 0~360 degrees)."]
         pub stop_angle: u16,
    -    #[doc = "Number of 0.9 degree motor steps between pings for auto scan (1~10 = 0.9~9.0 degrees)"]
    +    #[doc = "Number of 0.9 degree motor steps between pings for auto scan (1~10 = 0.9~9.0 degrees)"]
         pub num_steps: u8,
    -    #[doc = "An additional delay between successive transmit pulses (0~100 ms). This may be necessary for some programs to avoid collisions on the RS485 USRT."]
    +    #[doc = "An additional delay between successive transmit pulses (0~100 ms). This may be necessary for some programs to avoid collisions on the RS485 USRT."]
         pub delay: u8,
    +    #[doc = "Number of samples per reflected signal"]
    +    pub number_of_samples: u16,
    +    #[doc = "8 bit binary data array representing sonar echo strength"]
    +    pub data_length: u16,
    +    pub data: Vec<u8>,
     }
    -impl SerializePayload for AutoTransmitStruct {
    +impl SerializePayload for AutoDeviceDataStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
             buffer.extend_from_slice(&self.mode.to_le_bytes());
             buffer.extend_from_slice(&self.gain_setting.to_le_bytes());
    +        buffer.extend_from_slice(&self.angle.to_le_bytes());
             buffer.extend_from_slice(&self.transmit_duration.to_le_bytes());
             buffer.extend_from_slice(&self.sample_period.to_le_bytes());
             buffer.extend_from_slice(&self.transmit_frequency.to_le_bytes());
    -        buffer.extend_from_slice(&self.number_of_samples.to_le_bytes());
             buffer.extend_from_slice(&self.start_angle.to_le_bytes());
             buffer.extend_from_slice(&self.stop_angle.to_le_bytes());
             buffer.extend_from_slice(&self.num_steps.to_le_bytes());
             buffer.extend_from_slice(&self.delay.to_le_bytes());
    +        buffer.extend_from_slice(&self.number_of_samples.to_le_bytes());
    +        buffer.extend_from_slice(&self.data_length.to_le_bytes());
    +        for value in self.data.iter() {
    +            buffer.extend_from_slice(&value.to_le_bytes());
    +        }
             buffer
         }
     }
    -impl DeserializePayload for AutoTransmitStruct {
    +impl DeserializePayload for AutoDeviceDataStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
                 mode: payload[0usize].into(),
                 gain_setting: payload[1usize].into(),
    -            transmit_duration: u16::from_le_bytes(
    +            angle: u16::from_le_bytes(
                     payload[2usize..2usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
    -            sample_period: u16::from_le_bytes(
    +            transmit_duration: u16::from_le_bytes(
                     payload[4usize..4usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
    -            transmit_frequency: u16::from_le_bytes(
    +            sample_period: u16::from_le_bytes(
                     payload[6usize..6usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
    -            number_of_samples: u16::from_le_bytes(
    +            transmit_frequency: u16::from_le_bytes(
                     payload[8usize..8usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
                 start_angle: u16::from_le_bytes(
                     payload[10usize..10usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
                 stop_angle: u16::from_le_bytes(
                     payload[12usize..12usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
                 num_steps: payload[14usize].into(),
                 delay: payload[15usize].into(),
    +            number_of_samples: u16::from_le_bytes(
    +                payload[16usize..16usize + 2usize]
    +                    .try_into()
    +                    .expect("Wrong slice length"),
    +            ),
    +            data_length: payload.len() as u16,
    +            data: payload[18usize..18usize + payload.len()].to_vec(),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Reset the sonar. The bootloader may run depending on the selection according to the `bootloader` payload field. When the bootloader runs, the external LED flashes at 5Hz. If the bootloader is not contacted within 5 seconds, it will run the current program. If there is no program, then the bootloader will wait forever for a connection. Note that if you issue a reset then you will have to close all your open comm ports and go back to issuing either a discovery message for UDP or go through the break sequence for serial comms before you can talk to the sonar again."]
    -pub struct ResetStruct {
    -    #[doc = "0 = skip bootloader; 1 = run bootloader"]
    -    pub bootloader: u8,
    -    #[doc = "reserved"]
    -    pub reserved: u8,
    -}
    -impl SerializePayload for ResetStruct {
    -    fn serialize(&self) -> Vec<u8> {
    -        let mut buffer: Vec<u8> = Default::default();
    -        buffer.extend_from_slice(&self.bootloader.to_le_bytes());
    -        buffer.extend_from_slice(&self.reserved.to_le_bytes());
    -        buffer
    -    }
    -}
    -impl DeserializePayload for ResetStruct {
    -    fn deserialize(payload: &[u8]) -> Self {
    -        Self {
    -            bootloader: payload[0usize].into(),
    -            reserved: payload[1usize].into(),
    -        }
    -    }
    -}
    -#[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "The sonar switches the current through the stepper motor windings off to save power. The sonar will send an ack message in response. The command timeout should be set to 50 msec. If the sonar is idle (not scanning) for more than 30 seconds then the motor current will automatically turn off. When the user sends any command that involves moving the transducer then the motor current is automatically re-enabled."]
    -pub struct MotorOffStruct {}
    -impl SerializePayload for MotorOffStruct {
    -    fn serialize(&self) -> Vec<u8> {
    -        let mut buffer: Vec<u8> = Default::default();
    -        buffer
    -    }
    -}
    -impl DeserializePayload for MotorOffStruct {
    -    fn deserialize(payload: &[u8]) -> Self {
    -        Self {}
    -    }
    -}
    -#[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Extended version of *device_data* with *auto_transmit* information. The sensor emits this message when in *auto_transmit* mode."]
    -pub struct AutoDeviceDataStruct {
    -    #[doc = "Operating mode (1 for Ping360)"]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "The transducer will apply the commanded settings. The sonar will reply with a `ping360_data` message. If the `transmit` field is 0, the sonar will not transmit after locating the transducer, and the `data` field in the `ping360_data` message reply will be empty. If the `transmit` field is 1, the sonar will make an acoustic transmission after locating the transducer, and the resulting data will be uploaded in the `data` field of the `ping360_data` message reply. To allow for the worst case reponse time the command timeout should be set to 4000 msec."]
    +pub struct TransducerStruct {
    +    #[doc = "Operating mode (1 for Ping360)"]
         pub mode: u8,
    -    #[doc = "Analog gain setting (0 = low, 1 = normal, 2 = high)"]
    +    #[doc = "Analog gain setting (0 = low, 1 = normal, 2 = high)"]
         pub gain_setting: u8,
    -    #[doc = "Head angle"]
    +    #[doc = "Head angle"]
         pub angle: u16,
    -    #[doc = "Acoustic transmission duration (1~1000 microseconds)"]
    +    #[doc = "Acoustic transmission duration (1~1000 microseconds)"]
         pub transmit_duration: u16,
    -    #[doc = "Time interval between individual signal intensity samples in 25nsec increments (80 to 40000 == 2 microseconds to 1000 microseconds)"]
    +    #[doc = "Time interval between individual signal intensity samples in 25nsec increments (80 to 40000 == 2 microseconds to 1000 microseconds)"]
         pub sample_period: u16,
    -    #[doc = "Acoustic operating frequency. Frequency range is 500kHz to 1000kHz, however it is only practical to use say 650kHz to 850kHz due to the narrow bandwidth of the acoustic receiver."]
    +    #[doc = "Acoustic operating frequency. Frequency range is 500kHz to 1000kHz, however it is only practical to use say 650kHz to 850kHz due to the narrow bandwidth of the acoustic receiver."]
         pub transmit_frequency: u16,
    -    #[doc = "Head angle to begin scan sector for autoscan in gradians (0~399 = 0~360 degrees)."]
    -    pub start_angle: u16,
    -    #[doc = "Head angle to end scan sector for autoscan in gradians (0~399 = 0~360 degrees)."]
    -    pub stop_angle: u16,
    -    #[doc = "Number of 0.9 degree motor steps between pings for auto scan (1~10 = 0.9~9.0 degrees)"]
    -    pub num_steps: u8,
    -    #[doc = "An additional delay between successive transmit pulses (0~100 ms). This may be necessary for some programs to avoid collisions on the RS485 USRT."]
    -    pub delay: u8,
    -    #[doc = "Number of samples per reflected signal"]
    +    #[doc = "Number of samples per reflected signal"]
         pub number_of_samples: u16,
    -    #[doc = "8 bit binary data array representing sonar echo strength"]
    -    pub data_length: u16,
    -    pub data: Vec<u8>,
    +    #[doc = "0 = do not transmit; 1 = transmit after the transducer has reached the specified angle"]
    +    pub transmit: u8,
    +    #[doc = "reserved"]
    +    pub reserved: u8,
     }
    -impl SerializePayload for AutoDeviceDataStruct {
    +impl SerializePayload for TransducerStruct {
         fn serialize(&self) -> Vec<u8> {
             let mut buffer: Vec<u8> = Default::default();
             buffer.extend_from_slice(&self.mode.to_le_bytes());
    @@ -809,19 +813,13 @@
             buffer.extend_from_slice(&self.transmit_duration.to_le_bytes());
             buffer.extend_from_slice(&self.sample_period.to_le_bytes());
             buffer.extend_from_slice(&self.transmit_frequency.to_le_bytes());
    -        buffer.extend_from_slice(&self.start_angle.to_le_bytes());
    -        buffer.extend_from_slice(&self.stop_angle.to_le_bytes());
    -        buffer.extend_from_slice(&self.num_steps.to_le_bytes());
    -        buffer.extend_from_slice(&self.delay.to_le_bytes());
             buffer.extend_from_slice(&self.number_of_samples.to_le_bytes());
    -        buffer.extend_from_slice(&self.data_length.to_le_bytes());
    -        for value in self.data.iter() {
    -            buffer.extend_from_slice(&value.to_le_bytes());
    -        }
    +        buffer.extend_from_slice(&self.transmit.to_le_bytes());
    +        buffer.extend_from_slice(&self.reserved.to_le_bytes());
             buffer
         }
     }
    -impl DeserializePayload for AutoDeviceDataStruct {
    +impl DeserializePayload for TransducerStruct {
         fn deserialize(payload: &[u8]) -> Self {
             Self {
                 mode: payload[0usize].into(),
    @@ -829,52 +827,55 @@
                 angle: u16::from_le_bytes(
                     payload[2usize..2usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
                 transmit_duration: u16::from_le_bytes(
                     payload[4usize..4usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
                 sample_period: u16::from_le_bytes(
                     payload[6usize..6usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
                 transmit_frequency: u16::from_le_bytes(
                     payload[8usize..8usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    -            ),
    -            start_angle: u16::from_le_bytes(
    -                payload[10usize..10usize + 2usize]
    -                    .try_into()
    -                    .expect("Wrong slice length"),
    -            ),
    -            stop_angle: u16::from_le_bytes(
    -                payload[12usize..12usize + 2usize]
    -                    .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
    -            num_steps: payload[14usize].into(),
    -            delay: payload[15usize].into(),
                 number_of_samples: u16::from_le_bytes(
    -                payload[16usize..16usize + 2usize]
    +                payload[10usize..10usize + 2usize]
                         .try_into()
    -                    .expect("Wrong slice length"),
    +                    .expect("Wrong slice length"),
                 ),
    -            data_length: payload.len() as u16,
    -            data: payload[18usize..18usize + payload.len()].to_vec(),
    +            transmit: payload[12usize].into(),
    +            reserved: payload[13usize].into(),
             }
         }
     }
     #[derive(Debug, Clone, PartialEq, Default)]
    -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    -#[doc = "Change the device id"]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "The sonar switches the current through the stepper motor windings off to save power. The sonar will send an ack message in response. The command timeout should be set to 50 msec. If the sonar is idle (not scanning) for more than 30 seconds then the motor current will automatically turn off. When the user sends any command that involves moving the transducer then the motor current is automatically re-enabled."]
    +pub struct MotorOffStruct {}
    +impl SerializePayload for MotorOffStruct {
    +    fn serialize(&self) -> Vec<u8> {
    +        let mut buffer: Vec<u8> = Default::default();
    +        buffer
    +    }
    +}
    +impl DeserializePayload for MotorOffStruct {
    +    fn deserialize(payload: &[u8]) -> Self {
    +        Self {}
    +    }
    +}
    +#[derive(Debug, Clone, PartialEq, Default)]
    +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    +#[doc = "Change the device id"]
     pub struct DeviceIdStruct {
    -    #[doc = "Device ID (1-254). 0 and 255 are reserved."]
    +    #[doc = "Device ID (1-254). 0 and 255 are reserved."]
         pub id: u8,
    -    #[doc = "reserved"]
    +    #[doc = "reserved"]
         pub reserved: u8,
     }
     impl SerializePayload for DeviceIdStruct {
    @@ -894,66 +895,66 @@
         }
     }
     impl PingMessage for Messages {
    -    fn message_name(&self) -> &'static str {
    +    fn message_name(&self) -> &'static str {
             match self {
    -            Messages::DeviceData(..) => "device_data",
    -            Messages::Transducer(..) => "transducer",
    -            Messages::AutoTransmit(..) => "auto_transmit",
    -            Messages::Reset(..) => "reset",
    -            Messages::MotorOff(..) => "motor_off",
    -            Messages::AutoDeviceData(..) => "auto_device_data",
    -            Messages::DeviceId(..) => "device_id",
    +            Messages::AutoTransmit(..) => "auto_transmit",
    +            Messages::DeviceData(..) => "device_data",
    +            Messages::Reset(..) => "reset",
    +            Messages::AutoDeviceData(..) => "auto_device_data",
    +            Messages::Transducer(..) => "transducer",
    +            Messages::MotorOff(..) => "motor_off",
    +            Messages::DeviceId(..) => "device_id",
             }
         }
         fn message_id(&self) -> u16 {
             match self {
    -            Messages::DeviceData(..) => 2300u16,
    -            Messages::Transducer(..) => 2601u16,
                 Messages::AutoTransmit(..) => 2602u16,
    +            Messages::DeviceData(..) => 2300u16,
                 Messages::Reset(..) => 2600u16,
    -            Messages::MotorOff(..) => 2903u16,
                 Messages::AutoDeviceData(..) => 2301u16,
    +            Messages::Transducer(..) => 2601u16,
    +            Messages::MotorOff(..) => 2903u16,
                 Messages::DeviceId(..) => 2000u16,
             }
         }
         fn message_id_from_name(name: &str) -> Result<u16, String> {
             match name {
    -            "device_data" => Ok(2300u16),
    -            "transducer" => Ok(2601u16),
    -            "auto_transmit" => Ok(2602u16),
    -            "reset" => Ok(2600u16),
    -            "motor_off" => Ok(2903u16),
    -            "auto_device_data" => Ok(2301u16),
    -            "device_id" => Ok(2000u16),
    -            _ => Err(format!("Failed to find message ID from name: {name}.")),
    +            "auto_transmit" => Ok(2602u16),
    +            "device_data" => Ok(2300u16),
    +            "reset" => Ok(2600u16),
    +            "auto_device_data" => Ok(2301u16),
    +            "transducer" => Ok(2601u16),
    +            "motor_off" => Ok(2903u16),
    +            "device_id" => Ok(2000u16),
    +            _ => Err(format!("Failed to find message ID from name: {name}.")),
             }
         }
     }
     impl SerializePayload for Messages {
         fn serialize(&self) -> Vec<u8> {
             match self {
    -            Messages::DeviceData(content) => content.serialize(),
    -            Messages::Transducer(content) => content.serialize(),
                 Messages::AutoTransmit(content) => content.serialize(),
    +            Messages::DeviceData(content) => content.serialize(),
                 Messages::Reset(content) => content.serialize(),
    -            Messages::MotorOff(content) => content.serialize(),
                 Messages::AutoDeviceData(content) => content.serialize(),
    +            Messages::Transducer(content) => content.serialize(),
    +            Messages::MotorOff(content) => content.serialize(),
                 Messages::DeviceId(content) => content.serialize(),
             }
         }
     }
     impl DeserializeGenericMessage for Messages {
    -    fn deserialize(message_id: u16, payload: &[u8]) -> Result<Self, &'static str> {
    +    fn deserialize(message_id: u16, payload: &[u8]) -> Result<Self, &'static str> {
             Ok(match message_id {
    -            2300u16 => Messages::DeviceData(DeviceDataStruct::deserialize(payload)),
    -            2601u16 => Messages::Transducer(TransducerStruct::deserialize(payload)),
                 2602u16 => Messages::AutoTransmit(AutoTransmitStruct::deserialize(payload)),
    +            2300u16 => Messages::DeviceData(DeviceDataStruct::deserialize(payload)),
                 2600u16 => Messages::Reset(ResetStruct::deserialize(payload)),
    -            2903u16 => Messages::MotorOff(MotorOffStruct::deserialize(payload)),
                 2301u16 => Messages::AutoDeviceData(AutoDeviceDataStruct::deserialize(payload)),
    +            2601u16 => Messages::Transducer(TransducerStruct::deserialize(payload)),
    +            2903u16 => Messages::MotorOff(MotorOffStruct::deserialize(payload)),
                 2000u16 => Messages::DeviceId(DeviceIdStruct::deserialize(payload)),
                 _ => {
    -                return Err(&"Unknown message id");
    +                return Err(&"Unknown message id");
                 }
             })
         }
    diff --git a/src/ping_rs/lib.rs.html b/src/ping_rs/lib.rs.html
    index 333e4d281..0658d8ea4 100644
    --- a/src/ping_rs/lib.rs.html
    +++ b/src/ping_rs/lib.rs.html
    @@ -1,4 +1,5 @@
    -lib.rs - source
    1
    +lib.rs - source
    +    
    1
     2
     3
     4
    @@ -14,7 +15,7 @@
     14
     15
     16
    -
    include!(concat!(env!("OUT_DIR"), "/mod.rs"));
    +
    include!(concat!(env!("OUT_DIR"), "/mod.rs"));
     
     use message::ProtocolMessage;
     
    diff --git a/src/ping_rs/message.rs.html b/src/ping_rs/message.rs.html
    index 6fc3bb75a..87ff856eb 100644
    --- a/src/ping_rs/message.rs.html
    +++ b/src/ping_rs/message.rs.html
    @@ -1,4 +1,5 @@
    -message.rs - source
    1
    +message.rs - source
    +    
    1
     2
     3
     4
    @@ -143,7 +144,7 @@
     143
     
    use std::io::Write;
     
    -pub const HEADER: [u8; 2] = ['B' as u8, 'R' as u8];
    +pub const HEADER: [u8; 2] = ['B' as u8, 'R' as u8];
     
     #[derive(Clone, Debug, Default)]
     pub struct ProtocolMessage {
    @@ -163,8 +164,8 @@
          *
          * | Byte        | Type | Name           | Description                                                                                               |
          * |-------------|------|----------------|-----------------------------------------------------------------------------------------------------------|
    -     * | 0           | u8   | start1         | Start frame identifier, ASCII 'B'                                                                         |
    -     * | 1           | u8   | start2         | Start frame identifier, ASCII 'R'                                                                         |
    +     * | 0           | u8   | start1         | Start frame identifier, ASCII 'B'                                                                         |
    +     * | 1           | u8   | start2         | Start frame identifier, ASCII 'R'                                                                         |
          * | 2-3         | u16  | payload_length | Number of bytes in payload.                                                                               |
          * | 4-5         | u16  | message_id     | The message id.                                                                                           |
          * | 6           | u8   | src_device_id  | The device ID of the device sending the message.                                                          |
    @@ -265,7 +266,7 @@
         Self: Sized + SerializePayload + SerializePayload,
     {
         fn message_id(&self) -> u16;
    -    fn message_name(&self) -> &'static str;
    +    fn message_name(&self) -> &'static str;
     
         fn message_id_from_name(name: &str) -> Result<u16, String>;
     }
    @@ -282,6 +283,6 @@
     where
         Self: Sized,
     {
    -    fn deserialize(message_id: u16, payload: &[u8]) -> Result<Self, &'static str>;
    +    fn deserialize(message_id: u16, payload: &[u8]) -> Result<Self, &'static str>;
     }
     
    \ No newline at end of file diff --git a/static.files/main-305769736d49e732.js b/static.files/main-305769736d49e732.js new file mode 100644 index 000000000..b8b91afa0 --- /dev/null +++ b/static.files/main-305769736d49e732.js @@ -0,0 +1,11 @@ +"use strict";window.RUSTDOC_TOOLTIP_HOVER_MS=300;window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS=450;function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden")}function showMain(){removeClass(document.getElementById(MAIN_ID),"hidden")}function blurHandler(event,parentElem,hideCallback){if(!parentElem.contains(document.activeElement)&&!parentElem.contains(event.relatedTarget)){hideCallback()}}window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");function setMobileTopbar(){const mobileTopbar=document.querySelector(".mobile-topbar");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileTopbar){const mobileTitle=document.createElement("h2");mobileTitle.className="location";if(hasClass(document.querySelector(".rustdoc"),"crate")){mobileTitle.innerText=`Crate ${window.currentCrate}`}else if(locationTitle){mobileTitle.innerHTML=locationTitle.innerHTML}mobileTopbar.appendChild(mobileTitle)}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape"}return String.fromCharCode(c)}const MAIN_ID="main-content";const SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";const HELP_BUTTON_ID="help-button";function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getHelpButton(){return document.getElementById(HELP_BUTTON_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID))}return el}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden")}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden")}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden")}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function preLoadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="preload";link.as="style";document.getElementsByTagName("head")[0].appendChild(link)}(function(){const isHelpPage=window.location.pathname.endsWith("/help.html");function loadScript(url){const script=document.createElement("script");script.src=url;document.head.append(script)}getSettingsButton().onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return}window.hideAllModals(false);addClass(getSettingsButton(),"rotate");event.preventDefault();loadScript(getVar("static-root-path")+getVar("settings-js"));setTimeout(()=>{const themes=getVar("themes").split(",");for(const theme of themes){if(theme!==""){preLoadCss(getVar("root-path")+theme+".css")}}},0)};window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},isDisplayed:()=>searchState.outputElement().parentElement.id===ALTERNATIVE_DISPLAY_ID,focus:()=>{searchState.input.focus()},defocus:()=>{searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=searchState.outputElement()}switchDisplayedElement(search);searchState.mouseMovedAfterSearch=false;document.title=searchState.title},removeQueryParameters:()=>{document.title=searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.hash)}},hideResults:()=>{switchDisplayedElement(null);searchState.removeQueryParameters()},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=searchState.input;if(!searchState.input){return}let searchLoaded=false;function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(getVar("static-root-path")+getVar("search-js"));loadScript(resourcePath("search-index",".js"))}}search_input.addEventListener("focus",()=>{search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=searchState.getQueryStringParams();if(params.search!==undefined){searchState.setLoadingSearch();loadSearch()}},setLoadingSearch:()=>{const search=searchState.outputElement();search.innerHTML="

    "+searchState.loadingText+"

    ";searchState.showResults(search)},};const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}const pageId=window.location.hash.replace(/^#/,"");if(savedHash!==pageId){savedHash=pageId;if(pageId!==""){expandSection(pageId)}}if(savedHash.startsWith("impl-")){const splitAt=savedHash.indexOf("/");if(splitAt!==-1){const implId=savedHash.slice(0,splitAt);const assocId=savedHash.slice(splitAt+1);const implElem=document.getElementById(implId);if(implElem&&implElem.parentElement.tagName==="SUMMARY"&&implElem.parentElement.parentElement.tagName==="DETAILS"){onEachLazy(implElem.parentElement.parentElement.querySelectorAll(`[id^="${assocId}"]`),item=>{const numbered=/([^-]+)-([0-9]+)/.exec(item.id);if(item.id===assocId||(numbered&&numbered[1]===assocId)){openParentDetails(item);item.scrollIntoView();setTimeout(()=>{window.location.replace("#"+item.id)},0)}})}}}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function handleEscape(ev){searchState.clearInputTimeout();searchState.hideResults();ev.preventDefault();searchState.defocus();window.hideAllModals(true)}function handleShortcut(ev){const disableShortcuts=getSettingValue("disable-shortcuts")==="true";if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"&&document.activeElement.type!=="checkbox"&&document.activeElement.type!=="radio"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":ev.preventDefault();searchState.focus();break;case"+":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs();break;case"?":showHelp();break;default:break}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return}const sidebar=document.getElementsByClassName("sidebar-elems")[0];function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return}const modpath=hasClass(document.querySelector(".rustdoc"),"mod")?"../":"";const h3=document.createElement("h3");h3.innerHTML=`${longty}`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const name of filtered){let path;if(shortty==="mod"){path=`${modpath}${name}/index.html`}else{path=`${modpath}${shortty}.${name}.html`}let current_page=document.location.href.toString();if(current_page.endsWith("/")){current_page+="index.html"}const link=document.createElement("a");link.href=path;if(path===current_page){link.className="current"}link.textContent=name;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(h3);sidebar.appendChild(ul)}if(sidebar){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Aliases");block("union","unions","Unions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("opaque","opaque-types","Opaque Types");block("attr","attributes","Attribute Macros");block("derive","derives","Derive Macros");block("traitalias","trait-aliases","Trait Aliases")}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();const TEXT_IDX=0;const SYNTHETIC_IDX=1;const TYPES_IDX=2;if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector(".main-heading h1 > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const script=document.querySelector("script[data-ignore-extern-crates]");const ignoreExternCrates=new Set((script?script.getAttribute("data-ignore-extern-crates"):"").split(","));for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.has(lib)){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct[SYNTHETIC_IDX]?synthetic_implementors:implementors;if(struct[SYNTHETIC_IDX]){for(const struct_type of struct[TYPES_IDX]){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct[TEXT_IDX];addClass(code,"code-header");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}window.register_type_impls=imp=>{if(!imp||!imp[window.currentCrate]){return}window.pending_type_impls=null;const idMap=new Map();let implementations=document.getElementById("implementations-list");let trait_implementations=document.getElementById("trait-implementations-list");let trait_implementations_header=document.getElementById("trait-implementations");const script=document.querySelector("script[data-self-path]");const selfPath=script?script.getAttribute("data-self-path"):null;const mainContent=document.querySelector("#main-content");const sidebarSection=document.querySelector(".sidebar section");let methods=document.querySelector(".sidebar .block.method");let associatedTypes=document.querySelector(".sidebar .block.associatedtype");let associatedConstants=document.querySelector(".sidebar .block.associatedconstant");let sidebarTraitList=document.querySelector(".sidebar .block.trait-implementation");for(const impList of imp[window.currentCrate]){const types=impList.slice(2);const text=impList[0];const isTrait=impList[1]!==0;const traitName=impList[1];if(types.indexOf(selfPath)===-1){continue}let outputList=isTrait?trait_implementations:implementations;if(outputList===null){const outputListName=isTrait?"Trait Implementations":"Implementations";const outputListId=isTrait?"trait-implementations-list":"implementations-list";const outputListHeaderId=isTrait?"trait-implementations":"implementations";const outputListHeader=document.createElement("h2");outputListHeader.id=outputListHeaderId;outputListHeader.innerText=outputListName;outputList=document.createElement("div");outputList.id=outputListId;if(isTrait){const link=document.createElement("a");link.href=`#${outputListHeaderId}`;link.innerText="Trait Implementations";const h=document.createElement("h3");h.appendChild(link);trait_implementations=outputList;trait_implementations_header=outputListHeader;sidebarSection.appendChild(h);sidebarTraitList=document.createElement("ul");sidebarTraitList.className="block trait-implementation";sidebarSection.appendChild(sidebarTraitList);mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}else{implementations=outputList;if(trait_implementations){mainContent.insertBefore(outputListHeader,trait_implementations_header);mainContent.insertBefore(outputList,trait_implementations_header)}else{const mainContent=document.querySelector("#main-content");mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}}}const template=document.createElement("template");template.innerHTML=text;onEachLazy(template.content.querySelectorAll("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});onEachLazy(template.content.querySelectorAll("[id]"),el=>{let i=0;if(idMap.has(el.id)){i=idMap.get(el.id)}else if(document.getElementById(el.id)){i=1;while(document.getElementById(`${el.id}-${2 * i}`)){i=2*i}while(document.getElementById(`${el.id}-${i}`)){i+=1}}if(i!==0){const oldHref=`#${el.id}`;const newHref=`#${el.id}-${i}`;el.id=`${el.id}-${i}`;onEachLazy(template.content.querySelectorAll("a[href]"),link=>{if(link.getAttribute("href")===oldHref){link.href=newHref}})}idMap.set(el.id,i+1)});const templateAssocItems=template.content.querySelectorAll("section.tymethod, "+"section.method, section.associatedtype, section.associatedconstant");if(isTrait){const li=document.createElement("li");const a=document.createElement("a");a.href=`#${template.content.querySelector(".impl").id}`;a.textContent=traitName;li.appendChild(a);sidebarTraitList.append(li)}else{onEachLazy(templateAssocItems,item=>{let block=hasClass(item,"associatedtype")?associatedTypes:(hasClass(item,"associatedconstant")?associatedConstants:(methods));if(!block){const blockTitle=hasClass(item,"associatedtype")?"Associated Types":(hasClass(item,"associatedconstant")?"Associated Constants":("Methods"));const blockClass=hasClass(item,"associatedtype")?"associatedtype":(hasClass(item,"associatedconstant")?"associatedconstant":("method"));const blockHeader=document.createElement("h3");const blockLink=document.createElement("a");blockLink.href="#implementations";blockLink.innerText=blockTitle;blockHeader.appendChild(blockLink);block=document.createElement("ul");block.className=`block ${blockClass}`;const insertionReference=methods||sidebarTraitList;if(insertionReference){const insertionReferenceH=insertionReference.previousElementSibling;sidebarSection.insertBefore(blockHeader,insertionReferenceH);sidebarSection.insertBefore(block,insertionReferenceH)}else{sidebarSection.appendChild(blockHeader);sidebarSection.appendChild(block)}if(hasClass(item,"associatedtype")){associatedTypes=block}else if(hasClass(item,"associatedconstant")){associatedConstants=block}else{methods=block}}const li=document.createElement("li");const a=document.createElement("a");a.innerText=item.id.split("-")[0].split(".")[1];a.href=`#${item.id}`;li.appendChild(a);block.appendChild(li)})}outputList.appendChild(template.content)}for(const list of[methods,associatedTypes,associatedConstants,sidebarTraitList]){if(!list){continue}const newChildren=Array.prototype.slice.call(list.children);newChildren.sort((a,b)=>{const aI=a.innerText;const bI=b.innerText;return aIbI?1:0});list.replaceChildren(...newChildren)}};if(window.pending_type_impls){window.register_type_impls(window.pending_type_impls)}function addSidebarCrates(){if(!window.ALL_CRATES){return}const sidebarElems=document.getElementsByClassName("sidebar-elems")[0];if(!sidebarElems){return}const h3=document.createElement("h3");h3.innerHTML="Crates";const ul=document.createElement("ul");ul.className="block crate";for(const crate of window.ALL_CRATES){const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";link.textContent=crate;const li=document.createElement("li");if(window.rootPath!=="./"&&crate===window.currentCrate){li.className="current"}li.appendChild(link);ul.appendChild(li)}sidebarElems.appendChild(h3);sidebarElems.appendChild(ul)}function expandAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hasClass(e,"type-contents-toggle")&&!hasClass(e,"more-examples-toggle")){e.open=true}});innerToggle.title="collapse all docs";innerToggle.children[0].innerText="\u2212"}function collapseAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});innerToggle.title="expand all docs";innerToggle.children[0].innerText="+"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}if(hasClass(innerToggle,"will-expand")){expandAllDocs()}else{collapseAllDocs()}}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}})}());window.rustdoc_add_line_numbers_to_examples=()=>{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");if(line_numbers.length>0){return}const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");for(const node of line_numbers){parent.removeChild(node)}})};if(getSettingValue("line-numbers")==="true"){window.rustdoc_add_line_numbers_to_examples()}function showSidebar(){window.hideAllModals(false);const sidebar=document.getElementsByClassName("sidebar")[0];addClass(sidebar,"shown")}function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}window.addEventListener("resize",()=>{if(window.CURRENT_TOOLTIP_ELEMENT){const base=window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE;const force_visible=base.TOOLTIP_FORCE_VISIBLE;hideTooltip(false);if(force_visible){showTooltip(base);base.TOOLTIP_FORCE_VISIBLE=true}}});const mainElem=document.getElementById(MAIN_ID);if(mainElem){mainElem.addEventListener("click",hideSidebar)}onEachLazy(document.querySelectorAll("a[href^='#']"),el=>{el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})});onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(e.target.tagName!=="SUMMARY"&&e.target.tagName!=="A"){e.preventDefault()}})});function showTooltip(e){const notable_ty=e.getAttribute("data-notable-ty");if(!window.NOTABLE_TRAITS&¬able_ty){const data=document.getElementById("notable-traits-data");if(data){window.NOTABLE_TRAITS=JSON.parse(data.innerText)}else{throw new Error("showTooltip() called with notable without any notable traits!")}}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE===e){clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);return}window.hideAllModals(false);const wrapper=document.createElement("div");if(notable_ty){wrapper.innerHTML="
    "+window.NOTABLE_TRAITS[notable_ty]+"
    "}else{if(e.getAttribute("title")!==null){e.setAttribute("data-title",e.getAttribute("title"));e.removeAttribute("title")}if(e.getAttribute("data-title")!==null){const titleContent=document.createElement("div");titleContent.className="content";titleContent.appendChild(document.createTextNode(e.getAttribute("data-title")));wrapper.appendChild(titleContent)}}wrapper.className="tooltip popover";const focusCatcher=document.createElement("div");focusCatcher.setAttribute("tabindex","0");focusCatcher.onfocus=hideTooltip;wrapper.appendChild(focusCatcher);const pos=e.getBoundingClientRect();wrapper.style.top=(pos.top+window.scrollY+pos.height)+"px";wrapper.style.left=0;wrapper.style.right="auto";wrapper.style.visibility="hidden";const body=document.getElementsByTagName("body")[0];body.appendChild(wrapper);const wrapperPos=wrapper.getBoundingClientRect();const finalPos=pos.left+window.scrollX-wrapperPos.width+24;if(finalPos>0){wrapper.style.left=finalPos+"px"}else{wrapper.style.setProperty("--popover-arrow-offset",(wrapperPos.right-pos.right+4)+"px")}wrapper.style.visibility="";window.CURRENT_TOOLTIP_ELEMENT=wrapper;window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE=e;clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);wrapper.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}clearTooltipHoverTimeout(e)};wrapper.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!e.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(wrapper,"fade-out")}}}function setTooltipHoverTimeout(element,show){clearTooltipHoverTimeout(element);if(!show&&!window.CURRENT_TOOLTIP_ELEMENT){return}if(show&&window.CURRENT_TOOLTIP_ELEMENT){return}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE!==element){return}element.TOOLTIP_HOVER_TIMEOUT=setTimeout(()=>{if(show){showTooltip(element)}else if(!element.TOOLTIP_FORCE_VISIBLE){hideTooltip(false)}},show?window.RUSTDOC_TOOLTIP_HOVER_MS:window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS)}function clearTooltipHoverTimeout(element){if(element.TOOLTIP_HOVER_TIMEOUT!==undefined){removeClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out");clearTimeout(element.TOOLTIP_HOVER_TIMEOUT);delete element.TOOLTIP_HOVER_TIMEOUT}}function tooltipBlurHandler(event){if(window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.contains(event.relatedTarget)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(event.relatedTarget)){setTimeout(()=>hideTooltip(false),0)}}function hideTooltip(focus){if(window.CURRENT_TOOLTIP_ELEMENT){if(window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE){if(focus){window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.focus()}window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE=false}const body=document.getElementsByTagName("body")[0];body.removeChild(window.CURRENT_TOOLTIP_ELEMENT);clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);window.CURRENT_TOOLTIP_ELEMENT=null}}onEachLazy(document.getElementsByClassName("tooltip"),e=>{e.onclick=()=>{e.TOOLTIP_FORCE_VISIBLE=e.TOOLTIP_FORCE_VISIBLE?false:true;if(window.CURRENT_TOOLTIP_ELEMENT&&!e.TOOLTIP_FORCE_VISIBLE){hideTooltip(true)}else{showTooltip(e);window.CURRENT_TOOLTIP_ELEMENT.setAttribute("tabindex","0");window.CURRENT_TOOLTIP_ELEMENT.focus();window.CURRENT_TOOLTIP_ELEMENT.onblur=tooltipBlurHandler}return false};e.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointermove=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out")}}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){showSidebar()}else{hideSidebar()}})}function helpBlurHandler(event){blurHandler(event,getHelpButton(),window.hidePopoverMenus)}function buildHelpMenu(){const book_info=document.createElement("span");const channel=getVar("channel");book_info.className="top";book_info.innerHTML=`You can find more information in \ +the rustdoc book.`;const shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
    "+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
    "+x[1]+"
    ").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

    Keyboard Shortcuts

    "+shortcuts+"
    ";const infos=[`For a full list of all search features, take a look here.`,"Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + -> vec or String, enum:Cow -> bool)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for functions that accept or return \ + slices and \ + arrays by writing \ + square brackets (e.g., -> [u8] or [] -> Option)","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

    "+x+"

    ").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

    Search Tricks

    "+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");if(!isHelpPage){container.className="popover"}container.id="help";container.style.display="none";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);if(isHelpPage){const help_section=document.createElement("section");help_section.appendChild(container);document.getElementById("main-content").appendChild(help_section);container.style.display="block"}else{const help_button=getHelpButton();help_button.appendChild(container);container.onblur=helpBlurHandler;help_button.onblur=helpBlurHandler;help_button.children[0].onblur=helpBlurHandler}return container}window.hideAllModals=switchFocus=>{hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus)};window.hidePopoverMenus=()=>{onEachLazy(document.querySelectorAll(".search-form .popover"),elem=>{elem.style.display="none"})};function getHelpMenu(buildNeeded){let menu=getHelpButton().querySelector(".popover");if(!menu&&buildNeeded){menu=buildHelpMenu()}return menu}function showHelp(){getHelpButton().querySelector("a").focus();const menu=getHelpMenu(true);if(menu.style.display==="none"){window.hideAllModals();menu.style.display=""}}if(isHelpPage){showHelp();document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault()})}else{document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault();const menu=getHelpMenu(true);const shouldShowHelp=menu.style.display==="none";if(shouldShowHelp){showHelp()}else{window.hidePopoverMenus()}})}setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){const SIDEBAR_MIN=100;const SIDEBAR_MAX=500;const RUSTDOC_MOBILE_BREAKPOINT=700;const BODY_MIN=400;const SIDEBAR_VANISH_THRESHOLD=SIDEBAR_MIN/2;const sidebarButton=document.getElementById("sidebar-button");if(sidebarButton){sidebarButton.addEventListener("click",e=>{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false");e.preventDefault()})}let currentPointerId=null;let desiredSidebarSize=null;let pendingSidebarResizingFrame=false;const resizer=document.querySelector(".sidebar-resizer");const sidebar=document.querySelector(".sidebar");if(!resizer||!sidebar){return}const isSrcPage=hasClass(document.body,"src");function hideSidebar(){if(isSrcPage){window.rustdocCloseSourceSidebar();updateLocalStorage("src-sidebar-width",null);document.documentElement.style.removeProperty("--src-sidebar-width");sidebar.style.removeProperty("--src-sidebar-width");resizer.style.removeProperty("--src-sidebar-width")}else{addClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","true");updateLocalStorage("desktop-sidebar-width",null);document.documentElement.style.removeProperty("--desktop-sidebar-width");sidebar.style.removeProperty("--desktop-sidebar-width");resizer.style.removeProperty("--desktop-sidebar-width")}}function showSidebar(){if(isSrcPage){window.rustdocShowSourceSidebar()}else{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false")}}function changeSidebarSize(size){if(isSrcPage){updateLocalStorage("src-sidebar-width",size);sidebar.style.setProperty("--src-sidebar-width",size+"px");resizer.style.setProperty("--src-sidebar-width",size+"px")}else{updateLocalStorage("desktop-sidebar-width",size);sidebar.style.setProperty("--desktop-sidebar-width",size+"px");resizer.style.setProperty("--desktop-sidebar-width",size+"px")}}function isSidebarHidden(){return isSrcPage?!hasClass(document.documentElement,"src-sidebar-expanded"):hasClass(document.documentElement,"hide-sidebar")}function resize(e){if(currentPointerId===null||currentPointerId!==e.pointerId){return}e.preventDefault();const pos=e.clientX-sidebar.offsetLeft-3;if(pos=SIDEBAR_MIN){if(isSidebarHidden()){showSidebar()}const constrainedPos=Math.min(pos,window.innerWidth-BODY_MIN,SIDEBAR_MAX);changeSidebarSize(constrainedPos);desiredSidebarSize=constrainedPos;if(pendingSidebarResizingFrame!==false){clearTimeout(pendingSidebarResizingFrame)}pendingSidebarResizingFrame=setTimeout(()=>{if(currentPointerId===null||pendingSidebarResizingFrame===false){return}pendingSidebarResizingFrame=false;document.documentElement.style.setProperty("--resizing-sidebar-width",desiredSidebarSize+"px")},100)}}window.addEventListener("resize",()=>{if(window.innerWidth=(window.innerWidth-BODY_MIN)){changeSidebarSize(window.innerWidth-BODY_MIN)}else if(desiredSidebarSize!==null&&desiredSidebarSize>SIDEBAR_MIN){changeSidebarSize(desiredSidebarSize)}});function stopResize(e){if(currentPointerId===null){return}if(e){e.preventDefault()}desiredSidebarSize=sidebar.getBoundingClientRect().width;removeClass(resizer,"active");window.removeEventListener("pointermove",resize,false);window.removeEventListener("pointerup",stopResize,false);removeClass(document.documentElement,"sidebar-resizing");document.documentElement.style.removeProperty("--resizing-sidebar-width");if(resizer.releasePointerCapture){resizer.releasePointerCapture(currentPointerId);currentPointerId=null}}function initResize(e){if(currentPointerId!==null||e.altKey||e.ctrlKey||e.metaKey||e.button!==0){return}if(resizer.setPointerCapture){resizer.setPointerCapture(e.pointerId);if(!resizer.hasPointerCapture(e.pointerId)){resizer.releasePointerCapture(e.pointerId);return}currentPointerId=e.pointerId}e.preventDefault();window.addEventListener("pointermove",resize,false);window.addEventListener("pointercancel",stopResize,false);window.addEventListener("pointerup",stopResize,false);addClass(resizer,"active");addClass(document.documentElement,"sidebar-resizing");const pos=e.clientX-sidebar.offsetLeft-3;document.documentElement.style.setProperty("--resizing-sidebar-width",pos+"px");desiredSidebarSize=null}resizer.addEventListener("pointerdown",initResize,false)}());(function(){let reset_button_timeout=null;const but=document.getElementById("copy-path");if(!but){return}but.onclick=()=>{const parent=but.parentElement;const path=[];onEach(parent.childNodes,child=>{if(child.tagName==="A"){path.push(child.textContent)}});const el=document.createElement("textarea");el.value=path.join("::");el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el);but.children[0].style.display="none";let tmp;if(but.childNodes.length<2){tmp=document.createTextNode("✓");but.appendChild(tmp)}else{onEachLazy(but.childNodes,e=>{if(e.nodeType===Node.TEXT_NODE){tmp=e;return true}});tmp.textContent="✓"}if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){tmp.textContent="";reset_button_timeout=null;but.children[0].style.display=""}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) \ No newline at end of file diff --git a/static.files/main-9dd44ab47b99a0fb.js b/static.files/main-9dd44ab47b99a0fb.js deleted file mode 100644 index cfb9a38fc..000000000 --- a/static.files/main-9dd44ab47b99a0fb.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict";window.RUSTDOC_TOOLTIP_HOVER_MS=300;window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS=450;function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden")}function showMain(){removeClass(document.getElementById(MAIN_ID),"hidden")}function elemIsInParent(elem,parent){while(elem&&elem!==document.body){if(elem===parent){return true}elem=elem.parentElement}return false}function blurHandler(event,parentElem,hideCallback){if(!elemIsInParent(document.activeElement,parentElem)&&!elemIsInParent(event.relatedTarget,parentElem)){hideCallback()}}window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");function setMobileTopbar(){const mobileTopbar=document.querySelector(".mobile-topbar");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileTopbar){const mobileTitle=document.createElement("h2");mobileTitle.className="location";if(hasClass(document.body,"crate")){mobileTitle.innerText=`Crate ${window.currentCrate}`}else if(locationTitle){mobileTitle.innerHTML=locationTitle.innerHTML}mobileTopbar.appendChild(mobileTitle)}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape"}return String.fromCharCode(c)}const MAIN_ID="main-content";const SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";const HELP_BUTTON_ID="help-button";function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getHelpButton(){return document.getElementById(HELP_BUTTON_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID))}return el}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden")}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden")}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden")}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function preLoadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="preload";link.as="style";document.getElementsByTagName("head")[0].appendChild(link)}(function(){const isHelpPage=window.location.pathname.endsWith("/help.html");function loadScript(url){const script=document.createElement("script");script.src=url;document.head.append(script)}getSettingsButton().onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return}window.hideAllModals(false);addClass(getSettingsButton(),"rotate");event.preventDefault();loadScript(getVar("static-root-path")+getVar("settings-js"));setTimeout(()=>{const themes=getVar("themes").split(",");for(const theme of themes){if(theme!==""){preLoadCss(getVar("root-path")+theme+".css")}}},0)};window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},isDisplayed:()=>searchState.outputElement().parentElement.id===ALTERNATIVE_DISPLAY_ID,focus:()=>{searchState.input.focus()},defocus:()=>{searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=searchState.outputElement()}switchDisplayedElement(search);searchState.mouseMovedAfterSearch=false;document.title=searchState.title},removeQueryParameters:()=>{document.title=searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.hash)}},hideResults:()=>{switchDisplayedElement(null);searchState.removeQueryParameters()},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=searchState.input;if(!searchState.input){return}let searchLoaded=false;function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(getVar("static-root-path")+getVar("search-js"));loadScript(resourcePath("search-index",".js"))}}search_input.addEventListener("focus",()=>{search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=searchState.getQueryStringParams();if(params.search!==undefined){searchState.setLoadingSearch();loadSearch()}},setLoadingSearch:()=>{const search=searchState.outputElement();search.innerHTML="

    "+searchState.loadingText+"

    ";searchState.showResults(search)},};const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}const pageId=window.location.hash.replace(/^#/,"");if(savedHash!==pageId){savedHash=pageId;if(pageId!==""){expandSection(pageId)}}if(savedHash.startsWith("impl-")){const splitAt=savedHash.indexOf("/");if(splitAt!==-1){const implId=savedHash.slice(0,splitAt);const assocId=savedHash.slice(splitAt+1);const implElem=document.getElementById(implId);if(implElem&&implElem.parentElement.tagName==="SUMMARY"&&implElem.parentElement.parentElement.tagName==="DETAILS"){onEachLazy(implElem.parentElement.parentElement.querySelectorAll(`[id^="${assocId}"]`),item=>{const numbered=/([^-]+)-([0-9]+)/.exec(item.id);if(item.id===assocId||(numbered&&numbered[1]===assocId)){openParentDetails(item);item.scrollIntoView();setTimeout(()=>{window.location.replace("#"+item.id)},0)}})}}}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function handleEscape(ev){searchState.clearInputTimeout();searchState.hideResults();ev.preventDefault();searchState.defocus();window.hideAllModals(true)}function handleShortcut(ev){const disableShortcuts=getSettingValue("disable-shortcuts")==="true";if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"&&document.activeElement.type!=="checkbox"&&document.activeElement.type!=="radio"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":ev.preventDefault();searchState.focus();break;case"+":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs();break;case"?":showHelp();break;default:break}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return}const sidebar=document.getElementsByClassName("sidebar-elems")[0];function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return}const modpath=hasClass(document.body,"mod")?"../":"";const h3=document.createElement("h3");h3.innerHTML=`${longty}`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const name of filtered){let path;if(shortty==="mod"){path=`${modpath}${name}/index.html`}else{path=`${modpath}${shortty}.${name}.html`}let current_page=document.location.href.toString();if(current_page.endsWith("/")){current_page+="index.html"}const link=document.createElement("a");link.href=path;if(link.href===current_page){link.className="current"}link.textContent=name;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(h3);sidebar.appendChild(ul)}if(sidebar){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Aliases");block("union","unions","Unions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("opaque","opaque-types","Opaque Types");block("attr","attributes","Attribute Macros");block("derive","derives","Derive Macros");block("traitalias","trait-aliases","Trait Aliases")}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();const TEXT_IDX=0;const SYNTHETIC_IDX=1;const TYPES_IDX=2;if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector(".main-heading h1 > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const script=document.querySelector("script[data-ignore-extern-crates]");const ignoreExternCrates=new Set((script?script.getAttribute("data-ignore-extern-crates"):"").split(","));for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.has(lib)){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct[SYNTHETIC_IDX]?synthetic_implementors:implementors;if(struct[SYNTHETIC_IDX]){for(const struct_type of struct[TYPES_IDX]){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct[TEXT_IDX];addClass(code,"code-header");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}window.register_type_impls=imp=>{if(!imp||!imp[window.currentCrate]){return}window.pending_type_impls=null;const idMap=new Map();let implementations=document.getElementById("implementations-list");let trait_implementations=document.getElementById("trait-implementations-list");let trait_implementations_header=document.getElementById("trait-implementations");const script=document.querySelector("script[data-self-path]");const selfPath=script?script.getAttribute("data-self-path"):null;const mainContent=document.querySelector("#main-content");const sidebarSection=document.querySelector(".sidebar section");let methods=document.querySelector(".sidebar .block.method");let associatedTypes=document.querySelector(".sidebar .block.associatedtype");let associatedConstants=document.querySelector(".sidebar .block.associatedconstant");let sidebarTraitList=document.querySelector(".sidebar .block.trait-implementation");for(const impList of imp[window.currentCrate]){const types=impList.slice(2);const text=impList[0];const isTrait=impList[1]!==0;const traitName=impList[1];if(types.indexOf(selfPath)===-1){continue}let outputList=isTrait?trait_implementations:implementations;if(outputList===null){const outputListName=isTrait?"Trait Implementations":"Implementations";const outputListId=isTrait?"trait-implementations-list":"implementations-list";const outputListHeaderId=isTrait?"trait-implementations":"implementations";const outputListHeader=document.createElement("h2");outputListHeader.id=outputListHeaderId;outputListHeader.innerText=outputListName;outputList=document.createElement("div");outputList.id=outputListId;if(isTrait){const link=document.createElement("a");link.href=`#${outputListHeaderId}`;link.innerText="Trait Implementations";const h=document.createElement("h3");h.appendChild(link);trait_implementations=outputList;trait_implementations_header=outputListHeader;sidebarSection.appendChild(h);sidebarTraitList=document.createElement("ul");sidebarTraitList.className="block trait-implementation";sidebarSection.appendChild(sidebarTraitList);mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}else{implementations=outputList;if(trait_implementations){mainContent.insertBefore(outputListHeader,trait_implementations_header);mainContent.insertBefore(outputList,trait_implementations_header)}else{const mainContent=document.querySelector("#main-content");mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}}}const template=document.createElement("template");template.innerHTML=text;onEachLazy(template.content.querySelectorAll("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});onEachLazy(template.content.querySelectorAll("[id]"),el=>{let i=0;if(idMap.has(el.id)){i=idMap.get(el.id)}else if(document.getElementById(el.id)){i=1;while(document.getElementById(`${el.id}-${2 * i}`)){i=2*i}while(document.getElementById(`${el.id}-${i}`)){i+=1}}if(i!==0){const oldHref=`#${el.id}`;const newHref=`#${el.id}-${i}`;el.id=`${el.id}-${i}`;onEachLazy(template.content.querySelectorAll("a[href]"),link=>{if(link.getAttribute("href")===oldHref){link.href=newHref}})}idMap.set(el.id,i+1)});const templateAssocItems=template.content.querySelectorAll("section.tymethod, "+"section.method, section.associatedtype, section.associatedconstant");if(isTrait){const li=document.createElement("li");const a=document.createElement("a");a.href=`#${template.content.querySelector(".impl").id}`;a.textContent=traitName;li.appendChild(a);sidebarTraitList.append(li)}else{onEachLazy(templateAssocItems,item=>{let block=hasClass(item,"associatedtype")?associatedTypes:(hasClass(item,"associatedconstant")?associatedConstants:(methods));if(!block){const blockTitle=hasClass(item,"associatedtype")?"Associated Types":(hasClass(item,"associatedconstant")?"Associated Constants":("Methods"));const blockClass=hasClass(item,"associatedtype")?"associatedtype":(hasClass(item,"associatedconstant")?"associatedconstant":("method"));const blockHeader=document.createElement("h3");const blockLink=document.createElement("a");blockLink.href="#implementations";blockLink.innerText=blockTitle;blockHeader.appendChild(blockLink);block=document.createElement("ul");block.className=`block ${blockClass}`;const insertionReference=methods||sidebarTraitList;if(insertionReference){const insertionReferenceH=insertionReference.previousElementSibling;sidebarSection.insertBefore(blockHeader,insertionReferenceH);sidebarSection.insertBefore(block,insertionReferenceH)}else{sidebarSection.appendChild(blockHeader);sidebarSection.appendChild(block)}if(hasClass(item,"associatedtype")){associatedTypes=block}else if(hasClass(item,"associatedconstant")){associatedConstants=block}else{methods=block}}const li=document.createElement("li");const a=document.createElement("a");a.innerText=item.id.split("-")[0].split(".")[1];a.href=`#${item.id}`;li.appendChild(a);block.appendChild(li)})}outputList.appendChild(template.content)}for(const list of[methods,associatedTypes,associatedConstants,sidebarTraitList]){if(!list){continue}const newChildren=Array.prototype.slice.call(list.children);newChildren.sort((a,b)=>{const aI=a.innerText;const bI=b.innerText;return aIbI?1:0});list.replaceChildren(...newChildren)}};if(window.pending_type_impls){window.register_type_impls(window.pending_type_impls)}function addSidebarCrates(){if(!window.ALL_CRATES){return}const sidebarElems=document.getElementsByClassName("sidebar-elems")[0];if(!sidebarElems){return}const h3=document.createElement("h3");h3.innerHTML="Crates";const ul=document.createElement("ul");ul.className="block crate";for(const crate of window.ALL_CRATES){const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";if(window.rootPath!=="./"&&crate===window.currentCrate){link.className="current"}link.textContent=crate;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebarElems.appendChild(h3);sidebarElems.appendChild(ul)}function expandAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hasClass(e,"type-contents-toggle")&&!hasClass(e,"more-examples-toggle")){e.open=true}});innerToggle.title="collapse all docs";innerToggle.children[0].innerText="\u2212"}function collapseAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});innerToggle.title="expand all docs";innerToggle.children[0].innerText="+"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}if(hasClass(innerToggle,"will-expand")){expandAllDocs()}else{collapseAllDocs()}}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}})}());window.rustdoc_add_line_numbers_to_examples=()=>{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");if(line_numbers.length>0){return}const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");for(const node of line_numbers){parent.removeChild(node)}})};if(getSettingValue("line-numbers")==="true"){window.rustdoc_add_line_numbers_to_examples()}function showSidebar(){window.hideAllModals(false);const sidebar=document.getElementsByClassName("sidebar")[0];addClass(sidebar,"shown")}function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}window.addEventListener("resize",()=>{if(window.CURRENT_TOOLTIP_ELEMENT){const base=window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE;const force_visible=base.TOOLTIP_FORCE_VISIBLE;hideTooltip(false);if(force_visible){showTooltip(base);base.TOOLTIP_FORCE_VISIBLE=true}}});const mainElem=document.getElementById(MAIN_ID);if(mainElem){mainElem.addEventListener("click",hideSidebar)}onEachLazy(document.querySelectorAll("a[href^='#']"),el=>{el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})});onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(e.target.tagName!=="SUMMARY"&&e.target.tagName!=="A"){e.preventDefault()}})});function showTooltip(e){const notable_ty=e.getAttribute("data-notable-ty");if(!window.NOTABLE_TRAITS&¬able_ty){const data=document.getElementById("notable-traits-data");if(data){window.NOTABLE_TRAITS=JSON.parse(data.innerText)}else{throw new Error("showTooltip() called with notable without any notable traits!")}}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE===e){clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);return}window.hideAllModals(false);const wrapper=document.createElement("div");if(notable_ty){wrapper.innerHTML="
    "+window.NOTABLE_TRAITS[notable_ty]+"
    "}else{if(e.getAttribute("title")!==null){e.setAttribute("data-title",e.getAttribute("title"));e.removeAttribute("title")}if(e.getAttribute("data-title")!==null){const titleContent=document.createElement("div");titleContent.className="content";titleContent.appendChild(document.createTextNode(e.getAttribute("data-title")));wrapper.appendChild(titleContent)}}wrapper.className="tooltip popover";const focusCatcher=document.createElement("div");focusCatcher.setAttribute("tabindex","0");focusCatcher.onfocus=hideTooltip;wrapper.appendChild(focusCatcher);const pos=e.getBoundingClientRect();wrapper.style.top=(pos.top+window.scrollY+pos.height)+"px";wrapper.style.left=0;wrapper.style.right="auto";wrapper.style.visibility="hidden";const body=document.getElementsByTagName("body")[0];body.appendChild(wrapper);const wrapperPos=wrapper.getBoundingClientRect();const finalPos=pos.left+window.scrollX-wrapperPos.width+24;if(finalPos>0){wrapper.style.left=finalPos+"px"}else{wrapper.style.setProperty("--popover-arrow-offset",(wrapperPos.right-pos.right+4)+"px")}wrapper.style.visibility="";window.CURRENT_TOOLTIP_ELEMENT=wrapper;window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE=e;clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);wrapper.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}clearTooltipHoverTimeout(e)};wrapper.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!elemIsInParent(ev.relatedTarget,e)){setTooltipHoverTimeout(e,false);addClass(wrapper,"fade-out")}}}function setTooltipHoverTimeout(element,show){clearTooltipHoverTimeout(element);if(!show&&!window.CURRENT_TOOLTIP_ELEMENT){return}if(show&&window.CURRENT_TOOLTIP_ELEMENT){return}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE!==element){return}element.TOOLTIP_HOVER_TIMEOUT=setTimeout(()=>{if(show){showTooltip(element)}else if(!element.TOOLTIP_FORCE_VISIBLE){hideTooltip(false)}},show?window.RUSTDOC_TOOLTIP_HOVER_MS:window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS)}function clearTooltipHoverTimeout(element){if(element.TOOLTIP_HOVER_TIMEOUT!==undefined){removeClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out");clearTimeout(element.TOOLTIP_HOVER_TIMEOUT);delete element.TOOLTIP_HOVER_TIMEOUT}}function tooltipBlurHandler(event){if(window.CURRENT_TOOLTIP_ELEMENT&&!elemIsInParent(document.activeElement,window.CURRENT_TOOLTIP_ELEMENT)&&!elemIsInParent(event.relatedTarget,window.CURRENT_TOOLTIP_ELEMENT)&&!elemIsInParent(document.activeElement,window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE)&&!elemIsInParent(event.relatedTarget,window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE)){setTimeout(()=>hideTooltip(false),0)}}function hideTooltip(focus){if(window.CURRENT_TOOLTIP_ELEMENT){if(window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE){if(focus){window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.focus()}window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE=false}const body=document.getElementsByTagName("body")[0];body.removeChild(window.CURRENT_TOOLTIP_ELEMENT);clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);window.CURRENT_TOOLTIP_ELEMENT=null}}onEachLazy(document.getElementsByClassName("tooltip"),e=>{e.onclick=()=>{e.TOOLTIP_FORCE_VISIBLE=e.TOOLTIP_FORCE_VISIBLE?false:true;if(window.CURRENT_TOOLTIP_ELEMENT&&!e.TOOLTIP_FORCE_VISIBLE){hideTooltip(true)}else{showTooltip(e);window.CURRENT_TOOLTIP_ELEMENT.setAttribute("tabindex","0");window.CURRENT_TOOLTIP_ELEMENT.focus();window.CURRENT_TOOLTIP_ELEMENT.onblur=tooltipBlurHandler}return false};e.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointermove=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!elemIsInParent(ev.relatedTarget,window.CURRENT_TOOLTIP_ELEMENT)){setTooltipHoverTimeout(e,false);addClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out")}}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){showSidebar()}else{hideSidebar()}})}function helpBlurHandler(event){blurHandler(event,getHelpButton(),window.hidePopoverMenus)}function buildHelpMenu(){const book_info=document.createElement("span");const channel=getVar("channel");book_info.className="top";book_info.innerHTML=`You can find more information in \ -the rustdoc book.`;const shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
    "+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
    "+x[1]+"
    ").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

    Keyboard Shortcuts

    "+shortcuts+"
    ";const infos=[`For a full list of all search features, take a look here.`,"Prefix searches with a type followed by a colon (e.g., fn:) to \ - restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ - enum, trait, type, macro, \ - and const.","Search functions by type signature (e.g., vec -> usize or \ - -> vec or String, enum:Cow -> bool)","You can look for items with an exact name by putting double quotes around \ - your request: \"string\"","Look for functions that accept or return \ - slices and \ - arrays by writing \ - square brackets (e.g., -> [u8] or [] -> Option)","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

    "+x+"

    ").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

    Search Tricks

    "+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");if(!isHelpPage){container.className="popover"}container.id="help";container.style.display="none";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);if(isHelpPage){const help_section=document.createElement("section");help_section.appendChild(container);document.getElementById("main-content").appendChild(help_section);container.style.display="block"}else{const help_button=getHelpButton();help_button.appendChild(container);container.onblur=helpBlurHandler;help_button.onblur=helpBlurHandler;help_button.children[0].onblur=helpBlurHandler}return container}window.hideAllModals=switchFocus=>{hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus)};window.hidePopoverMenus=()=>{onEachLazy(document.querySelectorAll(".search-form .popover"),elem=>{elem.style.display="none"})};function getHelpMenu(buildNeeded){let menu=getHelpButton().querySelector(".popover");if(!menu&&buildNeeded){menu=buildHelpMenu()}return menu}function showHelp(){getHelpButton().querySelector("a").focus();const menu=getHelpMenu(true);if(menu.style.display==="none"){window.hideAllModals();menu.style.display=""}}if(isHelpPage){showHelp();document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault()})}else{document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault();const menu=getHelpMenu(true);const shouldShowHelp=menu.style.display==="none";if(shouldShowHelp){showHelp()}else{window.hidePopoverMenus()}})}setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){let reset_button_timeout=null;const but=document.getElementById("copy-path");if(!but){return}but.onclick=()=>{const parent=but.parentElement;const path=[];onEach(parent.childNodes,child=>{if(child.tagName==="A"){path.push(child.textContent)}});const el=document.createElement("textarea");el.value=path.join("::");el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el);but.children[0].style.display="none";let tmp;if(but.childNodes.length<2){tmp=document.createTextNode("✓");but.appendChild(tmp)}else{onEachLazy(but.childNodes,e=>{if(e.nodeType===Node.TEXT_NODE){tmp=e;return true}});tmp.textContent="✓"}if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){tmp.textContent="";reset_button_timeout=null;but.children[0].style.display=""}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) \ No newline at end of file diff --git a/static.files/noscript-5d8b3c7633ad77ba.css b/static.files/noscript-5d8b3c7633ad77ba.css deleted file mode 100644 index 8c63ef065..000000000 --- a/static.files/noscript-5d8b3c7633ad77ba.css +++ /dev/null @@ -1 +0,0 @@ - #main-content .attributes{margin-left:0 !important;}#copy-path{display:none;}nav.sub{display:none;}.src .sidebar{display:none;}.notable-traits{display:none;}:root{--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);}@media (prefers-color-scheme:dark){:root{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);}} \ No newline at end of file diff --git a/static.files/noscript-feafe1bb7466e4bd.css b/static.files/noscript-feafe1bb7466e4bd.css new file mode 100644 index 000000000..7bbe07f1c --- /dev/null +++ b/static.files/noscript-feafe1bb7466e4bd.css @@ -0,0 +1 @@ + #main-content .attributes{margin-left:0 !important;}#copy-path,#sidebar-button,.sidebar-resizer{display:none;}nav.sub{display:none;}.src .sidebar{display:none;}.notable-traits{display:none;}:root{--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}@media (prefers-color-scheme:dark){:root{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}} \ No newline at end of file diff --git a/static.files/rustdoc-9ee3a5e31a2afa3e.css b/static.files/rustdoc-9ee3a5e31a2afa3e.css deleted file mode 100644 index 8749d0eb1..000000000 --- a/static.files/rustdoc-9ee3a5e31a2afa3e.css +++ /dev/null @@ -1,10 +0,0 @@ - :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular-018c141bf0843ffd.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium-8f9a781e4970d388.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular-46f98efaafac5295.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{box-sizing:border-box;}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:25px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}.docblock>h2:first-child,.docblock>h3:first-child,.docblock>h4:first-child,.docblock>h5:first-child,.docblock>h6:first-child{margin-top:0;}.main-heading h1{margin:0;padding:0;flex-grow:1;overflow-wrap:break-word;overflow-wrap:anywhere;}.main-heading{display:flex;flex-wrap:wrap;padding-bottom:6px;margin-bottom:15px;}.content h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h1,h2{line-height:1.25;padding-top:3px;padding-bottom:9px;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;margin:0;padding:0;white-space:pre-wrap;}#crate-search,h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,.search-input,.search-results .result-name,.item-name>a,.out-of-band,span.since,a.src,#help-button>a,summary.hideme,.scraped-example-list,ul.all-items{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}#toggle-all-docs,a.anchor,.small-section-header a,#src-sidebar a,.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,h1 a,.search-results a,.stab,.result-name i{color:var(--main-color);}span.enum,a.enum,span.struct,a.struct,span.union,a.union,span.primitive,a.primitive,span.type,a.type,span.foreigntype,a.foreigntype{color:var(--type-link-color);}span.trait,a.trait,span.traitalias,a.traitalias{color:var(--trait-link-color);}span.associatedtype,a.associatedtype,span.constant,a.constant,span.static,a.static{color:var(--assoc-item-link-color);}span.fn,a.fn,span.method,a.method,span.tymethod,a.tymethod{color:var(--function-link-color);}span.attr,a.attr,span.derive,a.derive,span.macro,a.macro{color:var(--macro-link-color);}span.mod,a.mod{color:var(--mod-link-color);}span.keyword,a.keyword{color:var(--keyword-link-color);}a{color:var(--link-color);text-decoration:none;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p,.docblock>.warning{margin:0 0 .75em 0;}p:last-child,.docblock>.warning:last-child{margin:0;}button{padding:1px 6px;cursor:pointer;}button#toggle-all-docs{padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.src main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}details:not(.toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;line-height:1.5;}pre.item-decl{overflow-x:auto;}.item-decl .type-contents-toggle{contain:initial;}.src .content pre{padding:20px;}.rustdoc.src .example-wrap pre.src-line-numbers{padding:20px 0 20px 4px;}img{max-width:100%;}.sub-logo-container,.logo-container{line-height:0;display:block;}.sub-logo-container{margin-right:32px;}.sub-logo-container>img{height:60px;width:60px;object-fit:contain;}.rust-logo{filter:var(--rust-logo-filter);}.sidebar{font-size:0.875rem;flex:0 0 200px;overflow-y:scroll;overscroll-behavior:contain;position:sticky;height:100vh;top:0;left:0;}.rustdoc.src .sidebar{flex-basis:50px;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;z-index:1;}.sidebar,.mobile-topbar,.sidebar-menu-toggle,#src-sidebar-toggle,#src-sidebar{background-color:var(--sidebar-background-color);}#src-sidebar-toggle>button:hover,#src-sidebar-toggle>button:focus{background-color:var(--sidebar-background-color-hover);}.src .sidebar>*:not(#src-sidebar-toggle){visibility:hidden;}.src-sidebar-expanded .src .sidebar{overflow-y:auto;flex-basis:300px;}.src-sidebar-expanded .src .sidebar>*:not(#src-sidebar-toggle){visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.logo-container>img{height:48px;width:48px;}ul.block,.block li{padding:0;margin:0;list-style:none;}.sidebar-elems a,.sidebar>h2 a{display:block;padding:0.25rem;margin-left:-0.25rem;}.sidebar h2{overflow-wrap:anywhere;padding:0;margin:0.7rem 0;}.sidebar h3{font-size:1.125rem;padding:0;margin:0;}.sidebar-elems,.sidebar>.version,.sidebar>h2{padding-left:24px;}.sidebar a{color:var(--sidebar-link-color);}.sidebar .current,.sidebar .current a,.sidebar-crate a.logo-container:hover+h2 a,.sidebar a:hover:not(.logo-container){background-color:var(--sidebar-current-link-background-color);}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.sidebar-crate{display:flex;align-items:center;justify-content:center;margin:14px 32px 1rem;row-gap:10px;column-gap:32px;flex-wrap:wrap;}.sidebar-crate h2{flex-grow:1;margin:0 -8px;align-self:start;}.sidebar-crate .logo-container{margin:0 -16px 0 -16px;text-align:center;}.sidebar-crate h2 a{display:block;margin:0 calc(-24px + 0.25rem) 0 -0.5rem;padding:calc((16px - 0.57rem ) / 2 ) 0.25rem;padding-left:0.5rem;}.sidebar-crate h2 .version{display:block;font-weight:normal;font-size:1rem;overflow-wrap:break-word;margin-top:calc((-16px + 0.57rem ) / 2 );}.sidebar-crate+.version{margin-top:-1rem;margin-bottom:1rem;}.mobile-topbar{display:none;}.rustdoc .example-wrap{display:flex;position:relative;margin-bottom:10px;}.rustdoc .example-wrap:last-child{margin-bottom:0px;}.rustdoc .example-wrap pre{margin:0;flex-grow:1;}.rustdoc:not(.src) .example-wrap pre{overflow:auto hidden;}.rustdoc .example-wrap pre.example-line-numbers,.rustdoc .example-wrap pre.src-line-numbers{flex-grow:0;min-width:fit-content;overflow:initial;text-align:right;-webkit-user-select:none;user-select:none;padding:14px 8px;color:var(--src-line-numbers-span-color);}.rustdoc .example-wrap pre.src-line-numbers{padding:14px 0;}.src-line-numbers a,.src-line-numbers span{color:var(--src-line-numbers-span-color);padding:0 8px;}.src-line-numbers :target{background-color:transparent;border-right:none;padding:0 8px;}.src-line-numbers .line-highlighted{background-color:var(--src-line-number-highlighted-background-color);}.search-loading{text-align:center;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock :not(pre)>code,.docblock-short code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.more-examples-toggle):not(.example-wrap){max-width:100%;overflow-x:auto;}.out-of-band{flex-grow:0;font-size:1.125rem;}.docblock code,.docblock-short code,pre,.rustdoc.src .example-wrap{background-color:var(--code-block-background-color);}#main-content{position:relative;}.docblock table{margin:.5em 0;border-collapse:collapse;}.docblock table td,.docblock table th{padding:.5em;border:1px solid var(--border-color);}.docblock table tbody tr:nth-child(2n){background:var(--table-alt-row-background-color);}.method .where,.fn .where,.where.fmt-newline{display:block;white-space:pre-wrap;font-size:0.875rem;}.item-info{display:block;margin-left:24px;}.item-info code{font-size:0.875rem;}#main-content>.item-info{margin-left:0;}nav.sub{flex-grow:1;flex-flow:row nowrap;margin:4px 0 25px 0;display:flex;align-items:center;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;}.src nav.sub{margin:0 0 15px 0;}.small-section-header{display:block;position:relative;}.small-section-header:hover>.anchor,.impl:hover>.anchor,.trait-impl:hover>.anchor,.variant:hover>.anchor{display:initial;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-15px;padding-right:8px;}h2.small-section-header>.anchor{padding-right:6px;}.main-heading a:hover,.example-wrap .rust a:hover,.all-items a:hover,.docblock a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.docblock-short a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.item-info a{text-decoration:underline;}.crate.block a.current{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;padding:0;margin:0;}.item-table>li{display:table-row;}.item-table>li>div{display:table-cell;}.item-table>li>.item-name{padding-right:1.25rem;}.search-results-title{margin-top:0;white-space:nowrap;display:flex;align-items:baseline;}#crate-search-div{position:relative;min-width:5em;}#crate-search{min-width:115px;padding:0 23px 0 4px;max-width:100%;text-overflow:ellipsis;border:1px solid var(--border-color);border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;background-color:var(--main-background-color);color:inherit;line-height:1.5;font-weight:500;}#crate-search:hover,#crate-search:focus{border-color:var(--crate-search-hover-border);}#crate-search-div::after{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;content:"";background-repeat:no-repeat;background-size:20px;background-position:calc(100% - 2px) 56%;background-image:url('data:image/svg+xml, \ - ');filter:var(--crate-search-div-filter);}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:var(--crate-search-div-hover-filter);}#crate-search>option{font-size:1rem;}.search-input{-webkit-appearance:none;outline:none;border:1px solid var(--border-color);border-radius:2px;padding:8px;font-size:1rem;flex-grow:1;background-color:var(--button-background-color);color:var(--search-color);}.search-input:focus{border-color:var(--search-input-focused-border-color);}.search-results{display:none;}.search-results.active{display:block;}.search-results>a{display:flex;margin-left:2px;margin-right:2px;border-bottom:1px solid var(--search-result-border-color);gap:1em;}.search-results>a>div.desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:2;}.search-results a:hover,.search-results a:focus{background-color:var(--search-result-link-focus-background-color);}.search-results .result-name{display:flex;align-items:center;justify-content:start;flex:3;}.search-results .result-name .alias{color:var(--search-results-alias-color);}.search-results .result-name .grey{color:var(--search-results-grey-color);}.search-results .result-name .typename{color:var(--search-results-grey-color);font-size:0.875rem;width:var(--search-typename-width);}.search-results .result-name .path{word-break:break-all;max-width:calc(100% - var(--search-typename-width));display:inline-block;}.search-results .result-name .path>*{display:inline;}.popover{position:absolute;top:100%;right:0;z-index:2;margin-top:7px;border-radius:3px;border:1px solid var(--border-color);background-color:var(--main-background-color);color:var(--main-color);--popover-arrow-offset:11px;}.popover::before{content:'';position:absolute;right:var(--popover-arrow-offset);border:solid var(--border-color);border-width:1px 1px 0 0;background-color:var(--main-background-color);padding:4px;transform:rotate(-45deg);top:-5px;}.setting-line{margin:1.2em 0.6em;}.setting-radio input,.setting-check input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:2px solid var(--settings-input-border-color);outline:none;-webkit-appearance:none;cursor:pointer;}.setting-radio input{border-radius:50%;}.setting-radio span,.setting-check span{padding-bottom:1px;}.setting-radio{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:inline-flex;align-items:center;cursor:pointer;}.setting-radio+.setting-radio{margin-left:0.5em;}.setting-check{margin-right:20px;display:flex;align-items:center;cursor:pointer;}.setting-radio input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-check input:checked{background-color:var(--settings-input-color);border-width:1px;content:url('data:image/svg+xml,\ - \ - ');}.setting-radio input:focus,.setting-check input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-radio input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-radio input:hover,.setting-check input:hover{border-color:var(--settings-input-color) !important;}#help.popover{max-width:600px;--popover-arrow-offset:48px;}#help dt{float:left;clear:left;margin-right:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;}#help span.top{margin:10px 0;border-bottom:1px solid var(--border-color);padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid var(--border-color);}.side-by-side>div{width:50%;float:left;padding:0 20px 20px 17px;}.item-info .stab{min-height:36px;display:flex;padding:3px;margin-bottom:5px;align-items:center;vertical-align:text-bottom;}.item-name .stab{margin-left:0.3125em;}.stab{padding:0 2px;font-size:0.875rem;font-weight:normal;color:var(--main-color);background-color:var(--stab-background-color);width:fit-content;white-space:pre-wrap;border-radius:3px;display:inline;vertical-align:baseline;}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji{font-size:1.25rem;margin-right:0.3rem;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;float:right;}.rightside:not(a),.out-of-band{color:var(--right-side-color);}pre.rust{tab-size:4;-moz-tab-size:4;}pre.rust .kw{color:var(--code-highlight-kw-color);}pre.rust .kw-2{color:var(--code-highlight-kw-2-color);}pre.rust .lifetime{color:var(--code-highlight-lifetime-color);}pre.rust .prelude-ty{color:var(--code-highlight-prelude-color);}pre.rust .prelude-val{color:var(--code-highlight-prelude-val-color);}pre.rust .string{color:var(--code-highlight-string-color);}pre.rust .number{color:var(--code-highlight-number-color);}pre.rust .bool-val{color:var(--code-highlight-literal-color);}pre.rust .self{color:var(--code-highlight-self-color);}pre.rust .attr{color:var(--code-highlight-attribute-color);}pre.rust .macro,pre.rust .macro-nonterminal{color:var(--code-highlight-macro-color);}pre.rust .question-mark{font-weight:bold;color:var(--code-highlight-question-mark-color);}pre.rust .comment{color:var(--code-highlight-comment-color);}pre.rust .doccomment{color:var(--code-highlight-doc-comment-color);}.rustdoc.src .example-wrap pre.rust a{background:var(--codeblock-link-background);}.example-wrap.compile_fail,.example-wrap.should_panic{border-left:2px solid var(--codeblock-error-color);}.ignore.example-wrap{border-left:2px solid var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover,.example-wrap.should_panic:hover{border-left:2px solid var(--codeblock-error-hover-color);}.example-wrap.ignore:hover{border-left:2px solid var(--codeblock-ignore-hover-color);}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip{color:var(--codeblock-error-color);}.example-wrap.ignore .tooltip{color:var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover .tooltip,.example-wrap.should_panic:hover .tooltip{color:var(--codeblock-error-hover-color);}.example-wrap.ignore:hover .tooltip{color:var(--codeblock-ignore-hover-color);}.example-wrap .tooltip{position:absolute;display:block;left:-25px;top:5px;margin:0;line-height:1;}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip,.example-wrap.ignore .tooltip{font-weight:bold;font-size:1.25rem;}.content .docblock .warning{border-left:2px solid var(--warning-border-color);padding:14px;position:relative;overflow-x:visible !important;}.content .docblock .warning::before{color:var(--warning-border-color);content:"ⓘ";position:absolute;left:-25px;top:5px;font-weight:bold;font-size:1.25rem;}a.test-arrow{visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;color:var(--test-arrow-color);background-color:var(--test-arrow-background-color);}a.test-arrow:hover{color:var(--test-arrow-hover-color);background-color:var(--test-arrow-hover-background-color);}.example-wrap:hover .test-arrow{visibility:visible;}.code-attribute{font-weight:300;color:var(--code-attribute-color);}.item-spacer{width:100%;height:12px;display:block;}.out-of-band>span.since{font-size:1.25rem;}.sub-variant h4{font-size:1rem;font-weight:400;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}:target{padding-right:3px;background-color:var(--target-background-color);border-right:3px solid var(--target-border-color);}.code-header a.tooltip{color:inherit;margin-right:15px;position:relative;}.code-header a.tooltip:hover{color:var(--link-color);}a.tooltip:hover::after{position:absolute;top:calc(100% - 10px);left:-15px;right:-15px;height:20px;content:"\00a0";}.fade-out{opacity:0;transition:opacity 0.45s cubic-bezier(0,0,0.1,1.0);}.popover.tooltip .content{margin:0.25em 0.5em;}.popover.tooltip .content pre,.popover.tooltip .content code{background:transparent;margin:0;padding:0;font-size:1.25rem;white-space:pre-wrap;}.popover.tooltip .content>h3:first-child{margin:0 0 5px 0;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#search-tabs{display:flex;flex-direction:row;gap:1px;margin-bottom:4px;}#search-tabs button{text-align:center;font-size:1.125rem;border:0;border-top:2px solid;flex:1;line-height:1.5;color:inherit;}#search-tabs button:not(.selected){background-color:var(--search-tab-button-not-selected-background);border-top-color:var(--search-tab-button-not-selected-border-top-color);}#search-tabs button:hover,#search-tabs button.selected{background-color:var(--search-tab-button-selected-background);border-top-color:var(--search-tab-button-selected-border-top-color);}#search-tabs .count{font-size:1rem;font-variant-numeric:tabular-nums;color:var(--search-tab-title-count-color);}#search .error code{border-radius:3px;background-color:var(--search-error-code-background-color);}.search-corrections{font-weight:normal;}#src-sidebar-toggle{position:sticky;top:0;left:0;font-size:1.25rem;border-bottom:1px solid;display:flex;height:40px;justify-content:stretch;align-items:stretch;z-index:10;}#src-sidebar{width:100%;overflow:auto;}#src-sidebar>.title{font-size:1.5rem;text-align:center;border-bottom:1px solid var(--border-color);margin-bottom:6px;}#src-sidebar div.files>a:hover,details.dir-entry summary:hover,#src-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:var(--src-sidebar-background-hover);}#src-sidebar div.files>a.selected{background-color:var(--src-sidebar-background-selected);}#src-sidebar-toggle>button{font-size:inherit;font-weight:bold;background:none;color:inherit;text-align:center;border:none;outline:none;flex:1 1;-webkit-appearance:none;opacity:1;}#settings-menu,#help-button{margin-left:4px;display:flex;}#settings-menu>a,#help-button>a{display:flex;align-items:center;justify-content:center;background-color:var(--button-background-color);border:1px solid var(--border-color);border-radius:2px;color:var(--settings-button-color);font-size:20px;width:33px;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>a:hover,#help-button>a:focus{border-color:var(--settings-button-border-focus);}#copy-path{color:var(--copy-path-button-color);background:var(--main-background-color);height:34px;margin-left:10px;padding:0;padding-left:2px;border:0;width:33px;}#copy-path>img{filter:var(--copy-path-img-filter);}#copy-path:hover>img{filter:var(--copy-path-img-hover-filter);}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px var(--border-color);border-radius:3px;color:var(--kbd-color);background-color:var(--kbd-background);box-shadow:inset 0 -1px 0 var(--kbd-box-shadow-color);}ul.all-items>li{list-style:none;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 -4px;padding:0 0 0 4px;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.toggle{contain:layout;position:relative;}details.toggle>summary.hideme{cursor:pointer;font-size:1rem;}details.toggle>summary{list-style:none;outline:none;}details.toggle>summary::-webkit-details-marker,details.toggle>summary::marker{display:none;}details.toggle>summary.hideme>span{margin-left:9px;}details.toggle>summary::before{background:url('data:image/svg+xml,') no-repeat top left;content:"";cursor:pointer;width:16px;height:16px;display:inline-block;vertical-align:middle;opacity:.5;filter:var(--toggle-filter);}details.toggle>summary.hideme>span,.more-examples-toggle summary,.more-examples-toggle .hide-more{color:var(--toggles-color);}details.toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.toggle>summary.hideme::after{content:"";}details.toggle>summary:focus::before,details.toggle>summary:hover::before{opacity:1;}details.toggle>summary:focus-visible::before{outline:1px dotted #000;outline-offset:1px;}details.non-exhaustive{margin-bottom:8px;}details.toggle>summary.hideme::before{position:relative;}details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.toggle[open] >summary.hideme{position:absolute;}details.toggle[open] >summary.hideme>span{display:none;}details.toggle[open] >summary::before{background:url('data:image/svg+xml,') no-repeat top left;}details.toggle[open] >summary::after{content:"Collapse";}.docblock summary>*{display:inline-block;}.docblock>.example-wrap:first-child .tooltip{margin-top:16px;}@media (max-width:850px){#search-tabs .count{display:block;}}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.rustdoc{display:block;}main{padding-left:15px;padding-top:0px;}.main-heading{flex-direction:column;}.out-of-band{text-align:left;margin-left:initial;padding:initial;}.out-of-band .since::before{content:"Since ";}.sidebar .logo-container,.sidebar .location{display:none;}.sidebar{position:fixed;top:45px;left:-1000px;z-index:11;height:calc(100vh - 45px);width:200px;}.src main,.rustdoc.src .sidebar{top:0;padding:0;height:100vh;border:0;}.sidebar.shown,.src-sidebar-expanded .src .sidebar,.rustdoc:not(.src) .sidebar:focus-within{left:0;}.mobile-topbar h2{padding-bottom:0;margin:auto 0.5em auto auto;overflow:hidden;font-size:24px;}.mobile-topbar h2 a{display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin:5px 0 5px 20px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.sidebar-menu-toggle{width:45px;font-size:32px;border:none;color:var(--main-color);}.sidebar-elems{margin-top:1em;}.anchor{display:none !important;}#main-content>details.toggle>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}#src-sidebar-toggle{position:fixed;left:1px;top:100px;width:30px;font-size:1.5rem;padding:0;z-index:10;border-top-right-radius:3px;border-bottom-right-radius:3px;border:1px solid;border-left:0;}.src-sidebar-expanded #src-sidebar-toggle{left:unset;top:unset;width:unset;border-top-right-radius:unset;border-bottom-right-radius:unset;position:sticky;border:0;border-bottom:1px solid;}#copy-path,#help-button{display:none;}.item-table,.item-row,.item-table>li,.item-table>li>div,.search-results>a,.search-results>a>div{display:block;}.search-results>a{padding:5px 0px;}.search-results>a>div.desc,.item-table>li>div.desc{padding-left:2em;}.search-results .result-name{display:block;}.search-results .result-name .typename{width:initial;margin-right:0;}.search-results .result-name .typename,.search-results .result-name .path{display:inline;}.src-sidebar-expanded .src .sidebar{max-width:100vw;width:100vw;}details.toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>details.toggle:not(.top-doc)>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}.impl-items>.item-info{margin-left:34px;}.src nav.sub{margin:0;padding:var(--nav-sub-mobile-padding);}}@media (min-width:701px){.scraped-example-title{position:absolute;z-index:10;background:var(--main-background-color);bottom:8px;right:5px;padding:2px 4px;box-shadow:0 0 4px var(--main-background-color);}}@media print{nav.sidebar,nav.sub,.out-of-band,a.src,#copy-path,details.toggle[open] >summary::before,details.toggle>summary::before,details.toggle.top-doc>summary{display:none;}.docblock{margin-left:0;}main{padding:10px;}}@media (max-width:464px){.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}nav.sub{flex-direction:column;}.search-form{align-self:stretch;}.sub-logo-container>img{height:35px;width:35px;margin-bottom:var(--nav-sub-mobile-padding);}}.variant,.implementors-toggle>summary,.impl,#implementors-list>.docblock,.impl-items>section,.impl-items>.toggle>summary,.methods>section,.methods>.toggle>summary{margin-bottom:0.75em;}.variants>.docblock,.implementors-toggle>.docblock,.impl-items>.toggle[open]:not(:last-child),.methods>.toggle[open]:not(:last-child),.implementors-toggle[open]:not(:last-child){margin-bottom:2em;}#trait-implementations-list .impl-items>.toggle:not(:last-child),#synthetic-implementations-list .impl-items>.toggle:not(:last-child),#blanket-implementations-list .impl-items>.toggle:not(:last-child){margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;border:1px solid var(--scrape-example-help-border-color);border-radius:50px;color:var(--scrape-example-help-color);}.scraped-example-list .scrape-help:hover{border-color:var(--scrape-example-help-hover-border-color);color:var(--scrape-example-help-hover-color);}.scraped-example{position:relative;}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:calc(1.5em * 5 + 10px);}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;padding-bottom:0;max-height:calc(1.5em * 5 + 10px);}.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper,.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper pre{max-height:calc(1.5em * 10 + 10px);}.scraped-example .code-wrapper .next,.scraped-example .code-wrapper .prev,.scraped-example .code-wrapper .expand{color:var(--main-color);position:absolute;top:0.25em;z-index:1;padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.scraped-example .code-wrapper .prev{right:2.25em;}.scraped-example .code-wrapper .next{right:1.25em;}.scraped-example .code-wrapper .expand{right:0.25em;}.scraped-example:not(.expanded) .code-wrapper::before,.scraped-example:not(.expanded) .code-wrapper::after{content:" ";width:100%;height:5px;position:absolute;z-index:1;}.scraped-example:not(.expanded) .code-wrapper::before{top:0;background:linear-gradient(to bottom,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded) .code-wrapper::after{bottom:0;background:linear-gradient(to top,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example .code-wrapper .example-wrap{width:100%;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .example-wrap .rust span.highlight{background:var(--scrape-example-code-line-highlight);}.scraped-example .example-wrap .rust span.highlight.focus{background:var(--scrape-example-code-line-highlight-focus);}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;cursor:pointer;}.more-scraped-examples{margin-left:25px;position:relative;}.toggle-line{position:absolute;top:5px;bottom:0;right:calc(100% + 10px);padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;background:var(--scrape-example-toggle-line-background);}.toggle-line:hover .toggle-line-inner{background:var(--scrape-example-toggle-line-hover-background);}.more-scraped-examples .scraped-example,.example-links{margin-top:20px;}.more-scraped-examples .scraped-example:first-child{margin-top:5px;}.example-links ul{margin-bottom:0;}:root[data-theme="light"]{--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);}:root[data-theme="dark"]{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);}:root[data-theme="ayu"]{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--settings-input-border-color:#999;--settings-button-color:#fff;--settings-button-border-focus:#e0e0e0;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;--border-color:#5c6773;--button-background-color:#141920;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#5c6773;--copy-path-button-color:#fff;--copy-path-img-filter:invert(70%);--copy-path-img-hover-filter:invert(100%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ffa0a5;--trait-link-color:#39afd7;--assoc-item-link-color:#39afd7;--function-link-color:#fdd687;--macro-link-color:#a37acc;--keyword-link-color:#39afd7;--mod-link-color:#39afd7;--link-color:#39afd7;--sidebar-link-color:#53b1db;--sidebar-current-link-background-color:transparent;--search-result-link-focus-background-color:#3c3c3c;--search-result-border-color:#aaa3;--search-color:#fff;--search-error-code-background-color:#4f4c4c;--search-results-alias-color:#c5c5c5;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:none;--search-tab-button-not-selected-background:transparent !important;--search-tab-button-selected-border-top-color:none;--search-tab-button-selected-background:#141920 !important;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ff7733;--code-highlight-kw-2-color:#ff7733;--code-highlight-lifetime-color:#ff7733;--code-highlight-prelude-color:#69f2df;--code-highlight-prelude-val-color:#ff7733;--code-highlight-number-color:#b8cc52;--code-highlight-string-color:#b8cc52;--code-highlight-literal-color:#ff7733;--code-highlight-attribute-color:#e6e1cf;--code-highlight-self-color:#36a3d9;--code-highlight-macro-color:#a37acc;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#788797;--code-highlight-doc-comment-color:#a1ac88;--src-line-numbers-span-color:#5c6773;--src-line-number-highlighted-background-color:rgba(255,236,164,0.06);--test-arrow-color:#788797;--test-arrow-background-color:rgba(57,175,215,0.09);--test-arrow-hover-color:#c5c5c5;--test-arrow-hover-background-color:rgba(57,175,215,0.368);--target-background-color:rgba(255,236,164,0.06);--target-border-color:rgba(255,180,76,0.85);--kbd-color:#c5c5c5;--kbd-background:#314559;--kbd-box-shadow-color:#5c6773;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);--crate-search-div-hover-filter:invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);--crate-search-hover-border:#e0e0e0;--src-sidebar-background-selected:#14191f;--src-sidebar-background-hover:#14191f;--table-alt-row-background-color:#191f26;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(15,20,25,1);--scrape-example-code-wrapper-background-end:rgba(15,20,25,0);}:root[data-theme="ayu"] h1,:root[data-theme="ayu"] h2,:root[data-theme="ayu"] h3,:root[data-theme="ayu"] h4,:where(:root[data-theme="ayu"]) h1 a,:root[data-theme="ayu"] .sidebar h2 a,:root[data-theme="ayu"] .sidebar h3 a,:root[data-theme="ayu"] #source-sidebar>.title{color:#fff;}:root[data-theme="ayu"] .docblock code{color:#ffb454;}:root[data-theme="ayu"] .docblock a>code{color:#39AFD7 !important;}:root[data-theme="ayu"] .code-header,:root[data-theme="ayu"] .docblock pre>code,:root[data-theme="ayu"] pre,:root[data-theme="ayu"] pre>code,:root[data-theme="ayu"] .item-info code,:root[data-theme="ayu"] .rustdoc.source .example-wrap{color:#e6e1cf;}:root[data-theme="ayu"] .sidebar .current,:root[data-theme="ayu"] .sidebar a:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:hover,:root[data-theme="ayu"] details.dir-entry summary:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:focus,:root[data-theme="ayu"] details.dir-entry summary:focus,:root[data-theme="ayu"] #src-sidebar div.files>a.selected{color:#ffb44c;}:root[data-theme="ayu"] .sidebar-elems .location{color:#ff7733;}:root[data-theme="ayu"] .src-line-numbers .line-highlighted{color:#708090;padding-right:7px;border-right:1px solid #ffb44c;}:root[data-theme="ayu"] .search-results a:hover,:root[data-theme="ayu"] .search-results a:focus{color:#fff !important;background-color:#3c3c3c;}:root[data-theme="ayu"] .search-results a{color:#0096cf;}:root[data-theme="ayu"] .search-results a div.desc{color:#c5c5c5;}:root[data-theme="ayu"] .result-name .primitive>i,:root[data-theme="ayu"] .result-name .keyword>i{color:#788797;}:root[data-theme="ayu"] #search-tabs>button.selected{border-bottom:1px solid #ffb44c !important;border-top:none;}:root[data-theme="ayu"] #search-tabs>button:not(.selected){border:none;background-color:transparent !important;}:root[data-theme="ayu"] #search-tabs>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}:root[data-theme="ayu"] #settings-menu>a img{filter:invert(100);} \ No newline at end of file diff --git a/static.files/rustdoc-ac92e1bbe349e143.css b/static.files/rustdoc-ac92e1bbe349e143.css new file mode 100644 index 000000000..27e3d9d5a --- /dev/null +++ b/static.files/rustdoc-ac92e1bbe349e143.css @@ -0,0 +1,18 @@ + :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;--desktop-sidebar-width:200px;--src-sidebar-width:300px;--desktop-sidebar-z-index:100;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular-018c141bf0843ffd.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium-8f9a781e4970d388.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular-46f98efaafac5295.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{box-sizing:border-box;}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:25px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}.docblock>h2:first-child,.docblock>h3:first-child,.docblock>h4:first-child,.docblock>h5:first-child,.docblock>h6:first-child{margin-top:0;}.main-heading h1{margin:0;padding:0;flex-grow:1;overflow-wrap:break-word;overflow-wrap:anywhere;}.main-heading{display:flex;flex-wrap:wrap;padding-bottom:6px;margin-bottom:15px;}.content h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h1,h2{line-height:1.25;padding-top:3px;padding-bottom:9px;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;margin:0;padding:0;white-space:pre-wrap;}#crate-search,h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,.search-input,.search-results .result-name,.item-name>a,.out-of-band,span.since,a.src,#help-button>a,summary.hideme,.scraped-example-list,ul.all-items{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}#toggle-all-docs,a.anchor,.section-header a,#src-sidebar a,.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,h1 a,.search-results a,.stab,.result-name i{color:var(--main-color);}span.enum,a.enum,span.struct,a.struct,span.union,a.union,span.primitive,a.primitive,span.type,a.type,span.foreigntype,a.foreigntype{color:var(--type-link-color);}span.trait,a.trait,span.traitalias,a.traitalias{color:var(--trait-link-color);}span.associatedtype,a.associatedtype,span.constant,a.constant,span.static,a.static{color:var(--assoc-item-link-color);}span.fn,a.fn,span.method,a.method,span.tymethod,a.tymethod{color:var(--function-link-color);}span.attr,a.attr,span.derive,a.derive,span.macro,a.macro{color:var(--macro-link-color);}span.mod,a.mod{color:var(--mod-link-color);}span.keyword,a.keyword{color:var(--keyword-link-color);}a{color:var(--link-color);text-decoration:none;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p,.docblock>.warning{margin:0 0 .75em 0;}p:last-child,.docblock>.warning:last-child{margin:0;}button{padding:1px 6px;cursor:pointer;}button#toggle-all-docs{padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.src main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}details:not(.toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;line-height:1.5;}pre.item-decl{overflow-x:auto;}.item-decl .type-contents-toggle{contain:initial;}.src .content pre{padding:20px;}.rustdoc.src .example-wrap pre.src-line-numbers{padding:20px 0 20px 4px;}img{max-width:100%;}.sub-logo-container,.logo-container{line-height:0;display:block;}.sub-logo-container{margin-right:32px;}.sub-logo-container>img{height:60px;width:60px;object-fit:contain;}.rust-logo{filter:var(--rust-logo-filter);}.sidebar{font-size:0.875rem;flex:0 0 var(--desktop-sidebar-width);width:var(--desktop-sidebar-width);overflow-y:scroll;overscroll-behavior:contain;position:sticky;height:100vh;top:0;left:0;z-index:var(--desktop-sidebar-z-index);}.rustdoc.src .sidebar{flex-basis:50px;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;}.hide-sidebar .sidebar,.hide-sidebar .sidebar-resizer{display:none;}.sidebar-resizer{touch-action:none;width:9px;cursor:col-resize;z-index:calc(var(--desktop-sidebar-z-index) + 1);position:fixed;height:100%;left:calc(var(--desktop-sidebar-width) + 1px);}.rustdoc.src .sidebar-resizer{left:49px;}.src-sidebar-expanded .rustdoc.src .sidebar-resizer{left:var(--src-sidebar-width);}.sidebar-resizing{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.sidebar-resizing*{cursor:col-resize !important;}.sidebar-resizing .sidebar{position:fixed;}.sidebar-resizing>body{padding-left:var(--resizing-sidebar-width);}.sidebar-resizer:hover,.sidebar-resizer:active,.sidebar-resizer:focus,.sidebar-resizer.active{width:10px;margin:0;left:var(--desktop-sidebar-width);border-left:solid 1px var(--sidebar-resizer-hover);}.src-sidebar-expanded .rustdoc.src .sidebar-resizer:hover,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:active,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:focus,.src-sidebar-expanded .rustdoc.src .sidebar-resizer.active{left:calc(var(--src-sidebar-width) - 1px);}@media (pointer:coarse){.sidebar-resizer{display:none !important;}}.sidebar-resizer.active{padding:0 140px;width:2px;margin-left:-140px;border-left:none;}.sidebar-resizer.active:before{border-left:solid 2px var(--sidebar-resizer-active);display:block;height:100%;content:"";}.sidebar,.mobile-topbar,.sidebar-menu-toggle,#src-sidebar-toggle,#src-sidebar{background-color:var(--sidebar-background-color);}#src-sidebar-toggle>button:hover,#src-sidebar-toggle>button:focus{background-color:var(--sidebar-background-color-hover);}.src .sidebar>*:not(#src-sidebar-toggle){visibility:hidden;}.src-sidebar-expanded .src .sidebar{overflow-y:auto;flex-basis:var(--src-sidebar-width);width:var(--src-sidebar-width);}.src-sidebar-expanded .src .sidebar>*:not(#src-sidebar-toggle){visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.logo-container>img{height:48px;width:48px;}ul.block,.block li{padding:0;margin:0;list-style:none;}.sidebar-elems a,.sidebar>h2 a{display:block;padding:0.25rem;margin-left:-0.25rem;margin-right:0.25rem;}.sidebar h2{overflow-wrap:anywhere;padding:0;margin:0.7rem 0;}.sidebar h3{font-size:1.125rem;padding:0;margin:0;}.sidebar-elems,.sidebar>.version,.sidebar>h2{padding-left:24px;}.sidebar a{color:var(--sidebar-link-color);}.sidebar .current,.sidebar .current a,.sidebar-crate a.logo-container:hover+h2 a,.sidebar a:hover:not(.logo-container){background-color:var(--sidebar-current-link-background-color);}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.sidebar-crate{display:flex;align-items:center;justify-content:center;margin:14px 32px 1rem;row-gap:10px;column-gap:32px;flex-wrap:wrap;}.sidebar-crate h2{flex-grow:1;margin:0 -8px;align-self:start;}.sidebar-crate .logo-container{margin:0 -16px 0 -16px;text-align:center;}.sidebar-crate h2 a{display:block;margin:0 calc(-24px + 0.25rem) 0 -0.5rem;padding:calc((16px - 0.57rem ) / 2 ) 0.25rem;padding-left:0.5rem;}.sidebar-crate h2 .version{display:block;font-weight:normal;font-size:1rem;overflow-wrap:break-word;margin-top:calc((-16px + 0.57rem ) / 2 );}.sidebar-crate+.version{margin-top:-1rem;margin-bottom:1rem;}.mobile-topbar{display:none;}.rustdoc .example-wrap{display:flex;position:relative;margin-bottom:10px;}.rustdoc .example-wrap:last-child{margin-bottom:0px;}.rustdoc .example-wrap pre{margin:0;flex-grow:1;}.rustdoc:not(.src) .example-wrap pre{overflow:auto hidden;}.rustdoc .example-wrap pre.example-line-numbers,.rustdoc .example-wrap pre.src-line-numbers{flex-grow:0;min-width:fit-content;overflow:initial;text-align:right;-webkit-user-select:none;user-select:none;padding:14px 8px;color:var(--src-line-numbers-span-color);}.rustdoc .example-wrap pre.src-line-numbers{padding:14px 0;}.src-line-numbers a,.src-line-numbers span{color:var(--src-line-numbers-span-color);padding:0 8px;}.src-line-numbers :target{background-color:transparent;border-right:none;padding:0 8px;}.src-line-numbers .line-highlighted{background-color:var(--src-line-number-highlighted-background-color);}.search-loading{text-align:center;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock :not(pre)>code,.docblock-short code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.more-examples-toggle):not(.example-wrap){max-width:100%;overflow-x:auto;}.out-of-band{flex-grow:0;font-size:1.125rem;}.docblock code,.docblock-short code,pre,.rustdoc.src .example-wrap{background-color:var(--code-block-background-color);}#main-content{position:relative;}.docblock table{margin:.5em 0;border-collapse:collapse;}.docblock table td,.docblock table th{padding:.5em;border:1px solid var(--border-color);}.docblock table tbody tr:nth-child(2n){background:var(--table-alt-row-background-color);}div.where{white-space:pre-wrap;font-size:0.875rem;}.item-info{display:block;margin-left:24px;}.item-info code{font-size:0.875rem;}#main-content>.item-info{margin-left:0;}nav.sub{flex-grow:1;flex-flow:row nowrap;margin:4px 0 25px 0;display:flex;align-items:center;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;}.src nav.sub{margin:0 0 15px 0;}.section-header{display:block;position:relative;}.section-header:hover>.anchor,.impl:hover>.anchor,.trait-impl:hover>.anchor,.variant:hover>.anchor{display:initial;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.section-header>.anchor{left:-15px;padding-right:8px;}h2.section-header>.anchor{padding-right:6px;}.main-heading a:hover,.example-wrap .rust a:hover,.all-items a:hover,.docblock a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.docblock-short a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.item-info a{text-decoration:underline;}.crate.block li.current a{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;padding:0;margin:0;}.item-table>li{display:table-row;}.item-table>li>div{display:table-cell;}.item-table>li>.item-name{padding-right:1.25rem;}.search-results-title{margin-top:0;white-space:nowrap;display:flex;align-items:baseline;}#crate-search-div{position:relative;min-width:5em;}#crate-search{min-width:115px;padding:0 23px 0 4px;max-width:100%;text-overflow:ellipsis;border:1px solid var(--border-color);border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;background-color:var(--main-background-color);color:inherit;line-height:1.5;font-weight:500;}#crate-search:hover,#crate-search:focus{border-color:var(--crate-search-hover-border);}#crate-search-div::after{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;content:"";background-repeat:no-repeat;background-size:20px;background-position:calc(100% - 2px) 56%;background-image:url('data:image/svg+xml, \ + ');filter:var(--crate-search-div-filter);}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:var(--crate-search-div-hover-filter);}#crate-search>option{font-size:1rem;}.search-input{-webkit-appearance:none;outline:none;border:1px solid var(--border-color);border-radius:2px;padding:8px;font-size:1rem;flex-grow:1;background-color:var(--button-background-color);color:var(--search-color);}.search-input:focus{border-color:var(--search-input-focused-border-color);}.search-results{display:none;}.search-results.active{display:block;}.search-results>a{display:flex;margin-left:2px;margin-right:2px;border-bottom:1px solid var(--search-result-border-color);gap:1em;}.search-results>a>div.desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:2;}.search-results a:hover,.search-results a:focus{background-color:var(--search-result-link-focus-background-color);}.search-results .result-name{display:flex;align-items:center;justify-content:start;flex:3;}.search-results .result-name .alias{color:var(--search-results-alias-color);}.search-results .result-name .grey{color:var(--search-results-grey-color);}.search-results .result-name .typename{color:var(--search-results-grey-color);font-size:0.875rem;width:var(--search-typename-width);}.search-results .result-name .path{word-break:break-all;max-width:calc(100% - var(--search-typename-width));display:inline-block;}.search-results .result-name .path>*{display:inline;}.popover{position:absolute;top:100%;right:0;z-index:calc(var(--desktop-sidebar-z-index) + 1);margin-top:7px;border-radius:3px;border:1px solid var(--border-color);background-color:var(--main-background-color);color:var(--main-color);--popover-arrow-offset:11px;}.popover::before{content:'';position:absolute;right:var(--popover-arrow-offset);border:solid var(--border-color);border-width:1px 1px 0 0;background-color:var(--main-background-color);padding:4px;transform:rotate(-45deg);top:-5px;}.setting-line{margin:1.2em 0.6em;}.setting-radio input,.setting-check input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:2px solid var(--settings-input-border-color);outline:none;-webkit-appearance:none;cursor:pointer;}.setting-radio input{border-radius:50%;}.setting-radio span,.setting-check span{padding-bottom:1px;}.setting-radio{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:inline-flex;align-items:center;cursor:pointer;}.setting-radio+.setting-radio{margin-left:0.5em;}.setting-check{margin-right:20px;display:flex;align-items:center;cursor:pointer;}.setting-radio input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-check input:checked{background-color:var(--settings-input-color);border-width:1px;content:url('data:image/svg+xml,\ + \ + ');}.setting-radio input:focus,.setting-check input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-radio input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-radio input:hover,.setting-check input:hover{border-color:var(--settings-input-color) !important;}#help.popover{max-width:600px;--popover-arrow-offset:48px;}#help dt{float:left;clear:left;margin-right:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;}#help span.top{margin:10px 0;border-bottom:1px solid var(--border-color);padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid var(--border-color);}.side-by-side>div{width:50%;float:left;padding:0 20px 20px 17px;}.item-info .stab{display:block;padding:3px;margin-bottom:5px;}.item-name .stab{margin-left:0.3125em;}.stab{padding:0 2px;font-size:0.875rem;font-weight:normal;color:var(--main-color);background-color:var(--stab-background-color);width:fit-content;white-space:pre-wrap;border-radius:3px;display:inline;vertical-align:baseline;}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji,.item-info .stab::before{font-size:1.25rem;}.stab .emoji{margin-right:0.3rem;}.item-info .stab::before{content:"\0";width:0;display:inline-block;color:transparent;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;float:right;}.rightside:not(a),.out-of-band{color:var(--right-side-color);}pre.rust{tab-size:4;-moz-tab-size:4;}pre.rust .kw{color:var(--code-highlight-kw-color);}pre.rust .kw-2{color:var(--code-highlight-kw-2-color);}pre.rust .lifetime{color:var(--code-highlight-lifetime-color);}pre.rust .prelude-ty{color:var(--code-highlight-prelude-color);}pre.rust .prelude-val{color:var(--code-highlight-prelude-val-color);}pre.rust .string{color:var(--code-highlight-string-color);}pre.rust .number{color:var(--code-highlight-number-color);}pre.rust .bool-val{color:var(--code-highlight-literal-color);}pre.rust .self{color:var(--code-highlight-self-color);}pre.rust .attr{color:var(--code-highlight-attribute-color);}pre.rust .macro,pre.rust .macro-nonterminal{color:var(--code-highlight-macro-color);}pre.rust .question-mark{font-weight:bold;color:var(--code-highlight-question-mark-color);}pre.rust .comment{color:var(--code-highlight-comment-color);}pre.rust .doccomment{color:var(--code-highlight-doc-comment-color);}.rustdoc.src .example-wrap pre.rust a{background:var(--codeblock-link-background);}.example-wrap.compile_fail,.example-wrap.should_panic{border-left:2px solid var(--codeblock-error-color);}.ignore.example-wrap{border-left:2px solid var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover,.example-wrap.should_panic:hover{border-left:2px solid var(--codeblock-error-hover-color);}.example-wrap.ignore:hover{border-left:2px solid var(--codeblock-ignore-hover-color);}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip{color:var(--codeblock-error-color);}.example-wrap.ignore .tooltip{color:var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover .tooltip,.example-wrap.should_panic:hover .tooltip{color:var(--codeblock-error-hover-color);}.example-wrap.ignore:hover .tooltip{color:var(--codeblock-ignore-hover-color);}.example-wrap .tooltip{position:absolute;display:block;left:-25px;top:5px;margin:0;line-height:1;}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip,.example-wrap.ignore .tooltip{font-weight:bold;font-size:1.25rem;}.content .docblock .warning{border-left:2px solid var(--warning-border-color);padding:14px;position:relative;overflow-x:visible !important;}.content .docblock .warning::before{color:var(--warning-border-color);content:"ⓘ";position:absolute;left:-25px;top:5px;font-weight:bold;font-size:1.25rem;}a.test-arrow{visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;color:var(--test-arrow-color);background-color:var(--test-arrow-background-color);}a.test-arrow:hover{color:var(--test-arrow-hover-color);background-color:var(--test-arrow-hover-background-color);}.example-wrap:hover .test-arrow{visibility:visible;}.code-attribute{font-weight:300;color:var(--code-attribute-color);}.item-spacer{width:100%;height:12px;display:block;}.out-of-band>span.since{font-size:1.25rem;}.sub-variant h4{font-size:1rem;font-weight:400;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}:target{padding-right:3px;background-color:var(--target-background-color);border-right:3px solid var(--target-border-color);}.code-header a.tooltip{color:inherit;margin-right:15px;position:relative;}.code-header a.tooltip:hover{color:var(--link-color);}a.tooltip:hover::after{position:absolute;top:calc(100% - 10px);left:-15px;right:-15px;height:20px;content:"\00a0";}.fade-out{opacity:0;transition:opacity 0.45s cubic-bezier(0,0,0.1,1.0);}.popover.tooltip .content{margin:0.25em 0.5em;}.popover.tooltip .content pre,.popover.tooltip .content code{background:transparent;margin:0;padding:0;font-size:1.25rem;white-space:pre-wrap;}.popover.tooltip .content>h3:first-child{margin:0 0 5px 0;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#search-tabs{display:flex;flex-direction:row;gap:1px;margin-bottom:4px;}#search-tabs button{text-align:center;font-size:1.125rem;border:0;border-top:2px solid;flex:1;line-height:1.5;color:inherit;}#search-tabs button:not(.selected){background-color:var(--search-tab-button-not-selected-background);border-top-color:var(--search-tab-button-not-selected-border-top-color);}#search-tabs button:hover,#search-tabs button.selected{background-color:var(--search-tab-button-selected-background);border-top-color:var(--search-tab-button-selected-border-top-color);}#search-tabs .count{font-size:1rem;font-variant-numeric:tabular-nums;color:var(--search-tab-title-count-color);}#search .error code{border-radius:3px;background-color:var(--search-error-code-background-color);}.search-corrections{font-weight:normal;}#src-sidebar-toggle{position:sticky;top:0;left:0;font-size:1.25rem;border-bottom:1px solid;display:flex;height:40px;justify-content:stretch;align-items:stretch;z-index:10;}#src-sidebar{width:100%;overflow:auto;}#src-sidebar>.title{font-size:1.5rem;text-align:center;border-bottom:1px solid var(--border-color);margin-bottom:6px;}#src-sidebar div.files>a:hover,details.dir-entry summary:hover,#src-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:var(--src-sidebar-background-hover);}#src-sidebar div.files>a.selected{background-color:var(--src-sidebar-background-selected);}#src-sidebar-toggle>button{font-size:inherit;font-weight:bold;background:none;color:inherit;text-align:center;border:none;outline:none;flex:1 1;-webkit-appearance:none;opacity:1;}#settings-menu,#help-button{margin-left:4px;display:flex;}#sidebar-button{display:none;}.hide-sidebar #sidebar-button{display:flex;margin-right:4px;position:fixed;left:6px;height:34px;width:34px;background-color:var(--main-background-color);z-index:1;}#settings-menu>a,#help-button>a,#sidebar-button>a{display:flex;align-items:center;justify-content:center;background-color:var(--button-background-color);border:1px solid var(--border-color);border-radius:2px;color:var(--settings-button-color);font-size:20px;width:33px;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>a:hover,#help-button>a:focus,#sidebar-button>a:hover,#sidebar-button>a:focus{border-color:var(--settings-button-border-focus);}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}#copy-path{color:var(--copy-path-button-color);background:var(--main-background-color);height:34px;margin-left:10px;padding:0;padding-left:2px;border:0;width:33px;}#copy-path>img{filter:var(--copy-path-img-filter);}#copy-path:hover>img{filter:var(--copy-path-img-hover-filter);}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px var(--border-color);border-radius:3px;color:var(--kbd-color);background-color:var(--kbd-background);box-shadow:inset 0 -1px 0 var(--kbd-box-shadow-color);}ul.all-items>li{list-style:none;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 -4px;padding:0 0 0 4px;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.toggle{contain:layout;position:relative;}details.toggle>summary.hideme{cursor:pointer;font-size:1rem;}details.toggle>summary{list-style:none;outline:none;}details.toggle>summary::-webkit-details-marker,details.toggle>summary::marker{display:none;}details.toggle>summary.hideme>span{margin-left:9px;}details.toggle>summary::before{background:url('data:image/svg+xml,') no-repeat top left;content:"";cursor:pointer;width:16px;height:16px;display:inline-block;vertical-align:middle;opacity:.5;filter:var(--toggle-filter);}details.toggle>summary.hideme>span,.more-examples-toggle summary,.more-examples-toggle .hide-more{color:var(--toggles-color);}details.toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.toggle>summary.hideme::after{content:"";}details.toggle>summary:focus::before,details.toggle>summary:hover::before{opacity:1;}details.toggle>summary:focus-visible::before{outline:1px dotted #000;outline-offset:1px;}details.non-exhaustive{margin-bottom:8px;}details.toggle>summary.hideme::before{position:relative;}details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.toggle[open] >summary.hideme{position:absolute;}details.toggle[open] >summary.hideme>span{display:none;}details.toggle[open] >summary::before{background:url('data:image/svg+xml,') no-repeat top left;}details.toggle[open] >summary::after{content:"Collapse";}.docblock summary>*{display:inline-block;}.docblock>.example-wrap:first-child .tooltip{margin-top:16px;}@media (max-width:850px){#search-tabs .count{display:block;}}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.hide-sidebar #sidebar-button{position:static;}.rustdoc{display:block;}main{padding-left:15px;padding-top:0px;}.main-heading{flex-direction:column;}.out-of-band{text-align:left;margin-left:initial;padding:initial;}.out-of-band .since::before{content:"Since ";}.sidebar .logo-container,.sidebar .location,.sidebar-resizer{display:none;}.sidebar{position:fixed;top:45px;left:-1000px;z-index:11;height:calc(100vh - 45px);width:200px;}.src main,.rustdoc.src .sidebar{top:0;padding:0;height:100vh;border:0;}.sidebar.shown,.src-sidebar-expanded .src .sidebar,.rustdoc:not(.src) .sidebar:focus-within{left:0;}.mobile-topbar h2{padding-bottom:0;margin:auto 0.5em auto auto;overflow:hidden;font-size:24px;}.mobile-topbar h2 a{display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin:5px 0 5px 20px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.hide-sidebar .mobile-topbar{display:none;}.sidebar-menu-toggle{width:45px;font-size:32px;border:none;color:var(--main-color);}.hide-sidebar .sidebar-menu-toggle{display:none;}.sidebar-elems{margin-top:1em;}.anchor{display:none !important;}#main-content>details.toggle>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}#src-sidebar-toggle{position:fixed;left:1px;top:100px;width:30px;font-size:1.5rem;padding:0;z-index:10;border-top-right-radius:3px;border-bottom-right-radius:3px;border:1px solid;border-left:0;}.src-sidebar-expanded #src-sidebar-toggle{left:unset;top:unset;width:unset;border-top-right-radius:unset;border-bottom-right-radius:unset;position:sticky;border:0;border-bottom:1px solid;}#copy-path,#help-button{display:none;}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}.item-table,.item-row,.item-table>li,.item-table>li>div,.search-results>a,.search-results>a>div{display:block;}.search-results>a{padding:5px 0px;}.search-results>a>div.desc,.item-table>li>div.desc{padding-left:2em;}.search-results .result-name{display:block;}.search-results .result-name .typename{width:initial;margin-right:0;}.search-results .result-name .typename,.search-results .result-name .path{display:inline;}.src-sidebar-expanded .src .sidebar{max-width:100vw;width:100vw;}details.toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>details.toggle:not(.top-doc)>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}.impl-items>.item-info{margin-left:34px;}.src nav.sub{margin:0;padding:var(--nav-sub-mobile-padding);}}@media (min-width:701px){.scraped-example-title{position:absolute;z-index:10;background:var(--main-background-color);bottom:8px;right:5px;padding:2px 4px;box-shadow:0 0 4px var(--main-background-color);}}@media print{nav.sidebar,nav.sub,.out-of-band,a.src,#copy-path,details.toggle[open] >summary::before,details.toggle>summary::before,details.toggle.top-doc>summary{display:none;}.docblock{margin-left:0;}main{padding:10px;}}@media (max-width:464px){.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}nav.sub{flex-direction:column;}.search-form{align-self:stretch;}.sub-logo-container>img{height:35px;width:35px;margin-bottom:var(--nav-sub-mobile-padding);}}.variant,.implementors-toggle>summary,.impl,#implementors-list>.docblock,.impl-items>section,.impl-items>.toggle>summary,.methods>section,.methods>.toggle>summary{margin-bottom:0.75em;}.variants>.docblock,.implementors-toggle>.docblock,.impl-items>.toggle[open]:not(:last-child),.methods>.toggle[open]:not(:last-child),.implementors-toggle[open]:not(:last-child){margin-bottom:2em;}#trait-implementations-list .impl-items>.toggle:not(:last-child),#synthetic-implementations-list .impl-items>.toggle:not(:last-child),#blanket-implementations-list .impl-items>.toggle:not(:last-child){margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;border:1px solid var(--scrape-example-help-border-color);border-radius:50px;color:var(--scrape-example-help-color);}.scraped-example-list .scrape-help:hover{border-color:var(--scrape-example-help-hover-border-color);color:var(--scrape-example-help-hover-color);}.scraped-example{position:relative;}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:calc(1.5em * 5 + 10px);}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;padding-bottom:0;max-height:calc(1.5em * 5 + 10px);}.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper,.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper pre{max-height:calc(1.5em * 10 + 10px);}.scraped-example .code-wrapper .next,.scraped-example .code-wrapper .prev,.scraped-example .code-wrapper .expand{color:var(--main-color);position:absolute;top:0.25em;z-index:1;padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.scraped-example .code-wrapper .prev{right:2.25em;}.scraped-example .code-wrapper .next{right:1.25em;}.scraped-example .code-wrapper .expand{right:0.25em;}.scraped-example:not(.expanded) .code-wrapper::before,.scraped-example:not(.expanded) .code-wrapper::after{content:" ";width:100%;height:5px;position:absolute;z-index:1;}.scraped-example:not(.expanded) .code-wrapper::before{top:0;background:linear-gradient(to bottom,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded) .code-wrapper::after{bottom:0;background:linear-gradient(to top,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example .code-wrapper .example-wrap{width:100%;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .example-wrap .rust span.highlight{background:var(--scrape-example-code-line-highlight);}.scraped-example .example-wrap .rust span.highlight.focus{background:var(--scrape-example-code-line-highlight-focus);}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;cursor:pointer;}.more-scraped-examples{margin-left:25px;position:relative;}.toggle-line{position:absolute;top:5px;bottom:0;right:calc(100% + 10px);padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;background:var(--scrape-example-toggle-line-background);}.toggle-line:hover .toggle-line-inner{background:var(--scrape-example-toggle-line-hover-background);}.more-scraped-examples .scraped-example,.example-links{margin-top:20px;}.more-scraped-examples .scraped-example:first-child{margin-top:5px;}.example-links ul{margin-bottom:0;}:root[data-theme="light"]{--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="dark"]{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="ayu"]{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--settings-input-border-color:#999;--settings-button-color:#fff;--settings-button-border-focus:#e0e0e0;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;--border-color:#5c6773;--button-background-color:#141920;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#5c6773;--copy-path-button-color:#fff;--copy-path-img-filter:invert(70%);--copy-path-img-hover-filter:invert(100%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ffa0a5;--trait-link-color:#39afd7;--assoc-item-link-color:#39afd7;--function-link-color:#fdd687;--macro-link-color:#a37acc;--keyword-link-color:#39afd7;--mod-link-color:#39afd7;--link-color:#39afd7;--sidebar-link-color:#53b1db;--sidebar-current-link-background-color:transparent;--search-result-link-focus-background-color:#3c3c3c;--search-result-border-color:#aaa3;--search-color:#fff;--search-error-code-background-color:#4f4c4c;--search-results-alias-color:#c5c5c5;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:none;--search-tab-button-not-selected-background:transparent !important;--search-tab-button-selected-border-top-color:none;--search-tab-button-selected-background:#141920 !important;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ff7733;--code-highlight-kw-2-color:#ff7733;--code-highlight-lifetime-color:#ff7733;--code-highlight-prelude-color:#69f2df;--code-highlight-prelude-val-color:#ff7733;--code-highlight-number-color:#b8cc52;--code-highlight-string-color:#b8cc52;--code-highlight-literal-color:#ff7733;--code-highlight-attribute-color:#e6e1cf;--code-highlight-self-color:#36a3d9;--code-highlight-macro-color:#a37acc;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#788797;--code-highlight-doc-comment-color:#a1ac88;--src-line-numbers-span-color:#5c6773;--src-line-number-highlighted-background-color:rgba(255,236,164,0.06);--test-arrow-color:#788797;--test-arrow-background-color:rgba(57,175,215,0.09);--test-arrow-hover-color:#c5c5c5;--test-arrow-hover-background-color:rgba(57,175,215,0.368);--target-background-color:rgba(255,236,164,0.06);--target-border-color:rgba(255,180,76,0.85);--kbd-color:#c5c5c5;--kbd-background:#314559;--kbd-box-shadow-color:#5c6773;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);--crate-search-div-hover-filter:invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);--crate-search-hover-border:#e0e0e0;--src-sidebar-background-selected:#14191f;--src-sidebar-background-hover:#14191f;--table-alt-row-background-color:#191f26;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(15,20,25,1);--scrape-example-code-wrapper-background-end:rgba(15,20,25,0);--sidebar-resizer-hover:hsl(34,50%,33%);--sidebar-resizer-active:hsl(34,100%,66%);}:root[data-theme="ayu"] h1,:root[data-theme="ayu"] h2,:root[data-theme="ayu"] h3,:root[data-theme="ayu"] h4,:where(:root[data-theme="ayu"]) h1 a,:root[data-theme="ayu"] .sidebar h2 a,:root[data-theme="ayu"] .sidebar h3 a,:root[data-theme="ayu"] #source-sidebar>.title{color:#fff;}:root[data-theme="ayu"] .docblock code{color:#ffb454;}:root[data-theme="ayu"] .docblock a>code{color:#39AFD7 !important;}:root[data-theme="ayu"] .code-header,:root[data-theme="ayu"] .docblock pre>code,:root[data-theme="ayu"] pre,:root[data-theme="ayu"] pre>code,:root[data-theme="ayu"] .item-info code,:root[data-theme="ayu"] .rustdoc.source .example-wrap{color:#e6e1cf;}:root[data-theme="ayu"] .sidebar .current,:root[data-theme="ayu"] .sidebar .current a,:root[data-theme="ayu"] .sidebar a:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:hover,:root[data-theme="ayu"] details.dir-entry summary:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:focus,:root[data-theme="ayu"] details.dir-entry summary:focus,:root[data-theme="ayu"] #src-sidebar div.files>a.selected{color:#ffb44c;}:root[data-theme="ayu"] .sidebar-elems .location{color:#ff7733;}:root[data-theme="ayu"] .src-line-numbers .line-highlighted{color:#708090;padding-right:7px;border-right:1px solid #ffb44c;}:root[data-theme="ayu"] .search-results a:hover,:root[data-theme="ayu"] .search-results a:focus{color:#fff !important;background-color:#3c3c3c;}:root[data-theme="ayu"] .search-results a{color:#0096cf;}:root[data-theme="ayu"] .search-results a div.desc{color:#c5c5c5;}:root[data-theme="ayu"] .result-name .primitive>i,:root[data-theme="ayu"] .result-name .keyword>i{color:#788797;}:root[data-theme="ayu"] #search-tabs>button.selected{border-bottom:1px solid #ffb44c !important;border-top:none;}:root[data-theme="ayu"] #search-tabs>button:not(.selected){border:none;background-color:transparent !important;}:root[data-theme="ayu"] #search-tabs>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}:root[data-theme="ayu"] #settings-menu>a img,:root[data-theme="ayu"] #sidebar-button>a:before{filter:invert(100);} \ No newline at end of file diff --git a/static.files/search-2b6ce74ff89ae146.js b/static.files/search-2b6ce74ff89ae146.js new file mode 100644 index 000000000..054597030 --- /dev/null +++ b/static.files/search-2b6ce74ff89ae146.js @@ -0,0 +1,5 @@ +"use strict";if(!Array.prototype.toSpliced){Array.prototype.toSpliced=function(){const me=this.slice();Array.prototype.splice.apply(me,arguments);return me}}(function(){const itemTypes=["keyword","primitive","mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","associatedtype","constant","associatedconstant","union","foreigntype","existential","attr","derive","traitalias","generic",];const longItemTypes=["keyword","primitive type","module","extern crate","re-export","struct","enum","function","type alias","static","trait","","trait method","method","struct field","enum variant","macro","assoc type","constant","assoc const","union","foreign type","existential type","attribute macro","derive macro","trait alias",];const TY_GENERIC=itemTypes.indexOf("generic");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("search-tabs").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});const isTypeSearch=(nb>0||iter===1);iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb;const correctionsElem=document.getElementsByClassName("search-corrections");if(isTypeSearch){removeClass(correctionsElem[0],"hidden")}else{addClass(correctionsElem[0],"hidden")}}else if(nb!==0){printTab(0)}}const editDistanceState={current:[],prev:[],prevPrev:[],calculate:function calculate(a,b,limit){if(a.lengthlimit){return limit+1}while(b.length>0&&b[0]===a[0]){a=a.substring(1);b=b.substring(1)}while(b.length>0&&b[b.length-1]===a[a.length-1]){a=a.substring(0,a.length-1);b=b.substring(0,b.length-1)}if(b.length===0){return minDist}const aLength=a.length;const bLength=b.length;for(let i=0;i<=bLength;++i){this.current[i]=0;this.prev[i]=i;this.prevPrev[i]=Number.MAX_VALUE}for(let i=1;i<=aLength;++i){this.current[0]=i;const aIdx=i-1;for(let j=1;j<=bLength;++j){const bIdx=j-1;const substitutionCost=a[aIdx]===b[bIdx]?0:1;this.current[j]=Math.min(this.prev[j]+1,this.current[j-1]+1,this.prev[j-1]+substitutionCost);if((i>1)&&(j>1)&&(a[aIdx]===b[bIdx-1])&&(a[aIdx-1]===b[bIdx])){this.current[j]=Math.min(this.current[j],this.prevPrev[j-2]+1)}}const prevPrevTmp=this.prevPrev;this.prevPrev=this.prev;this.prev=this.current;this.current=prevPrevTmp}const distance=this.prev[bLength];return distance<=limit?distance:(limit+1)},};function editDistance(a,b,limit){return editDistanceState.calculate(a,b,limit)}function initSearch(rawSearchIndex){const MAX_RESULTS=200;const NO_TYPE_FILTER=-1;let searchIndex;let functionTypeFingerprint;let currentResults;let typeNameIdMap;const ALIASES=new Map();let typeNameIdOfArray;let typeNameIdOfSlice;let typeNameIdOfArrayOrSlice;function buildTypeMapIndex(name,isAssocType){if(name===""||name===null){return null}if(typeNameIdMap.has(name)){const obj=typeNameIdMap.get(name);obj.assocOnly=isAssocType&&obj.assocOnly;return obj.id}else{const id=typeNameIdMap.size;typeNameIdMap.set(name,{id,assocOnly:isAssocType});return id}}function isSpecialStartCharacter(c){return"<\"".indexOf(c)!==-1}function isEndCharacter(c){return"=,>-]".indexOf(c)!==-1}function isErrorCharacter(c){return"()".indexOf(c)!==-1}function itemTypeFromName(typename){const index=itemTypes.findIndex(i=>i===typename);if(index<0){throw["Unknown type filter ",typename]}return index}function getStringElem(query,parserState,isInGenerics){if(isInGenerics){throw["Unexpected ","\""," in generics"]}else if(query.literalSearch){throw["Cannot have more than one literal search element"]}else if(parserState.totalElems-parserState.genericsElems>0){throw["Cannot use literal search when there is more than one element"]}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw["Unclosed ","\""]}else if(parserState.userQuery[end]!=="\""){throw["Unexpected ",parserState.userQuery[end]," in a string element"]}else if(start===end){throw["Cannot have empty string element"]}parserState.pos+=1;query.literalSearch=true}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::"}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->"}function isIdentCharacter(c){return(c==="_"||(c>="0"&&c<="9")||(c>="a"&&c<="z")||(c>="A"&&c<="Z"))}function isSeparatorCharacter(c){return c===","||c==="="}function isPathSeparator(c){return c===":"||c===" "}function prevIs(parserState,lookingFor){let pos=parserState.pos;while(pos>0){const c=parserState.userQuery[pos-1];if(c===lookingFor){return true}else if(c!==" "){break}pos-=1}return false}function isLastElemGeneric(elems,parserState){return(elems.length>0&&elems[elems.length-1].generics.length>0)||prevIs(parserState,">")}function skipWhitespace(parserState){while(parserState.pos0){throw["Cannot have more than one element if you use quotes"]}const typeFilter=parserState.typeFilter;parserState.typeFilter=null;if(name==="!"){if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive never type ","!"," and ",typeFilter," both specified",]}if(generics.length!==0){throw["Never type ","!"," does not accept generic parameters",]}const bindingName=parserState.isInBinding;parserState.isInBinding=null;return{name:"never",id:null,fullPath:["never"],pathWithoutLast:[],pathLast:"never",normalizedPathLast:"never",generics:[],bindings:new Map(),typeFilter:"primitive",bindingName,}}const quadcolon=/::\s*::/.exec(path);if(path.startsWith("::")){throw["Paths cannot start with ","::"]}else if(path.endsWith("::")){throw["Paths cannot end with ","::"]}else if(quadcolon!==null){throw["Unexpected ",quadcolon[0]]}const pathSegments=path.split(/(?:::\s*)|(?:\s+(?:::\s*)?)/);if(pathSegments.length===0||(pathSegments.length===1&&pathSegments[0]==="")){if(generics.length>0||prevIs(parserState,">")){throw["Found generics without a path"]}else{throw["Unexpected ",parserState.userQuery[parserState.pos]]}}for(const[i,pathSegment]of pathSegments.entries()){if(pathSegment==="!"){if(i!==0){throw["Never type ","!"," is not associated item"]}pathSegments[i]="never"}}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}const bindingName=parserState.isInBinding;parserState.isInBinding=null;const bindings=new Map();const pathLast=pathSegments[pathSegments.length-1];return{name:name.trim(),id:null,fullPath:pathSegments,pathWithoutLast:pathSegments.slice(0,pathSegments.length-1),pathLast,normalizedPathLast:pathLast.replace(/_/g,""),generics:generics.filter(gen=>{if(gen.bindingName!==null){bindings.set(gen.bindingName.name,[gen,...gen.bindingName.generics]);return false}return true}),bindings,typeFilter,bindingName,}}function getIdentEndPosition(parserState){const start=parserState.pos;let end=parserState.pos;let foundExclamation=-1;while(parserState.pos=end){throw["Found generics without a path"]}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}if(isStringElem){skipWhitespace(parserState)}if(start>=end&&generics.length===0){return}if(parserState.userQuery[parserState.pos]==="="){if(parserState.isInBinding){throw["Cannot write ","="," twice in a binding"]}if(!isInGenerics){throw["Type parameter ","="," must be within generics list"]}const name=parserState.userQuery.slice(start,end).trim();if(name==="!"){throw["Type parameter ","="," key cannot be ","!"," never type"]}if(name.includes("!")){throw["Type parameter ","="," key cannot be ","!"," macro"]}if(name.includes("::")){throw["Type parameter ","="," key cannot contain ","::"," path"]}if(name.includes(":")){throw["Type parameter ","="," key cannot contain ",":"," type"]}parserState.isInBinding={name,generics}}else{elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics))}}}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;let start=parserState.pos;const oldTypeFilter=parserState.typeFilter;parserState.typeFilter=null;const oldIsInBinding=parserState.isInBinding;parserState.isInBinding=null;let extra="";if(endChar===">"){extra="<"}else if(endChar==="]"){extra="["}else if(endChar===""){extra="->"}else{extra=endChar}while(parserState.pos"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(endChar!==""){throw["Expected ",",",", ","=",", or ",endChar,...extra,", found ",c,]}throw["Expected ",","," or ","=",...extra,", found ",c,]}const posBefore=parserState.pos;start=parserState.pos;getNextElem(query,parserState,elems,endChar!=="");if(endChar!==""&&parserState.pos>=parserState.length){throw["Unclosed ",extra]}if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}if(parserState.pos>=parserState.length&&endChar!==""){throw["Unclosed ",extra]}parserState.pos+=1;parserState.typeFilter=oldTypeFilter;parserState.isInBinding=oldIsInBinding}function checkExtraTypeFilterCharacters(start,parserState){const query=parserState.userQuery.slice(start,parserState.pos).trim();for(const c in query){if(!isIdentCharacter(query[c])){throw["Unexpected ",query[c]," in type filter (before ",":",")",]}}}function parseInput(query,parserState){let foundStopChar=true;let start=parserState.pos;while(parserState.pos"){if(isReturnArrow(parserState)){break}throw["Unexpected ",c," (did you mean ","->","?)"]}throw["Unexpected ",c]}else if(c===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}else if(query.elems.length===0){throw["Expected type filter before ",":"]}else if(query.literalSearch){throw["Cannot use quotes on type filter"]}const typeFilterElem=query.elems.pop();checkExtraTypeFilterCharacters(start,parserState);parserState.typeFilter=typeFilterElem.name;parserState.pos+=1;parserState.totalElems-=1;query.literalSearch=false;foundStopChar=true;continue}else if(c===" "){skipWhitespace(parserState);continue}if(!foundStopChar){let extra="";if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(parserState.typeFilter!==null){throw["Expected ",","," or ","->",...extra,", found ",c,]}throw["Expected ",",",", ",":"," or ","->",...extra,", found ",c,]}const before=query.elems.length;start=parserState.pos;getNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}while(parserState.pos"]}break}else{parserState.pos+=1}}}function newParsedQuery(userQuery){return{original:userQuery,userQuery:userQuery.toLowerCase(),elems:[],returned:[],foundElems:0,totalElems:0,literalSearch:false,error:null,correction:null,proposeCorrectionFrom:null,proposeCorrectionTo:null,typeFingerprint:new Uint32Array(4),}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="all crates"&&rawSearchIndex.has(elem.value)){return elem.value}return null}function parseQuery(userQuery){function convertTypeFilterOnElem(elem){if(elem.typeFilter!==null){let typeFilter=elem.typeFilter;if(typeFilter==="const"){typeFilter="constant"}elem.typeFilter=itemTypeFromName(typeFilter)}else{elem.typeFilter=NO_TYPE_FILTER}for(const elem2 of elem.generics){convertTypeFilterOnElem(elem2)}for(const constraints of elem.bindings.values()){for(const constraint of constraints){convertTypeFilterOnElem(constraint)}}}userQuery=userQuery.trim().replace(/\r|\n|\t/g," ");const parserState={length:userQuery.length,pos:0,totalElems:0,genericsElems:0,typeFilter:null,isInBinding:null,userQuery:userQuery.toLowerCase(),};let query=newParsedQuery(userQuery);try{parseInput(query,parserState);for(const elem of query.elems){convertTypeFilterOnElem(elem)}for(const elem of query.returned){convertTypeFilterOnElem(elem)}}catch(err){query=newParsedQuery(userQuery);query.error=err;return query}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1}query.foundElems=query.elems.length+query.returned.length;query.totalElems=parserState.totalElems;return query}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}function execQuery(parsedQuery,filterCrates,currentCrate){const results_others=new Map(),results_in_args=new Map(),results_returned=new Map();function transformResults(results){const duplicates=new Set();const out=[];for(const result of results){if(result.id!==-1){const obj=searchIndex[result.id];obj.dist=result.dist;const res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;if(duplicates.has(obj.fullPath)){continue}duplicates.add(obj.fullPath);obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}function sortResults(results,isType,preferredCrate){if(results.size===0){return[]}const userQuery=parsedQuery.userQuery;const result_list=[];for(const result of results.values()){result.item=searchIndex[result.id];result.word=searchIndex[result.id].word;result_list.push(result)}result_list.sort((aaa,bbb)=>{let a,b;a=(aaa.word!==userQuery);b=(bbb.word!==userQuery);if(a!==b){return a-b}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.path_dist;b=bbb.path_dist;if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}a=(aaa.dist);b=(bbb.dist);if(a!==b){return a-b}a=aaa.item.deprecated;b=bbb.item.deprecated;if(a!==b){return a-b}a=(aaa.item.crate!==preferredCrate);b=(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});return transformResults(result_list)}function unifyFunctionTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb){const mgens=mgensIn===null?null:new Map(mgensIn);if(queryElems.length===0){return!solutionCb||solutionCb(mgens)}if(!fnTypesIn||fnTypesIn.length===0){return false}const ql=queryElems.length;const fl=fnTypesIn.length;if(ql===1&&queryElems[0].generics.length===0&&queryElems[0].bindings.size===0){const queryElem=queryElems[0];for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,whereClause,mgens)){continue}if(fnType.id<0&&queryElem.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==queryElem.id){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,queryElem.id);if(!solutionCb||solutionCb(mgensScratch)){return true}}else if(!solutionCb||solutionCb(mgens?new Map(mgens):null)){return true}}for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens)){continue}if(fnType.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,0);if(unifyFunctionTypes(whereClause[(-fnType.id)-1],queryElems,whereClause,mgensScratch,solutionCb)){return true}}else if(unifyFunctionTypes([...fnType.generics,...Array.from(fnType.bindings.values()).flat()],queryElems,whereClause,mgens?new Map(mgens):null,solutionCb)){return true}}return false}const fnTypes=fnTypesIn.slice();const flast=fl-1;const qlast=ql-1;const queryElem=queryElems[qlast];let queryElemsTmp=null;for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,whereClause,mgens)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==queryElem.id){continue}mgensScratch.set(fnType.id,queryElem.id)}else{mgensScratch=mgens}fnTypes[i]=fnTypes[flast];fnTypes.length=flast;if(!queryElemsTmp){queryElemsTmp=queryElems.slice(0,qlast)}const passesUnification=unifyFunctionTypes(fnTypes,queryElemsTmp,whereClause,mgensScratch,mgensScratch=>{if(fnType.generics.length===0&&queryElem.generics.length===0&&fnType.bindings.size===0&&queryElem.bindings.size===0){return!solutionCb||solutionCb(mgensScratch)}const solution=unifyFunctionTypeCheckBindings(fnType,queryElem,whereClause,mgensScratch);if(!solution){return false}const simplifiedGenerics=solution.simplifiedGenerics;for(const simplifiedMgens of solution.mgens){const passesUnification=unifyFunctionTypes(simplifiedGenerics,queryElem.generics,whereClause,simplifiedMgens,solutionCb);if(passesUnification){return true}}return false});if(passesUnification){return true}fnTypes[flast]=fnTypes[i];fnTypes[i]=fnType;fnTypes.length=fl}for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==0){continue}mgensScratch.set(fnType.id,0)}else{mgensScratch=mgens}const generics=fnType.id<0?whereClause[(-fnType.id)-1]:fnType.generics;const bindings=fnType.bindings?Array.from(fnType.bindings.values()).flat():[];const passesUnification=unifyFunctionTypes(fnTypes.toSpliced(i,1,...generics,...bindings),queryElems,whereClause,mgensScratch,solutionCb);if(passesUnification){return true}}return false}function unifyFunctionTypeIsMatchCandidate(fnType,queryElem,whereClause,mgensIn){if(!typePassesFilter(queryElem.typeFilter,fnType.ty)){return false}if(fnType.id<0&&queryElem.id<0){if(mgensIn){if(mgensIn.has(fnType.id)&&mgensIn.get(fnType.id)!==queryElem.id){return false}for(const[fid,qid]of mgensIn.entries()){if(fnType.id!==fid&&queryElem.id===qid){return false}if(fnType.id===fid&&queryElem.id!==qid){return false}}}return true}else{if(queryElem.id===typeNameIdOfArrayOrSlice&&(fnType.id===typeNameIdOfSlice||fnType.id===typeNameIdOfArray)){}else if(fnType.id!==queryElem.id||queryElem.id===null){return false}if((fnType.generics.length+fnType.bindings.size)===0&&queryElem.generics.length!==0){return false}if(fnType.bindings.size0){const fnTypePath=fnType.path!==undefined&&fnType.path!==null?fnType.path.split("::"):[];if(queryElemPathLength>fnTypePath.length){return false}let i=0;for(const path of fnTypePath){if(path===queryElem.pathWithoutLast[i]){i+=1;if(i>=queryElemPathLength){break}}}if(i0){let mgensSolutionSet=[mgensIn];for(const[name,constraints]of queryElem.bindings.entries()){if(mgensSolutionSet.length===0){return false}if(!fnType.bindings.has(name)){return false}const fnTypeBindings=fnType.bindings.get(name);mgensSolutionSet=mgensSolutionSet.flatMap(mgens=>{const newSolutions=[];unifyFunctionTypes(fnTypeBindings,constraints,whereClause,mgens,newMgens=>{newSolutions.push(newMgens);return false});return newSolutions})}if(mgensSolutionSet.length===0){return false}const binds=Array.from(fnType.bindings.entries()).flatMap(entry=>{const[name,constraints]=entry;if(queryElem.bindings.has(name)){return[]}else{return constraints}});if(simplifiedGenerics.length>0){simplifiedGenerics=[...simplifiedGenerics,...binds]}else{simplifiedGenerics=binds}return{simplifiedGenerics,mgens:mgensSolutionSet}}return{simplifiedGenerics,mgens:[mgensIn]}}function unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens){if(fnType.id<0&&queryElem.id>=0){if(!whereClause){return false}if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){return false}const mgensTmp=new Map(mgens);mgensTmp.set(fnType.id,null);return checkIfInList(whereClause[(-fnType.id)-1],queryElem,whereClause,mgensTmp)}else if(fnType.generics.length>0||fnType.bindings.size>0){const simplifiedGenerics=[...fnType.generics,...Array.from(fnType.bindings.values()).flat(),];return checkIfInList(simplifiedGenerics,queryElem,whereClause,mgens)}return false}function checkIfInList(list,elem,whereClause,mgens){for(const entry of list){if(checkType(entry,elem,whereClause,mgens)){return true}}return false}function checkType(row,elem,whereClause,mgens){if(row.bindings.size===0&&elem.bindings.size===0){if(elem.id<0){return row.id<0||checkIfInList(row.generics,elem,whereClause,mgens)}if(row.id>0&&elem.id>0&&elem.pathWithoutLast.length===0&&typePassesFilter(elem.typeFilter,row.ty)&&elem.generics.length===0&&elem.id!==typeNameIdOfArrayOrSlice){return row.id===elem.id||checkIfInList(row.generics,elem,whereClause,mgens)}}return unifyFunctionTypes([row],[elem],whereClause,mgens)}function checkPath(contains,ty,maxEditDistance){if(contains.length===0){return 0}let ret_dist=maxEditDistance+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}const length=path.length;const clength=contains.length;pathiter:for(let i=length-clength;i>=0;i-=1){let dist_total=0;for(let x=0;xmaxEditDistance){continue pathiter}dist_total+=dist}ret_dist=Math.min(ret_dist,Math.round(dist_total/clength))}return ret_dist}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,deprecated:item.deprecated,implDisambiguator:item.implDisambiguator,}}function handleAliases(ret,query,filterCrates,currentCrate){const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(ALIASES.has(filterCrates)&&ALIASES.get(filterCrates).has(lowerQuery)){const query_aliases=ALIASES.get(filterCrates).get(lowerQuery);for(const alias of query_aliases){aliases.push(createAliasFromItem(searchIndex[alias]))}}}else{for(const[crate,crateAliasesIndex]of ALIASES){if(crateAliasesIndex.has(lowerQuery)){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=crateAliasesIndex.get(lowerQuery);for(const alias of query_aliases){pushTo.push(createAliasFromItem(searchIndex[alias]))}}}}const sortFunc=(aaa,bbb)=>{if(aaa.path{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach(pushFunc);crateAliases.forEach(pushFunc)}function addIntoResults(results,fullId,id,index,dist,path_dist,maxEditDistance){if(dist<=maxEditDistance||index!==-1){if(results.has(fullId)){const result=results.get(fullId);if(result.dontValidate||result.dist<=dist){return}}results.set(fullId,{id:id,index:index,dontValidate:parsedQuery.literalSearch,dist:dist,path_dist:path_dist,})}}function handleSingleArg(row,pos,elem,results_others,results_in_args,results_returned,maxEditDistance){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let path_dist=0;const fullId=row.id;const tfpDist=compareTypeFingerprints(fullId,parsedQuery.typeFingerprint);if(tfpDist!==null){const in_args=row.type&&row.type.inputs&&checkIfInList(row.type.inputs,elem,row.type.where_clause);const returned=row.type&&row.type.output&&checkIfInList(row.type.output,elem,row.type.where_clause);if(in_args){results_in_args.max_dist=Math.max(results_in_args.max_dist||0,tfpDist);const maxDist=results_in_args.sizenormalizedIndex&&normalizedIndex!==-1)){index=normalizedIndex}if(elem.fullPath.length>1){path_dist=checkPath(elem.pathWithoutLast,row,maxEditDistance);if(path_dist>maxEditDistance){return}}if(parsedQuery.literalSearch){if(row.word===elem.pathLast){addIntoResults(results_others,fullId,pos,index,0,path_dist)}return}const dist=editDistance(row.normalizedName,elem.normalizedPathLast,maxEditDistance);if(index===-1&&dist+path_dist>maxEditDistance){return}addIntoResults(results_others,fullId,pos,index,dist,path_dist,maxEditDistance)}function handleArgs(row,pos,results){if(!row||(filterCrates!==null&&row.crate!==filterCrates)||!row.type){return}const tfpDist=compareTypeFingerprints(row.id,parsedQuery.typeFingerprint);if(tfpDist===null){return}if(results.size>=MAX_RESULTS&&tfpDist>results.max_dist){return}if(!unifyFunctionTypes(row.type.inputs,parsedQuery.elems,row.type.where_clause,null,mgens=>{return unifyFunctionTypes(row.type.output,parsedQuery.returned,row.type.where_clause,mgens)})){return}results.max_dist=Math.max(results.max_dist||0,tfpDist);addIntoResults(results,row.id,pos,0,tfpDist,0,Number.MAX_VALUE)}function innerRunQuery(){let queryLen=0;for(const elem of parsedQuery.elems){queryLen+=elem.name.length}for(const elem of parsedQuery.returned){queryLen+=elem.name.length}const maxEditDistance=Math.floor(queryLen/3);const genericSymbols=new Map();function convertNameToId(elem,isAssocType){if(typeNameIdMap.has(elem.normalizedPathLast)&&(isAssocType||!typeNameIdMap.get(elem.normalizedPathLast).assocOnly)){elem.id=typeNameIdMap.get(elem.normalizedPathLast).id}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,{id,assocOnly}]of typeNameIdMap){const dist=editDistance(name,elem.normalizedPathLast,maxEditDistance);if(dist<=matchDist&&dist<=maxEditDistance&&(isAssocType||!assocOnly)){if(dist===matchDist&&matchName>name){continue}match=id;matchDist=dist;matchName=name}}if(match!==null){parsedQuery.correction=matchName}elem.id=match}if((elem.id===null&&parsedQuery.totalElems>1&&elem.typeFilter===-1&&elem.generics.length===0&&elem.bindings.size===0)||elem.typeFilter===TY_GENERIC){if(genericSymbols.has(elem.name)){elem.id=genericSymbols.get(elem.name)}else{elem.id=-(genericSymbols.size+1);genericSymbols.set(elem.name,elem.id)}if(elem.typeFilter===-1&&elem.name.length>=3){const maxPartDistance=Math.floor(elem.name.length/3);let matchDist=maxPartDistance+1;let matchName="";for(const name of typeNameIdMap.keys()){const dist=editDistance(name,elem.name,maxPartDistance);if(dist<=matchDist&&dist<=maxPartDistance){if(dist===matchDist&&matchName>name){continue}matchDist=dist;matchName=name}}if(matchName!==""){parsedQuery.proposeCorrectionFrom=elem.name;parsedQuery.proposeCorrectionTo=matchName}}elem.typeFilter=TY_GENERIC}if(elem.generics.length>0&&elem.typeFilter===TY_GENERIC){parsedQuery.error=["Generic type parameter ",elem.name," does not accept generic parameters",]}for(const elem2 of elem.generics){convertNameToId(elem2)}elem.bindings=new Map(Array.from(elem.bindings.entries()).map(entry=>{const[name,constraints]=entry;if(!typeNameIdMap.has(name)){parsedQuery.error=["Type parameter ",name," does not exist",];return[null,[]]}for(const elem2 of constraints){convertNameToId(elem2)}return[typeNameIdMap.get(name).id,constraints]}))}const fps=new Set();for(const elem of parsedQuery.elems){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}for(const elem of parsedQuery.returned){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}if(parsedQuery.foundElems===1&&parsedQuery.returned.length===0){if(parsedQuery.elems.length===1){const elem=parsedQuery.elems[0];for(let i=0,nSearchIndex=searchIndex.length;i0){const sortQ=(a,b)=>{const ag=a.generics.length===0&&a.bindings.size===0;const bg=b.generics.length===0&&b.bindings.size===0;if(ag!==bg){return ag-bg}const ai=a.id>0;const bi=b.id>0;return ai-bi};parsedQuery.elems.sort(sortQ);parsedQuery.returned.sort(sortQ);for(let i=0,nSearchIndex=searchIndex.length;i");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){const extraClass=display?" active":"";const output=document.createElement("div");if(array.length>0){output.className="search-results "+extraClass;array.forEach(item=>{const name=item.name;const type=itemTypes[item.ty];const longType=longItemTypes[item.ty];const typeName=longType.length!==0?`${longType}`:"?";const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const resultName=document.createElement("div");resultName.className="result-name";resultName.insertAdjacentHTML("beforeend",`${typeName}`);link.appendChild(resultName);let alias=" ";if(item.is_alias){alias=`
    \ +${item.alias} - see \ +
    `}resultName.insertAdjacentHTML("beforeend",`
    ${alias}\ +${item.displayPath}${name}\ +
    `);const description=document.createElement("div");description.className="desc";description.insertAdjacentHTML("beforeend",item.desc);link.appendChild(description);output.appendChild(link)})}else if(query.error===null){output.className="search-failed"+extraClass;output.innerHTML="No results :(
    "+"Try on DuckDuckGo?

    "+"Or try looking in one of these:"}return[output,array.length]}function makeTabHeader(tabNb,text,nbElems){const fmtNbElems=nbElems<10?`\u{2007}(${nbElems})\u{2007}\u{2007}`:nbElems<100?`\u{2007}(${nbElems})\u{2007}`:`\u{2007}(${nbElems})`;if(searchState.currentTab===tabNb){return""}return""}function showResults(results,go_to_first,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true")){window.onunload=()=>{};searchState.removeQueryParameters();const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=parseQuery(searchState.input.value)}currentResults=results.query.userQuery;const ret_others=addTab(results.others,results.query,true);const ret_in_args=addTab(results.in_args,results.query,false);const ret_returned=addTab(results.returned,results.query,false);let currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}let crates="";if(rawSearchIndex.size>1){crates=" in 
    "}let output=`

    Results${crates}

    `;if(results.query.error!==null){const error=results.query.error;error.forEach((value,index)=>{value=value.split("<").join("<").split(">").join(">");if(index%2!==0){error[index]=`${value.replaceAll(" ", " ")}`}else{error[index]=value}});output+=`

    Query parser error: "${error.join("")}".

    `;output+="
    "+makeTabHeader(0,"In Names",ret_others[1])+"
    ";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
    "+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
    "}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
    "+makeTabHeader(0,signatureTabTitle,ret_others[1])+"
    ";currentTab=0}if(results.query.correction!==null){const orig=results.query.returned.length>0?results.query.returned[0].name:results.query.elems[0].name;output+="

    "+`Type "${orig}" not found. `+"Showing results for closest type name "+`"${results.query.correction}" instead.

    `}if(results.query.proposeCorrectionFrom!==null){const orig=results.query.proposeCorrectionFrom;const targ=results.query.proposeCorrectionTo;output+="

    "+`Type "${orig}" not found and used as generic parameter. `+`Consider searching for "${targ}" instead.

    `}const resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("search-tabs").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function updateSearchHistory(url){if(!browserSupportsHistoryApi()){return}const params=searchState.getQueryStringParams();if(!history.state&&!params.search){history.pushState(null,"",url)}else{history.replaceState(null,"",url)}}function search(forced){const query=parseQuery(searchState.input.value.trim());let filterCrates=getFilterCrates();if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}searchState.setLoadingSearch();const params=searchState.getQueryStringParams();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="Results for "+query.original+" - Rust";updateSearchHistory(buildUrl(query.original,filterCrates));showResults(execQuery(query,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function buildItemSearchTypeAll(types,lowercasePaths){return types.map(type=>buildItemSearchType(type,lowercasePaths))}function buildItemSearchType(type,lowercasePaths,isAssocType){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;const BINDINGS_DATA=2;let pathIndex,generics,bindings;if(typeof type==="number"){pathIndex=type;generics=[];bindings=new Map()}else{pathIndex=type[PATH_INDEX_DATA];generics=buildItemSearchTypeAll(type[GENERICS_DATA],lowercasePaths);if(type.length>BINDINGS_DATA){bindings=new Map(type[BINDINGS_DATA].map(binding=>{const[assocType,constraints]=binding;return[buildItemSearchType(assocType,lowercasePaths,true).id,buildItemSearchTypeAll(constraints,lowercasePaths),]}))}else{bindings=new Map()}}if(pathIndex<0){return{id:pathIndex,ty:TY_GENERIC,path:null,generics,bindings,}}if(pathIndex===0){return{id:null,ty:null,path:null,generics,bindings,}}const item=lowercasePaths[pathIndex-1];return{id:buildTypeMapIndex(item.name,isAssocType),ty:item.ty,path:item.path,generics,bindings,}}function buildFunctionSearchType(functionSearchType,lowercasePaths){const INPUTS_DATA=0;const OUTPUT_DATA=1;if(functionSearchType===0){return null}let inputs,output;if(typeof functionSearchType[INPUTS_DATA]==="number"){inputs=[buildItemSearchType(functionSearchType[INPUTS_DATA],lowercasePaths)]}else{inputs=buildItemSearchTypeAll(functionSearchType[INPUTS_DATA],lowercasePaths)}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){output=[buildItemSearchType(functionSearchType[OUTPUT_DATA],lowercasePaths)]}else{output=buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA],lowercasePaths)}}else{output=[]}const where_clause=[];const l=functionSearchType.length;for(let i=2;i{k=(~~k+0x7ed55d16)+(k<<12);k=(k ^ 0xc761c23c)^(k>>>19);k=(~~k+0x165667b1)+(k<<5);k=(~~k+0xd3a2646c)^(k<<9);k=(~~k+0xfd7046c5)+(k<<3);return(k ^ 0xb55a4f09)^(k>>>16)};const hashint2=k=>{k=~k+(k<<15);k ^=k>>>12;k+=k<<2;k ^=k>>>4;k=Math.imul(k,2057);return k ^(k>>16)};if(input!==null){const h0a=hashint1(input);const h0b=hashint2(input);const h1a=~~(h0a+Math.imul(h0b,2));const h1b=~~(h0a+Math.imul(h0b,3));const h2a=~~(h0a+Math.imul(h0b,4));const h2b=~~(h0a+Math.imul(h0b,5));output[0]|=(1<<(h0a%32))|(1<<(h1b%32));output[1]|=(1<<(h1a%32))|(1<<(h2b%32));output[2]|=(1<<(h2a%32))|(1<<(h0b%32));fps.add(input)}for(const g of type.generics){buildFunctionTypeFingerprint(g,output,fps)}const fb={id:null,ty:0,generics:[],bindings:new Map(),};for(const[k,v]of type.bindings.entries()){fb.id=k;fb.generics=v;buildFunctionTypeFingerprint(fb,output,fps)}output[3]=fps.size}function compareTypeFingerprints(fullId,queryFingerprint){const fh0=functionTypeFingerprint[fullId*4];const fh1=functionTypeFingerprint[(fullId*4)+1];const fh2=functionTypeFingerprint[(fullId*4)+2];const[qh0,qh1,qh2]=queryFingerprint;const[in0,in1,in2]=[fh0&qh0,fh1&qh1,fh2&qh2];if((in0 ^ qh0)||(in1 ^ qh1)||(in2 ^ qh2)){return null}return functionTypeFingerprint[(fullId*4)+3]}function buildIndex(rawSearchIndex){searchIndex=[];typeNameIdMap=new Map();const charA="A".charCodeAt(0);let currentIndex=0;let id=0;typeNameIdOfArray=buildTypeMapIndex("array");typeNameIdOfSlice=buildTypeMapIndex("slice");typeNameIdOfArrayOrSlice=buildTypeMapIndex("[]");for(const crate of rawSearchIndex.values()){id+=crate.t.length+1}functionTypeFingerprint=new Uint32Array((id+1)*4);id=0;for(const[crate,crateCorpus]of rawSearchIndex){const crateRow={crate:crate,ty:3,name:crate,path:"",desc:crateCorpus.doc,parent:undefined,type:null,id:id,word:crate,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),deprecated:null,implDisambiguator:null,};id+=1;searchIndex.push(crateRow);currentIndex+=1;const itemTypes=crateCorpus.t;const itemNames=crateCorpus.n;const itemPaths=new Map(crateCorpus.q);const itemDescs=crateCorpus.d;const itemParentIdxs=crateCorpus.i;const itemFunctionSearchTypes=crateCorpus.f;const deprecatedItems=new Set(crateCorpus.c);const implDisambiguator=new Map(crateCorpus.b);const paths=crateCorpus.p;const aliases=crateCorpus.a;const lowercasePaths=[];let len=paths.length;let lastPath=itemPaths.get(0);for(let i=0;i2){path=itemPaths.has(elem[2])?itemPaths.get(elem[2]):lastPath;lastPath=path}lowercasePaths.push({ty:ty,name:name.toLowerCase(),path:path});paths[i]={ty:ty,name:name,path:path}}lastPath="";len=itemTypes.length;for(let i=0;i0?paths[itemParentIdxs[i]-1]:undefined,type,id:id,word,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),deprecated:deprecatedItems.has(i),implDisambiguator:implDisambiguator.has(i)?implDisambiguator.get(i):null,};id+=1;searchIndex.push(row);lastPath=row.path}if(aliases){const currentCrateAliases=new Map();ALIASES.set(crate,currentCrateAliases);for(const alias_name in aliases){if(!Object.prototype.hasOwnProperty.call(aliases,alias_name)){continue}let currentNameAliases;if(currentCrateAliases.has(alias_name)){currentNameAliases=currentCrateAliases.get(alias_name)}else{currentNameAliases=[];currentCrateAliases.set(alias_name,currentNameAliases)}for(const local_alias of aliases[alias_name]){currentNameAliases.push(local_alias+currentIndex)}}}currentIndex+=itemTypes.length}}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{searchState.input.placeholder=searchState.input.origPlaceholder});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;e.preventDefault();search()}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="all crates"){const query=searchState.input.value.trim();updateSearchHistory(buildUrl(query,null))}currentResults=null;search(true)}buildIndex(rawSearchIndex);if(typeof window!=="undefined"){registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}if(typeof exports!=="undefined"){exports.initSearch=initSearch;exports.execQuery=execQuery;exports.parseQuery=parseQuery}}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch(new Map())}})() \ No newline at end of file diff --git a/static.files/search-8fbf244ebcf71464.js b/static.files/search-8fbf244ebcf71464.js deleted file mode 100644 index 168023b4b..000000000 --- a/static.files/search-8fbf244ebcf71464.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict";if(!Array.prototype.toSpliced){Array.prototype.toSpliced=function(){const me=this.slice();Array.prototype.splice.apply(me,arguments);return me}}(function(){const itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias","generic",];const longItemTypes=["module","extern crate","re-export","struct","enum","function","type alias","static","trait","","trait method","method","struct field","enum variant","macro","primitive type","assoc type","constant","assoc const","union","foreign type","keyword","existential type","attribute macro","derive macro","trait alias",];const TY_PRIMITIVE=itemTypes.indexOf("primitive");const TY_KEYWORD=itemTypes.indexOf("keyword");const TY_GENERIC=itemTypes.indexOf("generic");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";function hasOwnPropertyRustdoc(obj,property){return Object.prototype.hasOwnProperty.call(obj,property)}function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("search-tabs").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});const isTypeSearch=(nb>0||iter===1);iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb;const correctionsElem=document.getElementsByClassName("search-corrections");if(isTypeSearch){removeClass(correctionsElem[0],"hidden")}else{addClass(correctionsElem[0],"hidden")}}else if(nb!==0){printTab(0)}}const editDistanceState={current:[],prev:[],prevPrev:[],calculate:function calculate(a,b,limit){if(a.lengthlimit){return limit+1}while(b.length>0&&b[0]===a[0]){a=a.substring(1);b=b.substring(1)}while(b.length>0&&b[b.length-1]===a[a.length-1]){a=a.substring(0,a.length-1);b=b.substring(0,b.length-1)}if(b.length===0){return minDist}const aLength=a.length;const bLength=b.length;for(let i=0;i<=bLength;++i){this.current[i]=0;this.prev[i]=i;this.prevPrev[i]=Number.MAX_VALUE}for(let i=1;i<=aLength;++i){this.current[0]=i;const aIdx=i-1;for(let j=1;j<=bLength;++j){const bIdx=j-1;const substitutionCost=a[aIdx]===b[bIdx]?0:1;this.current[j]=Math.min(this.prev[j]+1,this.current[j-1]+1,this.prev[j-1]+substitutionCost);if((i>1)&&(j>1)&&(a[aIdx]===b[bIdx-1])&&(a[aIdx-1]===b[bIdx])){this.current[j]=Math.min(this.current[j],this.prevPrev[j-2]+1)}}const prevPrevTmp=this.prevPrev;this.prevPrev=this.prev;this.prev=this.current;this.current=prevPrevTmp}const distance=this.prev[bLength];return distance<=limit?distance:(limit+1)},};function editDistance(a,b,limit){return editDistanceState.calculate(a,b,limit)}function initSearch(rawSearchIndex){const MAX_RESULTS=200;const NO_TYPE_FILTER=-1;let searchIndex;let currentResults;let typeNameIdMap;const ALIASES=new Map();let typeNameIdOfArray;let typeNameIdOfSlice;let typeNameIdOfArrayOrSlice;function buildTypeMapIndex(name){if(name===""||name===null){return null}if(typeNameIdMap.has(name)){return typeNameIdMap.get(name)}else{const id=typeNameIdMap.size;typeNameIdMap.set(name,id);return id}}function isWhitespace(c){return" \t\n\r".indexOf(c)!==-1}function isSpecialStartCharacter(c){return"<\"".indexOf(c)!==-1}function isEndCharacter(c){return",>-]".indexOf(c)!==-1}function isStopCharacter(c){return isEndCharacter(c)}function isErrorCharacter(c){return"()".indexOf(c)!==-1}function itemTypeFromName(typename){const index=itemTypes.findIndex(i=>i===typename);if(index<0){throw["Unknown type filter ",typename]}return index}function getStringElem(query,parserState,isInGenerics){if(isInGenerics){throw["Unexpected ","\""," in generics"]}else if(query.literalSearch){throw["Cannot have more than one literal search element"]}else if(parserState.totalElems-parserState.genericsElems>0){throw["Cannot use literal search when there is more than one element"]}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw["Unclosed ","\""]}else if(parserState.userQuery[end]!=="\""){throw["Unexpected ",parserState.userQuery[end]," in a string element"]}else if(start===end){throw["Cannot have empty string element"]}parserState.pos+=1;query.literalSearch=true}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::"}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->"}function isIdentCharacter(c){return(c==="_"||(c>="0"&&c<="9")||(c>="a"&&c<="z")||(c>="A"&&c<="Z"))}function isSeparatorCharacter(c){return c===","}function isPathSeparator(c){return c===":"||isWhitespace(c)}function prevIs(parserState,lookingFor){let pos=parserState.pos;while(pos>0){const c=parserState.userQuery[pos-1];if(c===lookingFor){return true}else if(!isWhitespace(c)){break}pos-=1}return false}function isLastElemGeneric(elems,parserState){return(elems.length>0&&elems[elems.length-1].generics.length>0)||prevIs(parserState,">")}function skipWhitespace(parserState){while(parserState.pos0){throw["Cannot have more than one element if you use quotes"]}const typeFilter=parserState.typeFilter;parserState.typeFilter=null;if(name==="!"){if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive never type ","!"," and ",typeFilter," both specified",]}if(generics.length!==0){throw["Never type ","!"," does not accept generic parameters",]}return{name:"never",id:null,fullPath:["never"],pathWithoutLast:[],pathLast:"never",generics:[],typeFilter:"primitive",}}if(path.startsWith("::")){throw["Paths cannot start with ","::"]}else if(path.endsWith("::")){throw["Paths cannot end with ","::"]}else if(path.includes("::::")){throw["Unexpected ","::::"]}else if(path.includes(" ::")){throw["Unexpected "," ::"]}else if(path.includes(":: ")){throw["Unexpected ",":: "]}const pathSegments=path.split(/::|\s+/);if(pathSegments.length===0||(pathSegments.length===1&&pathSegments[0]==="")){if(generics.length>0||prevIs(parserState,">")){throw["Found generics without a path"]}else{throw["Unexpected ",parserState.userQuery[parserState.pos]]}}for(const[i,pathSegment]of pathSegments.entries()){if(pathSegment==="!"){if(i!==0){throw["Never type ","!"," is not associated item"]}pathSegments[i]="never"}}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}return{name:name.trim(),id:null,fullPath:pathSegments,pathWithoutLast:pathSegments.slice(0,pathSegments.length-1),pathLast:pathSegments[pathSegments.length-1],generics:generics,typeFilter,}}function getIdentEndPosition(parserState){const start=parserState.pos;let end=parserState.pos;let foundExclamation=-1;while(parserState.pos=end){throw["Found generics without a path"]}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}if(isStringElem){skipWhitespace(parserState)}if(start>=end&&generics.length===0){return}elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics))}}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;let start=parserState.pos;const oldTypeFilter=parserState.typeFilter;parserState.typeFilter=null;let extra="";if(endChar===">"){extra="<"}else if(endChar==="]"){extra="["}else if(endChar===""){extra="->"}else{extra=endChar}while(parserState.pos"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(endChar!==""){throw["Expected ",","," or ",endChar,...extra,", found ",c,]}throw["Expected ",",",...extra,", found ",c,]}const posBefore=parserState.pos;start=parserState.pos;getNextElem(query,parserState,elems,endChar!=="");if(endChar!==""&&parserState.pos>=parserState.length){throw["Unclosed ",extra]}if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}if(parserState.pos>=parserState.length&&endChar!==""){throw["Unclosed ",extra]}parserState.pos+=1;parserState.typeFilter=oldTypeFilter}function checkExtraTypeFilterCharacters(start,parserState){const query=parserState.userQuery.slice(start,parserState.pos).trim();for(const c in query){if(!isIdentCharacter(query[c])){throw["Unexpected ",query[c]," in type filter (before ",":",")",]}}}function parseInput(query,parserState){let foundStopChar=true;let start=parserState.pos;while(parserState.pos"){if(isReturnArrow(parserState)){break}throw["Unexpected ",c," (did you mean ","->","?)"]}throw["Unexpected ",c]}else if(c===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}else if(query.elems.length===0){throw["Expected type filter before ",":"]}else if(query.literalSearch){throw["Cannot use quotes on type filter"]}const typeFilterElem=query.elems.pop();checkExtraTypeFilterCharacters(start,parserState);parserState.typeFilter=typeFilterElem.name;parserState.pos+=1;parserState.totalElems-=1;query.literalSearch=false;foundStopChar=true;continue}else if(isWhitespace(c)){skipWhitespace(parserState);continue}if(!foundStopChar){let extra="";if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(parserState.typeFilter!==null){throw["Expected ",","," or ","->",...extra,", found ",c,]}throw["Expected ",",",", ",":"," or ","->",...extra,", found ",c,]}const before=query.elems.length;start=parserState.pos;getNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}while(parserState.pos"]}break}else{parserState.pos+=1}}}function newParsedQuery(userQuery){return{original:userQuery,userQuery:userQuery.toLowerCase(),elems:[],returned:[],foundElems:0,totalElems:0,literalSearch:false,error:null,correction:null,proposeCorrectionFrom:null,proposeCorrectionTo:null,}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="all crates"&&hasOwnPropertyRustdoc(rawSearchIndex,elem.value)){return elem.value}return null}function parseQuery(userQuery){function convertTypeFilterOnElem(elem){if(elem.typeFilter!==null){let typeFilter=elem.typeFilter;if(typeFilter==="const"){typeFilter="constant"}elem.typeFilter=itemTypeFromName(typeFilter)}else{elem.typeFilter=NO_TYPE_FILTER}for(const elem2 of elem.generics){convertTypeFilterOnElem(elem2)}}userQuery=userQuery.trim();const parserState={length:userQuery.length,pos:0,totalElems:0,genericsElems:0,typeFilter:null,userQuery:userQuery.toLowerCase(),};let query=newParsedQuery(userQuery);try{parseInput(query,parserState);for(const elem of query.elems){convertTypeFilterOnElem(elem)}for(const elem of query.returned){convertTypeFilterOnElem(elem)}}catch(err){query=newParsedQuery(userQuery);query.error=err;return query}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1}query.foundElems=query.elems.length+query.returned.length;query.totalElems=parserState.totalElems;return query}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}function execQuery(parsedQuery,searchWords,filterCrates,currentCrate){const results_others=new Map(),results_in_args=new Map(),results_returned=new Map();function transformResults(results){const duplicates=new Set();const out=[];for(const result of results){if(result.id!==-1){const obj=searchIndex[result.id];obj.dist=result.dist;const res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;if(duplicates.has(obj.fullPath)){continue}duplicates.add(obj.fullPath);obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}function sortResults(results,isType,preferredCrate){if(results.size===0){return[]}const userQuery=parsedQuery.userQuery;const result_list=[];for(const result of results.values()){result.word=searchWords[result.id];result.item=searchIndex[result.id]||{};result_list.push(result)}result_list.sort((aaa,bbb)=>{let a,b;a=(aaa.word!==userQuery);b=(bbb.word!==userQuery);if(a!==b){return a-b}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.path_dist;b=bbb.path_dist;if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}a=(aaa.dist);b=(bbb.dist);if(a!==b){return a-b}a=aaa.item.deprecated;b=bbb.item.deprecated;if(a!==b){return a-b}a=(aaa.item.crate!==preferredCrate);b=(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});let nameSplit=null;if(parsedQuery.elems.length===1){const hasPath=typeof parsedQuery.elems[0].path==="undefined";nameSplit=hasPath?null:parsedQuery.elems[0].path}for(const result of result_list){if(result.dontValidate){continue}const name=result.item.name.toLowerCase(),path=result.item.path.toLowerCase(),parent=result.item.parent;if(!isType&&!validateResult(name,path,nameSplit,parent)){result.id=-1}}return transformResults(result_list)}function checkGenerics(fnType,queryElem,whereClause,mgensInout){return unifyFunctionTypes(fnType.generics,queryElem.generics,whereClause,mgensInout,mgens=>{if(mgensInout){for(const[fid,qid]of mgens.entries()){mgensInout.set(fid,qid)}}return true})}function unifyFunctionTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb){let mgens=new Map(mgensIn);if(queryElems.length===0){return!solutionCb||solutionCb(mgens)}if(!fnTypesIn||fnTypesIn.length===0){return false}const ql=queryElems.length;let fl=fnTypesIn.length;let fnTypes=fnTypesIn.slice();const backtracking=[];let i=0;let j=0;const backtrack=()=>{while(backtracking.length!==0){const{fnTypesScratch,mgensScratch,queryElemsOffset,fnTypesOffset,unbox,}=backtracking.pop();mgens=new Map(mgensScratch);const fnType=fnTypesScratch[fnTypesOffset];const queryElem=queryElems[queryElemsOffset];if(unbox){if(fnType.id<0){if(mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){continue}mgens.set(fnType.id,0)}const generics=fnType.id<0?whereClause[(-fnType.id)-1]:fnType.generics;fnTypes=fnTypesScratch.toSpliced(fnTypesOffset,1,...generics);fl=fnTypes.length;i=queryElemsOffset-1}else{if(fnType.id<0){if(mgens.has(fnType.id)&&mgens.get(fnType.id)!==queryElem.id){continue}mgens.set(fnType.id,queryElem.id)}fnTypes=fnTypesScratch.slice();fl=fnTypes.length;const tmp=fnTypes[queryElemsOffset];fnTypes[queryElemsOffset]=fnTypes[fnTypesOffset];fnTypes[fnTypesOffset]=tmp;i=queryElemsOffset}return true}return false};for(i=0;i!==ql;++i){const queryElem=queryElems[i];const matchCandidates=[];let fnTypesScratch=null;let mgensScratch=null;for(j=i;j!==fl;++j){const fnType=fnTypes[j];if(unifyFunctionTypeIsMatchCandidate(fnType,queryElem,whereClause,mgens)){if(!fnTypesScratch){fnTypesScratch=fnTypes.slice()}unifyFunctionTypes(fnType.generics,queryElem.generics,whereClause,mgens,mgensScratch=>{matchCandidates.push({fnTypesScratch,mgensScratch,queryElemsOffset:i,fnTypesOffset:j,unbox:false,});return false})}if(unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens)){if(!fnTypesScratch){fnTypesScratch=fnTypes.slice()}if(!mgensScratch){mgensScratch=new Map(mgens)}backtracking.push({fnTypesScratch,mgensScratch,queryElemsOffset:i,fnTypesOffset:j,unbox:true,})}}if(matchCandidates.length===0){if(backtrack()){continue}else{return false}}const{fnTypesOffset:candidate,mgensScratch:mgensNew}=matchCandidates.pop();if(fnTypes[candidate].id<0&&queryElems[i].id<0){mgens.set(fnTypes[candidate].id,queryElems[i].id)}for(const[fid,qid]of mgensNew){mgens.set(fid,qid)}const tmp=fnTypes[candidate];fnTypes[candidate]=fnTypes[i];fnTypes[i]=tmp;for(const otherCandidate of matchCandidates){backtracking.push(otherCandidate)}while(i===(ql-1)&&solutionCb&&!solutionCb(mgens)){if(!backtrack()){return false}}}return true}function unifyFunctionTypeIsMatchCandidate(fnType,queryElem,whereClause,mgens){if(!typePassesFilter(queryElem.typeFilter,fnType.ty)){return false}if(fnType.id<0&&queryElem.id<0){if(mgens.has(fnType.id)&&mgens.get(fnType.id)!==queryElem.id){return false}for(const[fid,qid]of mgens.entries()){if(fnType.id!==fid&&queryElem.id===qid){return false}if(fnType.id===fid&&queryElem.id!==qid){return false}}}else{if(queryElem.id===typeNameIdOfArrayOrSlice&&(fnType.id===typeNameIdOfSlice||fnType.id===typeNameIdOfArray)){}else if(fnType.id!==queryElem.id){return false}if(fnType.generics.length===0&&queryElem.generics.length!==0){return false}const queryElemPathLength=queryElem.pathWithoutLast.length;if(queryElemPathLength>0){const fnTypePath=fnType.path!==undefined&&fnType.path!==null?fnType.path.split("::"):[];if(queryElemPathLength>fnTypePath.length){return false}let i=0;for(const path of fnTypePath){if(path===queryElem.pathWithoutLast[i]){i+=1;if(i>=queryElemPathLength){break}}}if(i=0){if(!whereClause){return false}if(mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){return false}return checkIfInList(whereClause[(-fnType.id)-1],queryElem,whereClause)}else if(fnType.generics&&fnType.generics.length>0){return checkIfInList(fnType.generics,queryElem,whereClause)}return false}function checkIfInList(list,elem,whereClause){for(const entry of list){if(checkType(entry,elem,whereClause)){return true}}return false}function checkType(row,elem,whereClause){if(row.id===null){return row.generics.length>0?checkIfInList(row.generics,elem,whereClause):false}if(row.id<0&&elem.id>=0){const gid=(-row.id)-1;return checkIfInList(whereClause[gid],elem,whereClause)}if(row.id<0&&elem.id<0){return true}const matchesExact=row.id===elem.id;const matchesArrayOrSlice=elem.id===typeNameIdOfArrayOrSlice&&(row.id===typeNameIdOfSlice||row.id===typeNameIdOfArray);if((matchesExact||matchesArrayOrSlice)&&typePassesFilter(elem.typeFilter,row.ty)){if(elem.generics.length>0){return checkGenerics(row,elem,whereClause,new Map())}return true}return checkIfInList(row.generics,elem,whereClause)}function checkPath(contains,ty,maxEditDistance){if(contains.length===0){return 0}let ret_dist=maxEditDistance+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}const length=path.length;const clength=contains.length;if(clength>length){return maxEditDistance+1}for(let i=0;ilength){break}let dist_total=0;let aborted=false;for(let x=0;xmaxEditDistance){aborted=true;break}dist_total+=dist}if(!aborted){ret_dist=Math.min(ret_dist,Math.round(dist_total/clength))}}return ret_dist}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,deprecated:item.deprecated,implDisambiguator:item.implDisambiguator,}}function handleAliases(ret,query,filterCrates,currentCrate){const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(ALIASES.has(filterCrates)&&ALIASES.get(filterCrates).has(lowerQuery)){const query_aliases=ALIASES.get(filterCrates).get(lowerQuery);for(const alias of query_aliases){aliases.push(createAliasFromItem(searchIndex[alias]))}}}else{for(const[crate,crateAliasesIndex]of ALIASES){if(crateAliasesIndex.has(lowerQuery)){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=crateAliasesIndex.get(lowerQuery);for(const alias of query_aliases){pushTo.push(createAliasFromItem(searchIndex[alias]))}}}}const sortFunc=(aaa,bbb)=>{if(aaa.path{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach(pushFunc);crateAliases.forEach(pushFunc)}function addIntoResults(results,fullId,id,index,dist,path_dist,maxEditDistance){const inBounds=dist<=maxEditDistance||index!==-1;if(dist===0||(!parsedQuery.literalSearch&&inBounds)){if(results.has(fullId)){const result=results.get(fullId);if(result.dontValidate||result.dist<=dist){return}}results.set(fullId,{id:id,index:index,dontValidate:parsedQuery.literalSearch,dist:dist,path_dist:path_dist,})}}function handleSingleArg(row,pos,elem,results_others,results_in_args,results_returned,maxEditDistance){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let index=-1,path_dist=0;const fullId=row.id;const searchWord=searchWords[pos];const in_args=row.type&&row.type.inputs&&checkIfInList(row.type.inputs,elem,row.type.where_clause);if(in_args){addIntoResults(results_in_args,fullId,pos,-1,0,0,maxEditDistance)}const returned=row.type&&row.type.output&&checkIfInList(row.type.output,elem,row.type.where_clause);if(returned){addIntoResults(results_returned,fullId,pos,-1,0,0,maxEditDistance)}if(!typePassesFilter(elem.typeFilter,row.ty)){return}const row_index=row.normalizedName.indexOf(elem.pathLast);const word_index=searchWord.indexOf(elem.pathLast);if(row_index===-1){index=word_index}else if(word_index===-1){index=row_index}else if(word_index1){path_dist=checkPath(elem.pathWithoutLast,row,maxEditDistance);if(path_dist>maxEditDistance){return}}if(parsedQuery.literalSearch){if(searchWord===elem.name){addIntoResults(results_others,fullId,pos,index,0,path_dist)}return}const dist=editDistance(searchWord,elem.pathLast,maxEditDistance);if(index===-1&&dist+path_dist>maxEditDistance){return}addIntoResults(results_others,fullId,pos,index,dist,path_dist,maxEditDistance)}function handleArgs(row,pos,results){if(!row||(filterCrates!==null&&row.crate!==filterCrates)||!row.type){return}if(!unifyFunctionTypes(row.type.inputs,parsedQuery.elems,row.type.where_clause,null,mgens=>{return unifyFunctionTypes(row.type.output,parsedQuery.returned,row.type.where_clause,mgens)})){return}addIntoResults(results,row.id,pos,0,0,0,Number.MAX_VALUE)}function innerRunQuery(){let elem,i,nSearchWords,in_returned,row;let queryLen=0;for(const elem of parsedQuery.elems){queryLen+=elem.name.length}for(const elem of parsedQuery.returned){queryLen+=elem.name.length}const maxEditDistance=Math.floor(queryLen/3);const genericSymbols=new Map();function convertNameToId(elem){if(typeNameIdMap.has(elem.pathLast)){elem.id=typeNameIdMap.get(elem.pathLast)}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,id]of typeNameIdMap){const dist=editDistance(name,elem.pathLast,maxEditDistance);if(dist<=matchDist&&dist<=maxEditDistance){if(dist===matchDist&&matchName>name){continue}match=id;matchDist=dist;matchName=name}}if(match!==null){parsedQuery.correction=matchName}elem.id=match}if((elem.id===null&&parsedQuery.totalElems>1&&elem.typeFilter===-1&&elem.generics.length===0)||elem.typeFilter===TY_GENERIC){if(genericSymbols.has(elem.name)){elem.id=genericSymbols.get(elem.name)}else{elem.id=-(genericSymbols.size+1);genericSymbols.set(elem.name,elem.id)}if(elem.typeFilter===-1&&elem.name.length>=3){const maxPartDistance=Math.floor(elem.name.length/3);let matchDist=maxPartDistance+1;let matchName="";for(const name of typeNameIdMap.keys()){const dist=editDistance(name,elem.name,maxPartDistance);if(dist<=matchDist&&dist<=maxPartDistance){if(dist===matchDist&&matchName>name){continue}matchDist=dist;matchName=name}}if(matchName!==""){parsedQuery.proposeCorrectionFrom=elem.name;parsedQuery.proposeCorrectionTo=matchName}}elem.typeFilter=TY_GENERIC}if(elem.generics.length>0&&elem.typeFilter===TY_GENERIC){parsedQuery.error=["Generic type parameter ",elem.name," does not accept generic parameters",]}for(const elem2 of elem.generics){convertNameToId(elem2)}}for(const elem of parsedQuery.elems){convertNameToId(elem)}for(const elem of parsedQuery.returned){convertNameToId(elem)}if(parsedQuery.foundElems===1){if(parsedQuery.elems.length===1){elem=parsedQuery.elems[0];for(i=0,nSearchWords=searchWords.length;i0){for(i=0,nSearchWords=searchWords.length;i-1||path.indexOf(key)>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(key)>-1)||editDistance(name,key,maxEditDistance)<=maxEditDistance)){return false}}return true}function nextTab(direction){const next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){const target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#search-tabs button").item(searchState.currentTab);searchState.focusedByTab[searchState.currentTab]=null;if(target){target.focus()}}function buildHrefAndPath(item){let displayPath;let href;const type=itemTypes[item.ty];const name=item.name;let path=item.path;if(type==="mod"){displayPath=path+"::";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="import"){displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/index.html#reexport."+name}else if(type==="primitive"||type==="keyword"){displayPath="";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=ROOT_PATH+name+"/index.html"}else if(item.parent!==undefined){const myparent=item.parent;let anchor=type+"."+name;const parentType=itemTypes[myparent.ty];let pageType=parentType;let pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){const enumNameIdx=item.path.lastIndexOf("::");const enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}if(item.implDisambiguator!==null){anchor=item.implDisambiguator+"/"+anchor}href=ROOT_PATH+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html#"+anchor}else{displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function pathSplitter(path){const tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){let extraClass="";if(display===true){extraClass=" active"}const output=document.createElement("div");let length=0;if(array.length>0){output.className="search-results "+extraClass;array.forEach(item=>{const name=item.name;const type=itemTypes[item.ty];const longType=longItemTypes[item.ty];const typeName=longType.length!==0?`${longType}`:"?";length+=1;const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const resultName=document.createElement("div");resultName.className="result-name";resultName.insertAdjacentHTML("beforeend",`${typeName}`);link.appendChild(resultName);let alias=" ";if(item.is_alias){alias=`
    \ -${item.alias} - see \ -
    `}resultName.insertAdjacentHTML("beforeend",`
    ${alias}\ -${item.displayPath}${name}\ -
    `);const description=document.createElement("div");description.className="desc";description.insertAdjacentHTML("beforeend",item.desc);link.appendChild(description);output.appendChild(link)})}else if(query.error===null){output.className="search-failed"+extraClass;output.innerHTML="No results :(
    "+"Try on DuckDuckGo?

    "+"Or try looking in one of these:"}return[output,length]}function makeTabHeader(tabNb,text,nbElems){const fmtNbElems=nbElems<10?`\u{2007}(${nbElems})\u{2007}\u{2007}`:nbElems<100?`\u{2007}(${nbElems})\u{2007}`:`\u{2007}(${nbElems})`;if(searchState.currentTab===tabNb){return""}return""}function showResults(results,go_to_first,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true")){window.onunload=()=>{};searchState.removeQueryParameters();const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=parseQuery(searchState.input.value)}currentResults=results.query.userQuery;const ret_others=addTab(results.others,results.query,true);const ret_in_args=addTab(results.in_args,results.query,false);const ret_returned=addTab(results.returned,results.query,false);let currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}let crates="";const crates_list=Object.keys(rawSearchIndex);if(crates_list.length>1){crates=" in 
    "}let output=`

    Results${crates}

    `;if(results.query.error!==null){const error=results.query.error;error.forEach((value,index)=>{value=value.split("<").join("<").split(">").join(">");if(index%2!==0){error[index]=`${value.replaceAll(" ", " ")}`}else{error[index]=value}});output+=`

    Query parser error: "${error.join("")}".

    `;output+="
    "+makeTabHeader(0,"In Names",ret_others[1])+"
    ";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
    "+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
    "}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
    "+makeTabHeader(0,signatureTabTitle,ret_others[1])+"
    ";currentTab=0}if(results.query.correction!==null){const orig=results.query.returned.length>0?results.query.returned[0].name:results.query.elems[0].name;output+="

    "+`Type "${orig}" not found. `+"Showing results for closest type name "+`"${results.query.correction}" instead.

    `}if(results.query.proposeCorrectionFrom!==null){const orig=results.query.proposeCorrectionFrom;const targ=results.query.proposeCorrectionTo;output+="

    "+`Type "${orig}" not found and used as generic parameter. `+`Consider searching for "${targ}" instead.

    `}const resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("search-tabs").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function updateSearchHistory(url){if(!browserSupportsHistoryApi()){return}const params=searchState.getQueryStringParams();if(!history.state&&!params.search){history.pushState(null,"",url)}else{history.replaceState(null,"",url)}}function search(e,forced){if(e){e.preventDefault()}const query=parseQuery(searchState.input.value.trim());let filterCrates=getFilterCrates();if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}searchState.setLoadingSearch();const params=searchState.getQueryStringParams();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="Results for "+query.original+" - Rust";updateSearchHistory(buildUrl(query.original,filterCrates));showResults(execQuery(query,searchWords,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function buildItemSearchTypeAll(types,lowercasePaths){return types.map(type=>buildItemSearchType(type,lowercasePaths))}function buildItemSearchType(type,lowercasePaths){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;let pathIndex,generics;if(typeof type==="number"){pathIndex=type;generics=[]}else{pathIndex=type[PATH_INDEX_DATA];generics=buildItemSearchTypeAll(type[GENERICS_DATA],lowercasePaths)}if(pathIndex<0){return{id:pathIndex,ty:TY_GENERIC,path:null,generics,}}if(pathIndex===0){return{id:null,ty:null,path:null,generics,}}const item=lowercasePaths[pathIndex-1];return{id:buildTypeMapIndex(item.name),ty:item.ty,path:item.path,generics,}}function buildFunctionSearchType(functionSearchType,lowercasePaths){const INPUTS_DATA=0;const OUTPUT_DATA=1;if(functionSearchType===0){return null}let inputs,output;if(typeof functionSearchType[INPUTS_DATA]==="number"){inputs=[buildItemSearchType(functionSearchType[INPUTS_DATA],lowercasePaths)]}else{inputs=buildItemSearchTypeAll(functionSearchType[INPUTS_DATA],lowercasePaths)}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){output=[buildItemSearchType(functionSearchType[OUTPUT_DATA],lowercasePaths)]}else{output=buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA],lowercasePaths)}}else{output=[]}const where_clause=[];const l=functionSearchType.length;for(let i=2;i2){path=itemPaths.has(elem[2])?itemPaths.get(elem[2]):lastPath;lastPath=path}lowercasePaths.push({ty:ty,name:name.toLowerCase(),path:path});paths[i]={ty:ty,name:name,path:path}}lastPath="";len=itemTypes.length;for(let i=0;i0?paths[itemParentIdxs[i]-1]:undefined,type:buildFunctionSearchType(itemFunctionSearchTypes[i],lowercasePaths),id:id,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),deprecated:deprecatedItems.has(i),implDisambiguator:implDisambiguator.has(i)?implDisambiguator.get(i):null,};id+=1;searchIndex.push(row);lastPath=row.path;crateSize+=1}if(aliases){const currentCrateAliases=new Map();ALIASES.set(crate,currentCrateAliases);for(const alias_name in aliases){if(!hasOwnPropertyRustdoc(aliases,alias_name)){continue}let currentNameAliases;if(currentCrateAliases.has(alias_name)){currentNameAliases=currentCrateAliases.get(alias_name)}else{currentNameAliases=[];currentCrateAliases.set(alias_name,currentNameAliases)}for(const local_alias of aliases[alias_name]){currentNameAliases.push(local_alias+currentIndex)}}}currentIndex+=crateSize}return searchWords}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{searchState.input.placeholder=searchState.input.origPlaceholder});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;search(e)}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="all crates"){const query=searchState.input.value.trim();updateSearchHistory(buildUrl(query,null))}currentResults=null;search(undefined,true)}const searchWords=buildIndex(rawSearchIndex);if(typeof window!=="undefined"){registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}if(typeof exports!=="undefined"){exports.initSearch=initSearch;exports.execQuery=execQuery;exports.parseQuery=parseQuery}return searchWords}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch({})}})() \ No newline at end of file diff --git a/static.files/settings-4313503d2e1961c2.js b/static.files/settings-4313503d2e1961c2.js new file mode 100644 index 000000000..ab425fe49 --- /dev/null +++ b/static.files/settings-4313503d2e1961c2.js @@ -0,0 +1,17 @@ +"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){if(settingName==="theme"){const useSystem=value==="system preference"?"true":"false";updateLocalStorage("use-system-theme",useSystem)}updateLocalStorage(settingName,value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":updateTheme();updateLightAndDark();break;case"line-numbers":if(value===true){window.rustdoc_add_line_numbers_to_examples()}else{window.rustdoc_remove_line_numbers_from_examples()}break;case"hide-sidebar":if(value===true){addClass(document.documentElement,"hide-sidebar")}else{removeClass(document.documentElement,"hide-sidebar")}break}}function showLightAndDark(){removeClass(document.getElementById("preferred-light-theme"),"hidden");removeClass(document.getElementById("preferred-dark-theme"),"hidden")}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme"),"hidden");addClass(document.getElementById("preferred-dark-theme"),"hidden")}function updateLightAndDark(){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||(useSystem===null&&getSettingValue("theme")===null)){showLightAndDark()}else{hideLightAndDark()}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.querySelectorAll("input[type=\"checkbox\"]"),toggle=>{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=()=>{changeSetting(toggle.id,toggle.checked)}});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){settingValue=useSystem==="false"?"light":"system preference"}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",ev=>{changeSetting(ev.target.name,ev.target.value)})})}function buildSettingsPageSections(settings){let output="";for(const setting of settings){const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\ +
    +
    ${setting_name}
    +
    `;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\ + `});output+=`\ +
    +
    `}else{const checked=setting["default"]===true?" checked":"";output+=`\ +
    \ + \ +
    `}}return output}function buildSettingsPage(){const theme_names=getVar("themes").split(",").filter(t=>t);theme_names.push("light","dark","ayu");const settings=[{"name":"Theme","js_name":"theme","default":"system preference","options":theme_names.concat("system preference"),},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":theme_names,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":theme_names,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Hide persistent navigation bar","js_name":"hide-sidebar","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
    ${buildSettingsPageSections(settings)}
    `;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover"}el.innerHTML=innerHTML;if(isSettingsPage){document.getElementById(MAIN_ID).appendChild(el)}else{el.setAttribute("tabindex","-1");getSettingsButton().appendChild(el)}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display="";onEachLazy(settingsMenu.querySelectorAll("input[type='checkbox']"),el=>{const val=getSettingValue(el.id);const checked=val==="true";if(checked!==el.checked&&val!==null){el.checked=checked}})}function settingsBlurHandler(event){blurHandler(event,getSettingsButton(),window.hidePopoverMenus)}if(isSettingsPage){getSettingsButton().onclick=event=>{event.preventDefault()}}else{const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");settingsButton.onclick=event=>{if(settingsMenu.contains(event.target)){return}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals();if(shouldDisplaySettings){displaySettings()}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler});settingsMenu.onblur=settingsBlurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/static.files/settings-74424d7eec62a23e.js b/static.files/settings-74424d7eec62a23e.js deleted file mode 100644 index 3014f75c5..000000000 --- a/static.files/settings-74424d7eec62a23e.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){if(settingName==="theme"){const useSystem=value==="system preference"?"true":"false";updateLocalStorage("use-system-theme",useSystem)}updateLocalStorage(settingName,value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":updateTheme();updateLightAndDark();break;case"line-numbers":if(value===true){window.rustdoc_add_line_numbers_to_examples()}else{window.rustdoc_remove_line_numbers_from_examples()}break}}function showLightAndDark(){removeClass(document.getElementById("preferred-light-theme"),"hidden");removeClass(document.getElementById("preferred-dark-theme"),"hidden")}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme"),"hidden");addClass(document.getElementById("preferred-dark-theme"),"hidden")}function updateLightAndDark(){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||(useSystem===null&&getSettingValue("theme")===null)){showLightAndDark()}else{hideLightAndDark()}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.querySelectorAll("input[type=\"checkbox\"]"),toggle=>{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=()=>{changeSetting(toggle.id,toggle.checked)}});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){settingValue=useSystem==="false"?"light":"system preference"}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",ev=>{changeSetting(ev.target.name,ev.target.value)})})}function buildSettingsPageSections(settings){let output="";for(const setting of settings){const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\ -
    -
    ${setting_name}
    -
    `;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\ - `});output+=`\ -
    -
    `}else{const checked=setting["default"]===true?" checked":"";output+=`\ -
    \ - \ -
    `}}return output}function buildSettingsPage(){const theme_names=getVar("themes").split(",").filter(t=>t);theme_names.push("light","dark","ayu");const settings=[{"name":"Theme","js_name":"theme","default":"system preference","options":theme_names.concat("system preference"),},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":theme_names,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":theme_names,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
    ${buildSettingsPageSections(settings)}
    `;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover"}el.innerHTML=innerHTML;if(isSettingsPage){document.getElementById(MAIN_ID).appendChild(el)}else{el.setAttribute("tabindex","-1");getSettingsButton().appendChild(el)}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display=""}function settingsBlurHandler(event){blurHandler(event,getSettingsButton(),window.hidePopoverMenus)}if(isSettingsPage){getSettingsButton().onclick=event=>{event.preventDefault()}}else{const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");settingsButton.onclick=event=>{if(elemIsInParent(event.target,settingsMenu)){return}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals();if(shouldDisplaySettings){displaySettings()}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler});settingsMenu.onblur=settingsBlurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/static.files/src-script-3280b574d94e47b4.js b/static.files/src-script-3280b574d94e47b4.js deleted file mode 100644 index 9ea88921e..000000000 --- a/static.files/src-script-3280b574d94e47b4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(function(){const rootPath=getVar("root-path");const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;const RUSTDOC_MOBILE_BREAKPOINT=700;function closeSidebarIfMobile(){if(window.innerWidth"){addClass(document.documentElement,"src-sidebar-expanded");child.innerText="<";updateLocalStorage("source-sidebar-show","true")}else{removeClass(document.documentElement,"src-sidebar-expanded");child.innerText=">";updateLocalStorage("source-sidebar-show","false")}}function createSidebarToggle(){const sidebarToggle=document.createElement("div");sidebarToggle.id="src-sidebar-toggle";const inner=document.createElement("button");if(getCurrentValue("source-sidebar-show")==="true"){inner.innerText="<"}else{inner.innerText=">"}inner.onclick=toggleSidebar;sidebarToggle.appendChild(inner);return sidebarToggle}function createSrcSidebar(){const container=document.querySelector("nav.sidebar");const sidebarToggle=createSidebarToggle();container.insertBefore(sidebarToggle,container.firstChild);const sidebar=document.createElement("div");sidebar.id="src-sidebar";let hasFoundFile=false;const title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(srcIndex).forEach(key=>{srcIndex[key][NAME_OFFSET]=key;hasFoundFile=createDirEntry(srcIndex[key],sidebar,"",hasFoundFile)});container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}const lineNumbersRegex=/^#?(\d+)(?:-(\d+))?$/;function highlightSrcLines(match){if(typeof match==="undefined"){match=window.location.hash.match(lineNumbersRegex)}if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("a"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSrcHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSrcLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",()=>{const match=window.location.hash.match(lineNumbersRegex);if(match){return highlightSrcLines(match)}});onEachLazy(document.getElementsByClassName("src-line-numbers"),el=>{el.addEventListener("click",handleSrcHighlight)});highlightSrcLines();window.createSrcSidebar=createSrcSidebar})() \ No newline at end of file diff --git a/static.files/src-script-39ed315d46fb705f.js b/static.files/src-script-39ed315d46fb705f.js new file mode 100644 index 000000000..ef74f361e --- /dev/null +++ b/static.files/src-script-39ed315d46fb705f.js @@ -0,0 +1 @@ +"use strict";(function(){const rootPath=getVar("root-path");const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;const RUSTDOC_MOBILE_BREAKPOINT=700;function closeSidebarIfMobile(){if(window.innerWidth{removeClass(document.documentElement,"src-sidebar-expanded");getToggleLabel().innerText=">";updateLocalStorage("source-sidebar-show","false")};window.rustdocShowSourceSidebar=()=>{addClass(document.documentElement,"src-sidebar-expanded");getToggleLabel().innerText="<";updateLocalStorage("source-sidebar-show","true")};function toggleSidebar(){const child=this.parentNode.children[0];if(child.innerText===">"){window.rustdocShowSourceSidebar()}else{window.rustdocCloseSourceSidebar()}}function createSidebarToggle(){const sidebarToggle=document.createElement("div");sidebarToggle.id="src-sidebar-toggle";const inner=document.createElement("button");if(getCurrentValue("source-sidebar-show")==="true"){inner.innerText="<"}else{inner.innerText=">"}inner.onclick=toggleSidebar;sidebarToggle.appendChild(inner);return sidebarToggle}function createSrcSidebar(){const container=document.querySelector("nav.sidebar");const sidebarToggle=createSidebarToggle();container.insertBefore(sidebarToggle,container.firstChild);const sidebar=document.createElement("div");sidebar.id="src-sidebar";let hasFoundFile=false;const title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);for(const[key,source]of srcIndex){source[NAME_OFFSET]=key;hasFoundFile=createDirEntry(source,sidebar,"",hasFoundFile)}container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}function highlightSrcLines(){const match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/);if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("a"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSrcHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSrcLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",highlightSrcLines);onEachLazy(document.getElementsByClassName("src-line-numbers"),el=>{el.addEventListener("click",handleSrcHighlight)});highlightSrcLines();window.createSrcSidebar=createSrcSidebar})() \ No newline at end of file diff --git a/static.files/storage-f2adc0d6ca4d09fb.js b/static.files/storage-f2adc0d6ca4d09fb.js new file mode 100644 index 000000000..17233608a --- /dev/null +++ b/static.files/storage-f2adc0d6ca4d09fb.js @@ -0,0 +1 @@ +"use strict";const builtinThemes=["light","dark","ayu"];const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return current}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className)}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className)}}function onEach(arr,func){for(const elem of arr){if(func(elem)){return true}}return false}function onEachLazy(lazyArray,func){return onEach(Array.prototype.slice.call(lazyArray),func)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}const getVar=(function getVar(name){const el=document.querySelector("head > meta[name='rustdoc-vars']");return el?el.attributes["data-"+name].value:null});function switchTheme(newThemeName,saveTheme){if(saveTheme){updateLocalStorage("theme",newThemeName)}document.documentElement.setAttribute("data-theme",newThemeName);if(builtinThemes.indexOf(newThemeName)!==-1){if(window.currentTheme){window.currentTheme.parentNode.removeChild(window.currentTheme);window.currentTheme=null}}else{const newHref=getVar("root-path")+newThemeName+getVar("resource-suffix")+".css";if(!window.currentTheme){if(document.readyState==="loading"){document.write(``);window.currentTheme=document.getElementById("themeStyle")}else{window.currentTheme=document.createElement("link");window.currentTheme.rel="stylesheet";window.currentTheme.id="themeStyle";window.currentTheme.href=newHref;document.documentElement.appendChild(window.currentTheme)}}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref}}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true)}else{switchTheme(getSettingValue("theme"),false)}}mql.addEventListener("change",updateTheme);return updateTheme})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"src-sidebar-expanded")}if(getSettingValue("hide-sidebar")==="true"){addClass(document.documentElement,"hide-sidebar")}function updateSidebarWidth(){const desktopSidebarWidth=getSettingValue("desktop-sidebar-width");if(desktopSidebarWidth&&desktopSidebarWidth!=="null"){document.documentElement.style.setProperty("--desktop-sidebar-width",desktopSidebarWidth+"px")}const srcSidebarWidth=getSettingValue("src-sidebar-width");if(srcSidebarWidth&&srcSidebarWidth!=="null"){document.documentElement.style.setProperty("--src-sidebar-width",srcSidebarWidth+"px")}}updateSidebarWidth();window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0);setTimeout(updateSidebarWidth,0)}}) \ No newline at end of file diff --git a/static.files/storage-fec3eaa3851e447d.js b/static.files/storage-fec3eaa3851e447d.js deleted file mode 100644 index a687118f3..000000000 --- a/static.files/storage-fec3eaa3851e447d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";const builtinThemes=["light","dark","ayu"];const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return current}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className)}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className)}}function onEach(arr,func,reversed){if(arr&&arr.length>0){if(reversed){for(let i=arr.length-1;i>=0;--i){if(func(arr[i])){return true}}}else{for(const elem of arr){if(func(elem)){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}const getVar=(function getVar(name){const el=document.querySelector("head > meta[name='rustdoc-vars']");return el?el.attributes["data-"+name].value:null});function switchTheme(newThemeName,saveTheme){if(saveTheme){updateLocalStorage("theme",newThemeName)}document.documentElement.setAttribute("data-theme",newThemeName);if(builtinThemes.indexOf(newThemeName)!==-1){if(window.currentTheme){window.currentTheme.parentNode.removeChild(window.currentTheme);window.currentTheme=null}}else{const newHref=getVar("root-path")+newThemeName+getVar("resource-suffix")+".css";if(!window.currentTheme){if(document.readyState==="loading"){document.write(``);window.currentTheme=document.getElementById("themeStyle")}else{window.currentTheme=document.createElement("link");window.currentTheme.rel="stylesheet";window.currentTheme.id="themeStyle";window.currentTheme.href=newHref;document.documentElement.appendChild(window.currentTheme)}}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref}}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true)}else{switchTheme(getSettingValue("theme"),false)}}mql.addEventListener("change",updateTheme);return updateTheme})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"src-sidebar-expanded")}window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0)}}) \ No newline at end of file diff --git a/trait.impl/core/borrow/trait.Borrow.js b/trait.impl/core/borrow/trait.Borrow.js index c44fcc065..78daff05d 100644 --- a/trait.impl/core/borrow/trait.Borrow.js +++ b/trait.impl/core/borrow/trait.Borrow.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"bytes":[["impl Borrow<[u8]> for BytesMut"],["impl Borrow<[u8]> for Bytes"]] +"bytes":[["impl Borrow<[u8]> for Bytes"],["impl Borrow<[u8]> for BytesMut"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/borrow/trait.BorrowMut.js b/trait.impl/core/borrow/trait.BorrowMut.js index 7706be726..6df771452 100644 --- a/trait.impl/core/borrow/trait.BorrowMut.js +++ b/trait.impl/core/borrow/trait.BorrowMut.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"bytes":[["impl BorrowMut<[u8]> for BytesMut"]] +"bytes":[["impl BorrowMut<[u8]> for BytesMut"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/clone/trait.Clone.js b/trait.impl/core/clone/trait.Clone.js index 68c82006e..98e92fb5e 100644 --- a/trait.impl/core/clone/trait.Clone.js +++ b/trait.impl/core/clone/trait.Clone.js @@ -1,4 +1,4 @@ (function() {var implementors = { -"bytes":[["impl Clone for Bytes"],["impl Clone for BytesMut"]], -"ping_rs":[["impl Clone for ContinuousStopStruct"],["impl Clone for PingIntervalStruct"],["impl Clone for SetTemperatureTimeoutStruct"],["impl Clone for ContinuousStartStruct"],["impl Clone for MotorOffStruct"],["impl Clone for DeviceDataStruct"],["impl Clone for GotoBootloaderStruct"],["impl Clone for Messages"],["impl Clone for ResetStruct"],["impl Clone for ProfileStruct"],["impl Clone for TransmitDurationStruct"],["impl Clone for SetTemperatureMaxStruct"],["impl Clone for Messages"],["impl Clone for FirmwareVersionStruct"],["impl Clone for ProtocolVersionStruct"],["impl Clone for SetDeviceIdStruct"],["impl Clone for PingProtocolHead"],["impl Clone for CurrentTimeoutStruct"],["impl Clone for ResetDefaultsStruct"],["impl Clone for PingEnableStruct"],["impl Clone for GeneralRequestStruct"],["impl Clone for SetLpfSampleFrequencyStruct"],["impl Clone for SetCellVoltageMinimumStruct"],["impl Clone for AckStruct"],["impl Clone for SetGainSettingStruct"],["impl Clone for EventsStruct"],["impl Clone for CellVoltageMinStruct"],["impl Clone for AsciiTextStruct"],["impl Clone for StateStruct"],["impl Clone for SetCellVoltageTimeoutStruct"],["impl Clone for GainSettingStruct"],["impl Clone for GeneralInfoStruct"],["impl Clone for SetPingIntervalStruct"],["impl Clone for ProtocolMessage"],["impl Clone for SpeedOfSoundStruct"],["impl Clone for AutoDeviceDataStruct"],["impl Clone for AutoTransmitStruct"],["impl Clone for DistanceSimpleStruct"],["impl Clone for SetDeviceIdStruct"],["impl Clone for NackStruct"],["impl Clone for TemperatureTimeoutStruct"],["impl Clone for ModeAutoStruct"],["impl Clone for SetCurrentMaxStruct"],["impl Clone for PcbTemperatureStruct"],["impl Clone for TransducerStruct"],["impl Clone for SetCurrentTimeoutStruct"],["impl Clone for SetRangeStruct"],["impl Clone for PingProtocolHead"],["impl Clone for DeviceIdStruct"],["impl Clone for SetLpfSettingStruct"],["impl Clone for RebootStruct"],["impl Clone for PingProtocolHead"],["impl Clone for ProcessorTemperatureStruct"],["impl Clone for SetPingEnableStruct"],["impl Clone for RangeStruct"],["impl Clone for Messages"],["impl Clone for DeviceIdStruct"],["impl Clone for SetStreamRateStruct"],["impl Clone for DeviceInformationStruct"],["impl Clone for CurrentMaxStruct"],["impl Clone for DistanceStruct"],["impl Clone for Voltage5Struct"],["impl Clone for EraseFlashStruct"],["impl Clone for CellTimeoutStruct"],["impl Clone for SetModeAutoStruct"],["impl Clone for TemperatureMaxStruct"],["impl Clone for Messages"],["impl Clone for SetSpeedOfSoundStruct"],["impl Clone for PingProtocolHead"]] +"bytes":[["impl Clone for BytesMut"],["impl Clone for Bytes"]], +"ping_rs":[["impl Clone for SetDeviceIdStruct"],["impl Clone for PcbTemperatureStruct"],["impl Clone for SetPingEnableStruct"],["impl Clone for SetCurrentMaxStruct"],["impl Clone for TemperatureMaxStruct"],["impl Clone for PingProtocolHead"],["impl Clone for SetModeAutoStruct"],["impl Clone for Messages"],["impl Clone for SetLpfSettingStruct"],["impl Clone for SetCellVoltageTimeoutStruct"],["impl Clone for SetPingIntervalStruct"],["impl Clone for Messages"],["impl Clone for ProfileStruct"],["impl Clone for ContinuousStartStruct"],["impl Clone for CellTimeoutStruct"],["impl Clone for GeneralInfoStruct"],["impl Clone for EventsStruct"],["impl Clone for TransducerStruct"],["impl Clone for TransmitDurationStruct"],["impl Clone for Messages"],["impl Clone for SetLpfSampleFrequencyStruct"],["impl Clone for ProtocolMessage"],["impl Clone for ModeAutoStruct"],["impl Clone for AutoTransmitStruct"],["impl Clone for NackStruct"],["impl Clone for AckStruct"],["impl Clone for SetTemperatureMaxStruct"],["impl Clone for RebootStruct"],["impl Clone for SetDeviceIdStruct"],["impl Clone for SetRangeStruct"],["impl Clone for SpeedOfSoundStruct"],["impl Clone for ContinuousStopStruct"],["impl Clone for PingProtocolHead"],["impl Clone for ResetStruct"],["impl Clone for PingProtocolHead"],["impl Clone for GotoBootloaderStruct"],["impl Clone for SetGainSettingStruct"],["impl Clone for SetSpeedOfSoundStruct"],["impl Clone for SetTemperatureTimeoutStruct"],["impl Clone for DeviceIdStruct"],["impl Clone for FirmwareVersionStruct"],["impl Clone for ResetDefaultsStruct"],["impl Clone for AutoDeviceDataStruct"],["impl Clone for DeviceInformationStruct"],["impl Clone for AsciiTextStruct"],["impl Clone for Messages"],["impl Clone for CurrentTimeoutStruct"],["impl Clone for CellVoltageMinStruct"],["impl Clone for RangeStruct"],["impl Clone for GainSettingStruct"],["impl Clone for MotorOffStruct"],["impl Clone for DistanceStruct"],["impl Clone for DistanceSimpleStruct"],["impl Clone for GeneralRequestStruct"],["impl Clone for ProtocolVersionStruct"],["impl Clone for SetCellVoltageMinimumStruct"],["impl Clone for SetStreamRateStruct"],["impl Clone for ProcessorTemperatureStruct"],["impl Clone for Voltage5Struct"],["impl Clone for DeviceIdStruct"],["impl Clone for TemperatureTimeoutStruct"],["impl Clone for SetCurrentTimeoutStruct"],["impl Clone for PingEnableStruct"],["impl Clone for PingProtocolHead"],["impl Clone for CurrentMaxStruct"],["impl Clone for EraseFlashStruct"],["impl Clone for DeviceDataStruct"],["impl Clone for StateStruct"],["impl Clone for PingIntervalStruct"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/cmp/trait.Eq.js b/trait.impl/core/cmp/trait.Eq.js index 418ba263e..61977f9f4 100644 --- a/trait.impl/core/cmp/trait.Eq.js +++ b/trait.impl/core/cmp/trait.Eq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"bytes":[["impl Eq for BytesMut"],["impl Eq for Bytes"]] +"bytes":[["impl Eq for BytesMut"],["impl Eq for Bytes"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/cmp/trait.Ord.js b/trait.impl/core/cmp/trait.Ord.js index 84c64a16a..4e11a07ae 100644 --- a/trait.impl/core/cmp/trait.Ord.js +++ b/trait.impl/core/cmp/trait.Ord.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"bytes":[["impl Ord for BytesMut"],["impl Ord for Bytes"]] +"bytes":[["impl Ord for Bytes"],["impl Ord for BytesMut"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/cmp/trait.PartialEq.js b/trait.impl/core/cmp/trait.PartialEq.js index 2ea2baba9..f6a993340 100644 --- a/trait.impl/core/cmp/trait.PartialEq.js +++ b/trait.impl/core/cmp/trait.PartialEq.js @@ -1,4 +1,4 @@ (function() {var implementors = { -"bytes":[["impl PartialEq<String> for BytesMut"],["impl PartialEq<BytesMut> for str"],["impl PartialEq<str> for BytesMut"],["impl<'a, T: ?Sized> PartialEq<&'a T> for BytesMutwhere\n BytesMut: PartialEq<T>,"],["impl PartialEq<[u8]> for BytesMut"],["impl PartialEq<Bytes> for [u8]"],["impl PartialEq<BytesMut> for &str"],["impl PartialEq<String> for Bytes"],["impl PartialEq<Vec<u8>> for BytesMut"],["impl PartialEq<Bytes> for String"],["impl PartialEq<Bytes> for str"],["impl PartialEq for Bytes"],["impl PartialEq<str> for Bytes"],["impl PartialEq<Bytes> for BytesMut"],["impl PartialEq<[u8]> for Bytes"],["impl<'a, T: ?Sized> PartialEq<&'a T> for Byteswhere\n Bytes: PartialEq<T>,"],["impl PartialEq<Bytes> for &[u8]"],["impl PartialEq<BytesMut> for String"],["impl PartialEq<BytesMut> for Vec<u8>"],["impl PartialEq<Bytes> for &str"],["impl PartialEq<Vec<u8>> for Bytes"],["impl PartialEq<BytesMut> for [u8]"],["impl PartialEq<Bytes> for Vec<u8>"],["impl PartialEq<BytesMut> for Bytes"],["impl PartialEq for BytesMut"],["impl PartialEq<BytesMut> for &[u8]"]], -"ping_rs":[["impl PartialEq for GainSettingStruct"],["impl PartialEq for SetModeAutoStruct"],["impl PartialEq for CurrentTimeoutStruct"],["impl PartialEq for ProfileStruct"],["impl PartialEq for ResetStruct"],["impl PartialEq for RebootStruct"],["impl PartialEq for DeviceDataStruct"],["impl PartialEq for StateStruct"],["impl PartialEq for SetPingIntervalStruct"],["impl PartialEq for SetTemperatureMaxStruct"],["impl PartialEq for SetLpfSampleFrequencyStruct"],["impl PartialEq for PingProtocolHead"],["impl PartialEq for MotorOffStruct"],["impl PartialEq for CellTimeoutStruct"],["impl PartialEq for SetCellVoltageTimeoutStruct"],["impl PartialEq for SetCurrentTimeoutStruct"],["impl PartialEq for EventsStruct"],["impl PartialEq for AutoDeviceDataStruct"],["impl PartialEq for ResetDefaultsStruct"],["impl PartialEq for CurrentMaxStruct"],["impl PartialEq for TransmitDurationStruct"],["impl PartialEq for TemperatureMaxStruct"],["impl PartialEq for PingProtocolHead"],["impl PartialEq for SetDeviceIdStruct"],["impl PartialEq for SetSpeedOfSoundStruct"],["impl PartialEq for SetGainSettingStruct"],["impl PartialEq for DistanceSimpleStruct"],["impl PartialEq for PingProtocolHead"],["impl PartialEq for Messages"],["impl PartialEq for Voltage5Struct"],["impl PartialEq for CellVoltageMinStruct"],["impl PartialEq for AckStruct"],["impl PartialEq for ContinuousStopStruct"],["impl PartialEq for SpeedOfSoundStruct"],["impl PartialEq for GeneralInfoStruct"],["impl PartialEq for ContinuousStartStruct"],["impl PartialEq for SetCurrentMaxStruct"],["impl PartialEq for PcbTemperatureStruct"],["impl PartialEq for TransducerStruct"],["impl PartialEq for Messages"],["impl PartialEq for SetStreamRateStruct"],["impl PartialEq for Messages"],["impl PartialEq for GotoBootloaderStruct"],["impl PartialEq for AsciiTextStruct"],["impl PartialEq for DeviceInformationStruct"],["impl PartialEq for PingIntervalStruct"],["impl PartialEq for ModeAutoStruct"],["impl PartialEq for PingEnableStruct"],["impl PartialEq for SetPingEnableStruct"],["impl PartialEq for SetTemperatureTimeoutStruct"],["impl PartialEq for ProcessorTemperatureStruct"],["impl PartialEq for RangeStruct"],["impl PartialEq for SetDeviceIdStruct"],["impl PartialEq for NackStruct"],["impl PartialEq for PingProtocolHead"],["impl PartialEq for TemperatureTimeoutStruct"],["impl PartialEq for GeneralRequestStruct"],["impl PartialEq for EraseFlashStruct"],["impl PartialEq for ProtocolVersionStruct"],["impl PartialEq for SetLpfSettingStruct"],["impl PartialEq for DeviceIdStruct"],["impl PartialEq for AutoTransmitStruct"],["impl PartialEq for Messages"],["impl PartialEq for DistanceStruct"],["impl PartialEq for FirmwareVersionStruct"],["impl PartialEq for DeviceIdStruct"],["impl PartialEq for SetRangeStruct"],["impl PartialEq for SetCellVoltageMinimumStruct"]] +"bytes":[["impl PartialEq<Bytes> for [u8]"],["impl PartialEq<Vec<u8>> for Bytes"],["impl PartialEq<Bytes> for &str"],["impl PartialEq<Bytes> for str"],["impl PartialEq for BytesMut"],["impl PartialEq<str> for BytesMut"],["impl PartialEq<BytesMut> for &[u8]"],["impl PartialEq<String> for BytesMut"],["impl PartialEq<Bytes> for Vec<u8>"],["impl PartialEq for Bytes"],["impl PartialEq<String> for Bytes"],["impl<'a, T: ?Sized> PartialEq<&'a T> for BytesMut
    where\n BytesMut: PartialEq<T>,
    "],["impl PartialEq<BytesMut> for &str"],["impl<'a, T: ?Sized> PartialEq<&'a T> for Bytes
    where\n Bytes: PartialEq<T>,
    "],["impl PartialEq<[u8]> for BytesMut"],["impl PartialEq<Bytes> for &[u8]"],["impl PartialEq<Bytes> for BytesMut"],["impl PartialEq<BytesMut> for Bytes"],["impl PartialEq<BytesMut> for Vec<u8>"],["impl PartialEq<[u8]> for Bytes"],["impl PartialEq<BytesMut> for str"],["impl PartialEq<BytesMut> for [u8]"],["impl PartialEq<str> for Bytes"],["impl PartialEq<BytesMut> for String"],["impl PartialEq<Bytes> for String"],["impl PartialEq<Vec<u8>> for BytesMut"]], +"ping_rs":[["impl PartialEq for CellVoltageMinStruct"],["impl PartialEq for GotoBootloaderStruct"],["impl PartialEq for AutoDeviceDataStruct"],["impl PartialEq for GeneralInfoStruct"],["impl PartialEq for SetCurrentMaxStruct"],["impl PartialEq for SetCurrentTimeoutStruct"],["impl PartialEq for Messages"],["impl PartialEq for SetStreamRateStruct"],["impl PartialEq for PingProtocolHead"],["impl PartialEq for SetPingIntervalStruct"],["impl PartialEq for ResetStruct"],["impl PartialEq for Messages"],["impl PartialEq for SetLpfSampleFrequencyStruct"],["impl PartialEq for CellTimeoutStruct"],["impl PartialEq for SetDeviceIdStruct"],["impl PartialEq for PingProtocolHead"],["impl PartialEq for TransmitDurationStruct"],["impl PartialEq for EventsStruct"],["impl PartialEq for SpeedOfSoundStruct"],["impl PartialEq for ResetDefaultsStruct"],["impl PartialEq for SetCellVoltageMinimumStruct"],["impl PartialEq for NackStruct"],["impl PartialEq for Messages"],["impl PartialEq for DeviceIdStruct"],["impl PartialEq for StateStruct"],["impl PartialEq for Messages"],["impl PartialEq for DeviceIdStruct"],["impl PartialEq for ContinuousStartStruct"],["impl PartialEq for SetSpeedOfSoundStruct"],["impl PartialEq for ModeAutoStruct"],["impl PartialEq for DeviceDataStruct"],["impl PartialEq for ProtocolVersionStruct"],["impl PartialEq for AutoTransmitStruct"],["impl PartialEq for ContinuousStopStruct"],["impl PartialEq for PingProtocolHead"],["impl PartialEq for Voltage5Struct"],["impl PartialEq for SetRangeStruct"],["impl PartialEq for SetDeviceIdStruct"],["impl PartialEq for PingEnableStruct"],["impl PartialEq for DistanceSimpleStruct"],["impl PartialEq for RebootStruct"],["impl PartialEq for SetLpfSettingStruct"],["impl PartialEq for SetModeAutoStruct"],["impl PartialEq for ProfileStruct"],["impl PartialEq for MotorOffStruct"],["impl PartialEq for AsciiTextStruct"],["impl PartialEq for CurrentTimeoutStruct"],["impl PartialEq for PingProtocolHead"],["impl PartialEq for DistanceStruct"],["impl PartialEq for SetTemperatureMaxStruct"],["impl PartialEq for SetCellVoltageTimeoutStruct"],["impl PartialEq for GainSettingStruct"],["impl PartialEq for TemperatureMaxStruct"],["impl PartialEq for CurrentMaxStruct"],["impl PartialEq for GeneralRequestStruct"],["impl PartialEq for EraseFlashStruct"],["impl PartialEq for RangeStruct"],["impl PartialEq for TemperatureTimeoutStruct"],["impl PartialEq for SetTemperatureTimeoutStruct"],["impl PartialEq for ProcessorTemperatureStruct"],["impl PartialEq for PingIntervalStruct"],["impl PartialEq for PcbTemperatureStruct"],["impl PartialEq for SetPingEnableStruct"],["impl PartialEq for SetGainSettingStruct"],["impl PartialEq for AckStruct"],["impl PartialEq for TransducerStruct"],["impl PartialEq for DeviceInformationStruct"],["impl PartialEq for FirmwareVersionStruct"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/cmp/trait.PartialOrd.js b/trait.impl/core/cmp/trait.PartialOrd.js index 051043956..0d2209edd 100644 --- a/trait.impl/core/cmp/trait.PartialOrd.js +++ b/trait.impl/core/cmp/trait.PartialOrd.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"bytes":[["impl PartialOrd<[u8]> for BytesMut"],["impl PartialOrd<String> for Bytes"],["impl PartialOrd<String> for BytesMut"],["impl<'a, T: ?Sized> PartialOrd<&'a T> for Byteswhere\n Bytes: PartialOrd<T>,"],["impl PartialOrd<str> for BytesMut"],["impl PartialOrd<Bytes> for String"],["impl PartialOrd<[u8]> for Bytes"],["impl PartialOrd<Bytes> for str"],["impl PartialOrd<Vec<u8>> for BytesMut"],["impl<'a, T: ?Sized> PartialOrd<&'a T> for BytesMutwhere\n BytesMut: PartialOrd<T>,"],["impl PartialOrd<Bytes> for [u8]"],["impl PartialOrd for BytesMut"],["impl PartialOrd<BytesMut> for Vec<u8>"],["impl PartialOrd<Bytes> for &[u8]"],["impl PartialOrd<BytesMut> for [u8]"],["impl PartialOrd<Bytes> for Vec<u8>"],["impl PartialOrd<BytesMut> for str"],["impl PartialOrd<BytesMut> for String"],["impl PartialOrd<Vec<u8>> for Bytes"],["impl PartialOrd for Bytes"],["impl PartialOrd<str> for Bytes"],["impl PartialOrd<BytesMut> for &[u8]"],["impl PartialOrd<Bytes> for &str"],["impl PartialOrd<BytesMut> for &str"]] +"bytes":[["impl PartialOrd<[u8]> for BytesMut"],["impl PartialOrd<Bytes> for &[u8]"],["impl PartialOrd<Bytes> for Vec<u8>"],["impl<'a, T: ?Sized> PartialOrd<&'a T> for Bytes
    where\n Bytes: PartialOrd<T>,
    "],["impl PartialOrd<str> for BytesMut"],["impl PartialOrd<BytesMut> for &[u8]"],["impl PartialOrd<Vec<u8>> for Bytes"],["impl PartialOrd<str> for Bytes"],["impl PartialOrd<Bytes> for str"],["impl PartialOrd<[u8]> for Bytes"],["impl PartialOrd<String> for Bytes"],["impl PartialOrd<Bytes> for String"],["impl PartialOrd<Bytes> for &str"],["impl PartialOrd<BytesMut> for &str"],["impl PartialOrd<Vec<u8>> for BytesMut"],["impl<'a, T: ?Sized> PartialOrd<&'a T> for BytesMut
    where\n BytesMut: PartialOrd<T>,
    "],["impl PartialOrd for BytesMut"],["impl PartialOrd for Bytes"],["impl PartialOrd<BytesMut> for str"],["impl PartialOrd<BytesMut> for [u8]"],["impl PartialOrd<Bytes> for [u8]"],["impl PartialOrd<BytesMut> for String"],["impl PartialOrd<String> for BytesMut"],["impl PartialOrd<BytesMut> for Vec<u8>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/convert/trait.AsMut.js b/trait.impl/core/convert/trait.AsMut.js index 6f18bf8c1..bfacfcdd3 100644 --- a/trait.impl/core/convert/trait.AsMut.js +++ b/trait.impl/core/convert/trait.AsMut.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"bytes":[["impl AsMut<[u8]> for BytesMut"]] +"bytes":[["impl AsMut<[u8]> for BytesMut"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/convert/trait.AsRef.js b/trait.impl/core/convert/trait.AsRef.js index 437cd85a6..440d3174c 100644 --- a/trait.impl/core/convert/trait.AsRef.js +++ b/trait.impl/core/convert/trait.AsRef.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"bytes":[["impl AsRef<[u8]> for Bytes"],["impl AsRef<[u8]> for BytesMut"]] +"bytes":[["impl AsRef<[u8]> for Bytes"],["impl AsRef<[u8]> for BytesMut"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/convert/trait.From.js b/trait.impl/core/convert/trait.From.js index 844eb3195..971a6d1b7 100644 --- a/trait.impl/core/convert/trait.From.js +++ b/trait.impl/core/convert/trait.From.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"bytes":[["impl From<BytesMut> for Vec<u8>"],["impl<'a> From<&'a mut [MaybeUninit<u8>]> for &'a mut UninitSlice"],["impl<'a> From<&'a [u8]> for BytesMut"],["impl From<String> for Bytes"],["impl<'a> From<&'a mut [u8]> for &'a mut UninitSlice"],["impl<'a> From<&'a str> for BytesMut"],["impl From<&'static [u8]> for Bytes"],["impl From<Bytes> for Vec<u8>"],["impl From<Box<[u8]>> for Bytes"],["impl From<Vec<u8>> for Bytes"],["impl From<&'static str> for Bytes"],["impl From<BytesMut> for Bytes"]] +"bytes":[["impl From<&'static str> for Bytes"],["impl From<BytesMut> for Vec<u8>"],["impl From<Bytes> for Vec<u8>"],["impl From<BytesMut> for Bytes"],["impl From<String> for Bytes"],["impl From<Vec<u8>> for Bytes"],["impl From<&'static [u8]> for Bytes"],["impl<'a> From<&'a str> for BytesMut"],["impl From<Box<[u8]>> for Bytes"],["impl<'a> From<&'a [u8]> for BytesMut"],["impl<'a> From<&'a mut [MaybeUninit<u8>]> for &'a mut UninitSlice"],["impl<'a> From<&'a mut [u8]> for &'a mut UninitSlice"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/convert/trait.TryFrom.js b/trait.impl/core/convert/trait.TryFrom.js index 232bb1af0..04312d7ed 100644 --- a/trait.impl/core/convert/trait.TryFrom.js +++ b/trait.impl/core/convert/trait.TryFrom.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"ping_rs":[["impl TryFrom<&Vec<u8>> for Messages"],["impl TryFrom<&ProtocolMessage> for Messages"]] +"ping_rs":[["impl TryFrom<&ProtocolMessage> for Messages"],["impl TryFrom<&Vec<u8>> for Messages"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/default/trait.Default.js b/trait.impl/core/default/trait.Default.js index 863605222..31ccee2ec 100644 --- a/trait.impl/core/default/trait.Default.js +++ b/trait.impl/core/default/trait.Default.js @@ -1,4 +1,4 @@ (function() {var implementors = { -"bytes":[["impl Default for BytesMut"],["impl Default for Bytes"]], -"ping_rs":[["impl Default for SetCellVoltageTimeoutStruct"],["impl Default for CellVoltageMinStruct"],["impl Default for SetLpfSettingStruct"],["impl Default for Voltage5Struct"],["impl Default for FirmwareVersionStruct"],["impl Default for ProtocolVersionStruct"],["impl Default for PcbTemperatureStruct"],["impl Default for DeviceInformationStruct"],["impl Default for SpeedOfSoundStruct"],["impl Default for CellTimeoutStruct"],["impl Default for GeneralInfoStruct"],["impl Default for TransmitDurationStruct"],["impl Default for GainSettingStruct"],["impl Default for ResetStruct"],["impl Default for GotoBootloaderStruct"],["impl Default for ContinuousStopStruct"],["impl Default for AutoTransmitStruct"],["impl Default for ModeAutoStruct"],["impl Default for DistanceStruct"],["impl Default for SetDeviceIdStruct"],["impl Default for SetPingEnableStruct"],["impl Default for CurrentTimeoutStruct"],["impl Default for TemperatureTimeoutStruct"],["impl Default for SetDeviceIdStruct"],["impl Default for RangeStruct"],["impl Default for SetSpeedOfSoundStruct"],["impl Default for DistanceSimpleStruct"],["impl Default for PingIntervalStruct"],["impl Default for PingProtocolHead"],["impl Default for PingProtocolHead"],["impl Default for AsciiTextStruct"],["impl Default for DeviceDataStruct"],["impl Default for TransducerStruct"],["impl Default for CurrentMaxStruct"],["impl Default for PingProtocolHead"],["impl Default for RebootStruct"],["impl Default for TemperatureMaxStruct"],["impl Default for MotorOffStruct"],["impl Default for DeviceIdStruct"],["impl Default for PingEnableStruct"],["impl Default for SetPingIntervalStruct"],["impl Default for SetCurrentTimeoutStruct"],["impl Default for ProtocolMessage"],["impl Default for NackStruct"],["impl Default for SetTemperatureTimeoutStruct"],["impl Default for SetCellVoltageMinimumStruct"],["impl Default for SetStreamRateStruct"],["impl Default for ContinuousStartStruct"],["impl Default for SetGainSettingStruct"],["impl Default for EraseFlashStruct"],["impl Default for PingProtocolHead"],["impl Default for AckStruct"],["impl Default for SetModeAutoStruct"],["impl Default for DeviceIdStruct"],["impl Default for GeneralRequestStruct"],["impl Default for ResetDefaultsStruct"],["impl Default for StateStruct"],["impl Default for ProcessorTemperatureStruct"],["impl Default for SetRangeStruct"],["impl Default for EventsStruct"],["impl Default for SetLpfSampleFrequencyStruct"],["impl Default for SetCurrentMaxStruct"],["impl Default for ProfileStruct"],["impl Default for AutoDeviceDataStruct"],["impl Default for SetTemperatureMaxStruct"]] +"bytes":[["impl Default for BytesMut"],["impl Default for Bytes"]], +"ping_rs":[["impl Default for SpeedOfSoundStruct"],["impl Default for DeviceDataStruct"],["impl Default for TemperatureTimeoutStruct"],["impl Default for PingProtocolHead"],["impl Default for PingEnableStruct"],["impl Default for SetDeviceIdStruct"],["impl Default for DistanceStruct"],["impl Default for TransmitDurationStruct"],["impl Default for SetPingIntervalStruct"],["impl Default for PingProtocolHead"],["impl Default for Voltage5Struct"],["impl Default for EventsStruct"],["impl Default for ModeAutoStruct"],["impl Default for RebootStruct"],["impl Default for ProfileStruct"],["impl Default for SetModeAutoStruct"],["impl Default for GainSettingStruct"],["impl Default for AsciiTextStruct"],["impl Default for RangeStruct"],["impl Default for SetRangeStruct"],["impl Default for PingIntervalStruct"],["impl Default for TransducerStruct"],["impl Default for DistanceSimpleStruct"],["impl Default for ProcessorTemperatureStruct"],["impl Default for PingProtocolHead"],["impl Default for ProtocolVersionStruct"],["impl Default for AutoDeviceDataStruct"],["impl Default for SetStreamRateStruct"],["impl Default for DeviceIdStruct"],["impl Default for CellVoltageMinStruct"],["impl Default for PcbTemperatureStruct"],["impl Default for TemperatureMaxStruct"],["impl Default for NackStruct"],["impl Default for SetTemperatureTimeoutStruct"],["impl Default for SetGainSettingStruct"],["impl Default for SetPingEnableStruct"],["impl Default for MotorOffStruct"],["impl Default for SetLpfSettingStruct"],["impl Default for StateStruct"],["impl Default for GotoBootloaderStruct"],["impl Default for CellTimeoutStruct"],["impl Default for GeneralRequestStruct"],["impl Default for SetLpfSampleFrequencyStruct"],["impl Default for SetTemperatureMaxStruct"],["impl Default for AutoTransmitStruct"],["impl Default for AckStruct"],["impl Default for ContinuousStopStruct"],["impl Default for ContinuousStartStruct"],["impl Default for CurrentMaxStruct"],["impl Default for ProtocolMessage"],["impl Default for SetCellVoltageTimeoutStruct"],["impl Default for PingProtocolHead"],["impl Default for GeneralInfoStruct"],["impl Default for FirmwareVersionStruct"],["impl Default for SetCellVoltageMinimumStruct"],["impl Default for SetDeviceIdStruct"],["impl Default for SetSpeedOfSoundStruct"],["impl Default for CurrentTimeoutStruct"],["impl Default for EraseFlashStruct"],["impl Default for ResetDefaultsStruct"],["impl Default for SetCurrentTimeoutStruct"],["impl Default for ResetStruct"],["impl Default for DeviceIdStruct"],["impl Default for SetCurrentMaxStruct"],["impl Default for DeviceInformationStruct"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/fmt/trait.Debug.js b/trait.impl/core/fmt/trait.Debug.js index 27609f341..53ea709cc 100644 --- a/trait.impl/core/fmt/trait.Debug.js +++ b/trait.impl/core/fmt/trait.Debug.js @@ -1,4 +1,4 @@ (function() {var implementors = { -"bytes":[["impl<T: Debug, U: Debug> Debug for Chain<T, U>"],["impl<T: Debug> Debug for Take<T>"],["impl Debug for BytesMut"],["impl Debug for Bytes"],["impl Debug for UninitSlice"],["impl<T: Debug> Debug for Limit<T>"],["impl<T: Debug> Debug for IntoIter<T>"],["impl<B: Debug> Debug for Writer<B>"],["impl<B: Debug> Debug for Reader<B>"]], -"ping_rs":[["impl Debug for ResetStruct"],["impl Debug for SetTemperatureTimeoutStruct"],["impl Debug for SetDeviceIdStruct"],["impl Debug for SetRangeStruct"],["impl Debug for CellVoltageMinStruct"],["impl Debug for PingProtocolHead"],["impl Debug for DistanceStruct"],["impl Debug for GotoBootloaderStruct"],["impl Debug for SetLpfSampleFrequencyStruct"],["impl Debug for PingEnableStruct"],["impl Debug for FirmwareVersionStruct"],["impl Debug for TemperatureTimeoutStruct"],["impl Debug for AutoDeviceDataStruct"],["impl Debug for GainSettingStruct"],["impl Debug for ModeAutoStruct"],["impl Debug for Messages"],["impl Debug for EventsStruct"],["impl Debug for SetCurrentTimeoutStruct"],["impl Debug for SetDeviceIdStruct"],["impl Debug for AckStruct"],["impl Debug for ProtocolVersionStruct"],["impl Debug for DeviceIdStruct"],["impl Debug for EraseFlashStruct"],["impl Debug for SetSpeedOfSoundStruct"],["impl Debug for Messages"],["impl Debug for ProcessorTemperatureStruct"],["impl Debug for TemperatureMaxStruct"],["impl Debug for ProtocolMessage"],["impl Debug for SetTemperatureMaxStruct"],["impl Debug for StateStruct"],["impl Debug for Messages"],["impl Debug for SetCellVoltageMinimumStruct"],["impl Debug for SetGainSettingStruct"],["impl Debug for DeviceIdStruct"],["impl Debug for NackStruct"],["impl Debug for AsciiTextStruct"],["impl Debug for ParseError"],["impl Debug for DistanceSimpleStruct"],["impl Debug for DeviceDataStruct"],["impl Debug for AutoTransmitStruct"],["impl Debug for RebootStruct"],["impl Debug for DecoderResult"],["impl Debug for MotorOffStruct"],["impl Debug for PingIntervalStruct"],["impl Debug for Messages"],["impl Debug for CellTimeoutStruct"],["impl Debug for SetStreamRateStruct"],["impl Debug for PingProtocolHead"],["impl Debug for GeneralInfoStruct"],["impl Debug for SetModeAutoStruct"],["impl Debug for ContinuousStopStruct"],["impl Debug for ResetDefaultsStruct"],["impl Debug for RangeStruct"],["impl Debug for ContinuousStartStruct"],["impl Debug for PcbTemperatureStruct"],["impl Debug for SetCellVoltageTimeoutStruct"],["impl Debug for SetLpfSettingStruct"],["impl Debug for PingProtocolHead"],["impl Debug for TransducerStruct"],["impl Debug for DecoderState"],["impl Debug for SpeedOfSoundStruct"],["impl Debug for SetPingEnableStruct"],["impl Debug for Voltage5Struct"],["impl Debug for CurrentMaxStruct"],["impl Debug for DeviceInformationStruct"],["impl Debug for SetCurrentMaxStruct"],["impl Debug for SetPingIntervalStruct"],["impl Debug for GeneralRequestStruct"],["impl Debug for ProfileStruct"],["impl Debug for CurrentTimeoutStruct"],["impl Debug for PingProtocolHead"],["impl Debug for TransmitDurationStruct"]] +"bytes":[["impl<T: Debug, U: Debug> Debug for Chain<T, U>"],["impl<T: Debug> Debug for Limit<T>"],["impl<T: Debug> Debug for IntoIter<T>"],["impl<B: Debug> Debug for Reader<B>"],["impl Debug for Bytes"],["impl Debug for BytesMut"],["impl<B: Debug> Debug for Writer<B>"],["impl Debug for UninitSlice"],["impl<T: Debug> Debug for Take<T>"]], +"ping_rs":[["impl Debug for Messages"],["impl Debug for AsciiTextStruct"],["impl Debug for CellVoltageMinStruct"],["impl Debug for SetCurrentMaxStruct"],["impl Debug for AutoTransmitStruct"],["impl Debug for PingProtocolHead"],["impl Debug for NackStruct"],["impl Debug for SetCurrentTimeoutStruct"],["impl Debug for GotoBootloaderStruct"],["impl Debug for FirmwareVersionStruct"],["impl Debug for EventsStruct"],["impl Debug for SpeedOfSoundStruct"],["impl Debug for TemperatureTimeoutStruct"],["impl Debug for Messages"],["impl Debug for RangeStruct"],["impl Debug for PingEnableStruct"],["impl Debug for Voltage5Struct"],["impl Debug for DeviceInformationStruct"],["impl Debug for AutoDeviceDataStruct"],["impl Debug for MotorOffStruct"],["impl Debug for TransmitDurationStruct"],["impl Debug for DeviceDataStruct"],["impl Debug for ProtocolVersionStruct"],["impl Debug for SetDeviceIdStruct"],["impl Debug for SetGainSettingStruct"],["impl Debug for ContinuousStopStruct"],["impl Debug for TemperatureMaxStruct"],["impl Debug for TransducerStruct"],["impl Debug for DecoderState"],["impl Debug for DeviceIdStruct"],["impl Debug for GainSettingStruct"],["impl Debug for SetModeAutoStruct"],["impl Debug for PingProtocolHead"],["impl Debug for GeneralRequestStruct"],["impl Debug for SetCellVoltageTimeoutStruct"],["impl Debug for StateStruct"],["impl Debug for Messages"],["impl Debug for DistanceStruct"],["impl Debug for SetSpeedOfSoundStruct"],["impl Debug for AckStruct"],["impl Debug for EraseFlashStruct"],["impl Debug for CurrentTimeoutStruct"],["impl Debug for DistanceSimpleStruct"],["impl Debug for ParseError"],["impl Debug for SetPingIntervalStruct"],["impl Debug for CurrentMaxStruct"],["impl Debug for ProcessorTemperatureStruct"],["impl Debug for SetLpfSettingStruct"],["impl Debug for ProtocolMessage"],["impl Debug for PingProtocolHead"],["impl Debug for ResetDefaultsStruct"],["impl Debug for SetLpfSampleFrequencyStruct"],["impl Debug for PcbTemperatureStruct"],["impl Debug for SetStreamRateStruct"],["impl Debug for SetTemperatureMaxStruct"],["impl Debug for ContinuousStartStruct"],["impl Debug for ResetStruct"],["impl Debug for SetDeviceIdStruct"],["impl Debug for GeneralInfoStruct"],["impl Debug for DecoderResult"],["impl Debug for ProfileStruct"],["impl Debug for PingProtocolHead"],["impl Debug for ModeAutoStruct"],["impl Debug for RebootStruct"],["impl Debug for SetTemperatureTimeoutStruct"],["impl Debug for SetRangeStruct"],["impl Debug for SetCellVoltageMinimumStruct"],["impl Debug for PingIntervalStruct"],["impl Debug for CellTimeoutStruct"],["impl Debug for SetPingEnableStruct"],["impl Debug for Messages"],["impl Debug for DeviceIdStruct"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/fmt/trait.LowerHex.js b/trait.impl/core/fmt/trait.LowerHex.js index 38ee57234..fac4e81bf 100644 --- a/trait.impl/core/fmt/trait.LowerHex.js +++ b/trait.impl/core/fmt/trait.LowerHex.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"bytes":[["impl LowerHex for BytesMut"],["impl LowerHex for Bytes"]] +"bytes":[["impl LowerHex for BytesMut"],["impl LowerHex for Bytes"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/fmt/trait.UpperHex.js b/trait.impl/core/fmt/trait.UpperHex.js index 12f89429d..5b3f57217 100644 --- a/trait.impl/core/fmt/trait.UpperHex.js +++ b/trait.impl/core/fmt/trait.UpperHex.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"bytes":[["impl UpperHex for Bytes"],["impl UpperHex for BytesMut"]] +"bytes":[["impl UpperHex for Bytes"],["impl UpperHex for BytesMut"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/fmt/trait.Write.js b/trait.impl/core/fmt/trait.Write.js index 5a1524325..6f8488354 100644 --- a/trait.impl/core/fmt/trait.Write.js +++ b/trait.impl/core/fmt/trait.Write.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"bytes":[["impl Write for BytesMut"]] +"bytes":[["impl Write for BytesMut"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/hash/trait.Hash.js b/trait.impl/core/hash/trait.Hash.js index af5a6eef4..dce34f7da 100644 --- a/trait.impl/core/hash/trait.Hash.js +++ b/trait.impl/core/hash/trait.Hash.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"bytes":[["impl Hash for Bytes"],["impl Hash for BytesMut"]] +"bytes":[["impl Hash for BytesMut"],["impl Hash for Bytes"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/iter/traits/collect/trait.Extend.js b/trait.impl/core/iter/traits/collect/trait.Extend.js index 7cf9b6f4b..489bb825f 100644 --- a/trait.impl/core/iter/traits/collect/trait.Extend.js +++ b/trait.impl/core/iter/traits/collect/trait.Extend.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"bytes":[["impl Extend<u8> for BytesMut"],["impl Extend<Bytes> for BytesMut"],["impl<'a> Extend<&'a u8> for BytesMut"]] +"bytes":[["impl Extend<u8> for BytesMut"],["impl Extend<Bytes> for BytesMut"],["impl<'a> Extend<&'a u8> for BytesMut"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/iter/traits/collect/trait.FromIterator.js b/trait.impl/core/iter/traits/collect/trait.FromIterator.js index 2b6e7da0c..409ba552e 100644 --- a/trait.impl/core/iter/traits/collect/trait.FromIterator.js +++ b/trait.impl/core/iter/traits/collect/trait.FromIterator.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"bytes":[["impl FromIterator<u8> for Bytes"],["impl FromIterator<u8> for BytesMut"],["impl<'a> FromIterator<&'a u8> for BytesMut"]] +"bytes":[["impl FromIterator<u8> for BytesMut"],["impl FromIterator<u8> for Bytes"],["impl<'a> FromIterator<&'a u8> for BytesMut"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/iter/traits/collect/trait.IntoIterator.js b/trait.impl/core/iter/traits/collect/trait.IntoIterator.js index 6813ebce9..5ce6d0fd9 100644 --- a/trait.impl/core/iter/traits/collect/trait.IntoIterator.js +++ b/trait.impl/core/iter/traits/collect/trait.IntoIterator.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"bytes":[["impl IntoIterator for Bytes"],["impl IntoIterator for BytesMut"],["impl<T, U> IntoIterator for Chain<T, U>where\n T: Buf,\n U: Buf,"],["impl<'a> IntoIterator for &'a Bytes"],["impl<'a> IntoIterator for &'a BytesMut"]] +"bytes":[["impl<'a> IntoIterator for &'a Bytes"],["impl<'a> IntoIterator for &'a BytesMut"],["impl IntoIterator for BytesMut"],["impl<T, U> IntoIterator for Chain<T, U>
    where\n T: Buf,\n U: Buf,
    "],["impl IntoIterator for Bytes"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/iter/traits/exact_size/trait.ExactSizeIterator.js b/trait.impl/core/iter/traits/exact_size/trait.ExactSizeIterator.js index 9b73863f2..6541d81b0 100644 --- a/trait.impl/core/iter/traits/exact_size/trait.ExactSizeIterator.js +++ b/trait.impl/core/iter/traits/exact_size/trait.ExactSizeIterator.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"bytes":[["impl<T: Buf> ExactSizeIterator for IntoIter<T>"]] +"bytes":[["impl<T: Buf> ExactSizeIterator for IntoIter<T>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/iter/traits/iterator/trait.Iterator.js b/trait.impl/core/iter/traits/iterator/trait.Iterator.js index e8624b046..f1b7409f6 100644 --- a/trait.impl/core/iter/traits/iterator/trait.Iterator.js +++ b/trait.impl/core/iter/traits/iterator/trait.Iterator.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"bytes":[["impl<T: Buf> Iterator for IntoIter<T>"]] +"bytes":[["impl<T: Buf> Iterator for IntoIter<T>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Freeze.js b/trait.impl/core/marker/trait.Freeze.js index 13933a516..09c40d37c 100644 --- a/trait.impl/core/marker/trait.Freeze.js +++ b/trait.impl/core/marker/trait.Freeze.js @@ -1,4 +1,4 @@ (function() {var implementors = { -"bytes":[["impl<T, U> Freeze for Chain<T, U>where\n T: Freeze,\n U: Freeze,",1,["bytes::buf::chain::Chain"]],["impl<T> Freeze for IntoIter<T>where\n T: Freeze,",1,["bytes::buf::iter::IntoIter"]],["impl<T> Freeze for Limit<T>where\n T: Freeze,",1,["bytes::buf::limit::Limit"]],["impl<B> Freeze for Reader<B>where\n B: Freeze,",1,["bytes::buf::reader::Reader"]],["impl<T> Freeze for Take<T>where\n T: Freeze,",1,["bytes::buf::take::Take"]],["impl Freeze for UninitSlice",1,["bytes::buf::uninit_slice::UninitSlice"]],["impl<B> Freeze for Writer<B>where\n B: Freeze,",1,["bytes::buf::writer::Writer"]],["impl !Freeze for Bytes",1,["bytes::bytes::Bytes"]],["impl Freeze for BytesMut",1,["bytes::bytes_mut::BytesMut"]]], -"ping_rs":[["impl Freeze for PingProtocolHead",1,["ping_rs::bluebps::PingProtocolHead"]],["impl Freeze for Messages",1,["ping_rs::bluebps::Messages"]],["impl Freeze for CellVoltageMinStruct",1,["ping_rs::bluebps::CellVoltageMinStruct"]],["impl Freeze for SetTemperatureMaxStruct",1,["ping_rs::bluebps::SetTemperatureMaxStruct"]],["impl Freeze for TemperatureTimeoutStruct",1,["ping_rs::bluebps::TemperatureTimeoutStruct"]],["impl Freeze for RebootStruct",1,["ping_rs::bluebps::RebootStruct"]],["impl Freeze for ResetDefaultsStruct",1,["ping_rs::bluebps::ResetDefaultsStruct"]],["impl Freeze for SetCellVoltageTimeoutStruct",1,["ping_rs::bluebps::SetCellVoltageTimeoutStruct"]],["impl Freeze for StateStruct",1,["ping_rs::bluebps::StateStruct"]],["impl Freeze for CurrentTimeoutStruct",1,["ping_rs::bluebps::CurrentTimeoutStruct"]],["impl Freeze for SetLpfSettingStruct",1,["ping_rs::bluebps::SetLpfSettingStruct"]],["impl Freeze for SetStreamRateStruct",1,["ping_rs::bluebps::SetStreamRateStruct"]],["impl Freeze for SetCellVoltageMinimumStruct",1,["ping_rs::bluebps::SetCellVoltageMinimumStruct"]],["impl Freeze for SetLpfSampleFrequencyStruct",1,["ping_rs::bluebps::SetLpfSampleFrequencyStruct"]],["impl Freeze for SetCurrentTimeoutStruct",1,["ping_rs::bluebps::SetCurrentTimeoutStruct"]],["impl Freeze for CellTimeoutStruct",1,["ping_rs::bluebps::CellTimeoutStruct"]],["impl Freeze for EraseFlashStruct",1,["ping_rs::bluebps::EraseFlashStruct"]],["impl Freeze for SetTemperatureTimeoutStruct",1,["ping_rs::bluebps::SetTemperatureTimeoutStruct"]],["impl Freeze for CurrentMaxStruct",1,["ping_rs::bluebps::CurrentMaxStruct"]],["impl Freeze for TemperatureMaxStruct",1,["ping_rs::bluebps::TemperatureMaxStruct"]],["impl Freeze for EventsStruct",1,["ping_rs::bluebps::EventsStruct"]],["impl Freeze for SetCurrentMaxStruct",1,["ping_rs::bluebps::SetCurrentMaxStruct"]],["impl Freeze for PingProtocolHead",1,["ping_rs::ping360::PingProtocolHead"]],["impl Freeze for Messages",1,["ping_rs::ping360::Messages"]],["impl Freeze for DeviceDataStruct",1,["ping_rs::ping360::DeviceDataStruct"]],["impl Freeze for TransducerStruct",1,["ping_rs::ping360::TransducerStruct"]],["impl Freeze for AutoTransmitStruct",1,["ping_rs::ping360::AutoTransmitStruct"]],["impl Freeze for ResetStruct",1,["ping_rs::ping360::ResetStruct"]],["impl Freeze for MotorOffStruct",1,["ping_rs::ping360::MotorOffStruct"]],["impl Freeze for AutoDeviceDataStruct",1,["ping_rs::ping360::AutoDeviceDataStruct"]],["impl Freeze for DeviceIdStruct",1,["ping_rs::ping360::DeviceIdStruct"]],["impl Freeze for PingProtocolHead",1,["ping_rs::common::PingProtocolHead"]],["impl Freeze for Messages",1,["ping_rs::common::Messages"]],["impl Freeze for NackStruct",1,["ping_rs::common::NackStruct"]],["impl Freeze for AsciiTextStruct",1,["ping_rs::common::AsciiTextStruct"]],["impl Freeze for ProtocolVersionStruct",1,["ping_rs::common::ProtocolVersionStruct"]],["impl Freeze for GeneralRequestStruct",1,["ping_rs::common::GeneralRequestStruct"]],["impl Freeze for SetDeviceIdStruct",1,["ping_rs::common::SetDeviceIdStruct"]],["impl Freeze for AckStruct",1,["ping_rs::common::AckStruct"]],["impl Freeze for DeviceInformationStruct",1,["ping_rs::common::DeviceInformationStruct"]],["impl Freeze for PingProtocolHead",1,["ping_rs::ping1d::PingProtocolHead"]],["impl Freeze for Messages",1,["ping_rs::ping1d::Messages"]],["impl Freeze for SetGainSettingStruct",1,["ping_rs::ping1d::SetGainSettingStruct"]],["impl Freeze for ContinuousStartStruct",1,["ping_rs::ping1d::ContinuousStartStruct"]],["impl Freeze for ProcessorTemperatureStruct",1,["ping_rs::ping1d::ProcessorTemperatureStruct"]],["impl Freeze for FirmwareVersionStruct",1,["ping_rs::ping1d::FirmwareVersionStruct"]],["impl Freeze for PingEnableStruct",1,["ping_rs::ping1d::PingEnableStruct"]],["impl Freeze for SetPingEnableStruct",1,["ping_rs::ping1d::SetPingEnableStruct"]],["impl Freeze for DistanceSimpleStruct",1,["ping_rs::ping1d::DistanceSimpleStruct"]],["impl Freeze for GeneralInfoStruct",1,["ping_rs::ping1d::GeneralInfoStruct"]],["impl Freeze for SetSpeedOfSoundStruct",1,["ping_rs::ping1d::SetSpeedOfSoundStruct"]],["impl Freeze for PcbTemperatureStruct",1,["ping_rs::ping1d::PcbTemperatureStruct"]],["impl Freeze for GotoBootloaderStruct",1,["ping_rs::ping1d::GotoBootloaderStruct"]],["impl Freeze for ModeAutoStruct",1,["ping_rs::ping1d::ModeAutoStruct"]],["impl Freeze for SetDeviceIdStruct",1,["ping_rs::ping1d::SetDeviceIdStruct"]],["impl Freeze for ContinuousStopStruct",1,["ping_rs::ping1d::ContinuousStopStruct"]],["impl Freeze for DeviceIdStruct",1,["ping_rs::ping1d::DeviceIdStruct"]],["impl Freeze for SetRangeStruct",1,["ping_rs::ping1d::SetRangeStruct"]],["impl Freeze for Voltage5Struct",1,["ping_rs::ping1d::Voltage5Struct"]],["impl Freeze for ProfileStruct",1,["ping_rs::ping1d::ProfileStruct"]],["impl Freeze for GainSettingStruct",1,["ping_rs::ping1d::GainSettingStruct"]],["impl Freeze for RangeStruct",1,["ping_rs::ping1d::RangeStruct"]],["impl Freeze for DistanceStruct",1,["ping_rs::ping1d::DistanceStruct"]],["impl Freeze for SpeedOfSoundStruct",1,["ping_rs::ping1d::SpeedOfSoundStruct"]],["impl Freeze for SetModeAutoStruct",1,["ping_rs::ping1d::SetModeAutoStruct"]],["impl Freeze for TransmitDurationStruct",1,["ping_rs::ping1d::TransmitDurationStruct"]],["impl Freeze for PingIntervalStruct",1,["ping_rs::ping1d::PingIntervalStruct"]],["impl Freeze for SetPingIntervalStruct",1,["ping_rs::ping1d::SetPingIntervalStruct"]],["impl Freeze for ParseError",1,["ping_rs::decoder::ParseError"]],["impl Freeze for DecoderResult",1,["ping_rs::decoder::DecoderResult"]],["impl Freeze for DecoderState",1,["ping_rs::decoder::DecoderState"]],["impl Freeze for Decoder",1,["ping_rs::decoder::Decoder"]],["impl Freeze for ProtocolMessage",1,["ping_rs::message::ProtocolMessage"]],["impl Freeze for Messages",1,["ping_rs::Messages"]]] +"bytes":[["impl<T, U> Freeze for Chain<T, U>
    where\n T: Freeze,\n U: Freeze,
    ",1,["bytes::buf::chain::Chain"]],["impl<T> Freeze for IntoIter<T>
    where\n T: Freeze,
    ",1,["bytes::buf::iter::IntoIter"]],["impl<T> Freeze for Limit<T>
    where\n T: Freeze,
    ",1,["bytes::buf::limit::Limit"]],["impl<B> Freeze for Reader<B>
    where\n B: Freeze,
    ",1,["bytes::buf::reader::Reader"]],["impl<T> Freeze for Take<T>
    where\n T: Freeze,
    ",1,["bytes::buf::take::Take"]],["impl Freeze for UninitSlice",1,["bytes::buf::uninit_slice::UninitSlice"]],["impl<B> Freeze for Writer<B>
    where\n B: Freeze,
    ",1,["bytes::buf::writer::Writer"]],["impl !Freeze for Bytes",1,["bytes::bytes::Bytes"]],["impl Freeze for BytesMut",1,["bytes::bytes_mut::BytesMut"]]], +"ping_rs":[["impl Freeze for PingProtocolHead",1,["ping_rs::ping360::PingProtocolHead"]],["impl Freeze for Messages",1,["ping_rs::ping360::Messages"]],["impl Freeze for AutoTransmitStruct",1,["ping_rs::ping360::AutoTransmitStruct"]],["impl Freeze for DeviceDataStruct",1,["ping_rs::ping360::DeviceDataStruct"]],["impl Freeze for ResetStruct",1,["ping_rs::ping360::ResetStruct"]],["impl Freeze for AutoDeviceDataStruct",1,["ping_rs::ping360::AutoDeviceDataStruct"]],["impl Freeze for TransducerStruct",1,["ping_rs::ping360::TransducerStruct"]],["impl Freeze for MotorOffStruct",1,["ping_rs::ping360::MotorOffStruct"]],["impl Freeze for DeviceIdStruct",1,["ping_rs::ping360::DeviceIdStruct"]],["impl Freeze for PingProtocolHead",1,["ping_rs::ping1d::PingProtocolHead"]],["impl Freeze for Messages",1,["ping_rs::ping1d::Messages"]],["impl Freeze for SetPingEnableStruct",1,["ping_rs::ping1d::SetPingEnableStruct"]],["impl Freeze for PcbTemperatureStruct",1,["ping_rs::ping1d::PcbTemperatureStruct"]],["impl Freeze for SpeedOfSoundStruct",1,["ping_rs::ping1d::SpeedOfSoundStruct"]],["impl Freeze for DistanceStruct",1,["ping_rs::ping1d::DistanceStruct"]],["impl Freeze for ProcessorTemperatureStruct",1,["ping_rs::ping1d::ProcessorTemperatureStruct"]],["impl Freeze for RangeStruct",1,["ping_rs::ping1d::RangeStruct"]],["impl Freeze for ContinuousStopStruct",1,["ping_rs::ping1d::ContinuousStopStruct"]],["impl Freeze for PingIntervalStruct",1,["ping_rs::ping1d::PingIntervalStruct"]],["impl Freeze for ContinuousStartStruct",1,["ping_rs::ping1d::ContinuousStartStruct"]],["impl Freeze for SetDeviceIdStruct",1,["ping_rs::ping1d::SetDeviceIdStruct"]],["impl Freeze for GotoBootloaderStruct",1,["ping_rs::ping1d::GotoBootloaderStruct"]],["impl Freeze for SetPingIntervalStruct",1,["ping_rs::ping1d::SetPingIntervalStruct"]],["impl Freeze for DeviceIdStruct",1,["ping_rs::ping1d::DeviceIdStruct"]],["impl Freeze for ProfileStruct",1,["ping_rs::ping1d::ProfileStruct"]],["impl Freeze for FirmwareVersionStruct",1,["ping_rs::ping1d::FirmwareVersionStruct"]],["impl Freeze for TransmitDurationStruct",1,["ping_rs::ping1d::TransmitDurationStruct"]],["impl Freeze for SetRangeStruct",1,["ping_rs::ping1d::SetRangeStruct"]],["impl Freeze for SetModeAutoStruct",1,["ping_rs::ping1d::SetModeAutoStruct"]],["impl Freeze for Voltage5Struct",1,["ping_rs::ping1d::Voltage5Struct"]],["impl Freeze for ModeAutoStruct",1,["ping_rs::ping1d::ModeAutoStruct"]],["impl Freeze for SetSpeedOfSoundStruct",1,["ping_rs::ping1d::SetSpeedOfSoundStruct"]],["impl Freeze for GainSettingStruct",1,["ping_rs::ping1d::GainSettingStruct"]],["impl Freeze for PingEnableStruct",1,["ping_rs::ping1d::PingEnableStruct"]],["impl Freeze for DistanceSimpleStruct",1,["ping_rs::ping1d::DistanceSimpleStruct"]],["impl Freeze for SetGainSettingStruct",1,["ping_rs::ping1d::SetGainSettingStruct"]],["impl Freeze for GeneralInfoStruct",1,["ping_rs::ping1d::GeneralInfoStruct"]],["impl Freeze for PingProtocolHead",1,["ping_rs::common::PingProtocolHead"]],["impl Freeze for Messages",1,["ping_rs::common::Messages"]],["impl Freeze for NackStruct",1,["ping_rs::common::NackStruct"]],["impl Freeze for AsciiTextStruct",1,["ping_rs::common::AsciiTextStruct"]],["impl Freeze for DeviceInformationStruct",1,["ping_rs::common::DeviceInformationStruct"]],["impl Freeze for ProtocolVersionStruct",1,["ping_rs::common::ProtocolVersionStruct"]],["impl Freeze for AckStruct",1,["ping_rs::common::AckStruct"]],["impl Freeze for GeneralRequestStruct",1,["ping_rs::common::GeneralRequestStruct"]],["impl Freeze for SetDeviceIdStruct",1,["ping_rs::common::SetDeviceIdStruct"]],["impl Freeze for PingProtocolHead",1,["ping_rs::bluebps::PingProtocolHead"]],["impl Freeze for Messages",1,["ping_rs::bluebps::Messages"]],["impl Freeze for SetTemperatureMaxStruct",1,["ping_rs::bluebps::SetTemperatureMaxStruct"]],["impl Freeze for SetCellVoltageTimeoutStruct",1,["ping_rs::bluebps::SetCellVoltageTimeoutStruct"]],["impl Freeze for CellTimeoutStruct",1,["ping_rs::bluebps::CellTimeoutStruct"]],["impl Freeze for RebootStruct",1,["ping_rs::bluebps::RebootStruct"]],["impl Freeze for TemperatureMaxStruct",1,["ping_rs::bluebps::TemperatureMaxStruct"]],["impl Freeze for SetTemperatureTimeoutStruct",1,["ping_rs::bluebps::SetTemperatureTimeoutStruct"]],["impl Freeze for SetCurrentTimeoutStruct",1,["ping_rs::bluebps::SetCurrentTimeoutStruct"]],["impl Freeze for EraseFlashStruct",1,["ping_rs::bluebps::EraseFlashStruct"]],["impl Freeze for SetCurrentMaxStruct",1,["ping_rs::bluebps::SetCurrentMaxStruct"]],["impl Freeze for TemperatureTimeoutStruct",1,["ping_rs::bluebps::TemperatureTimeoutStruct"]],["impl Freeze for SetStreamRateStruct",1,["ping_rs::bluebps::SetStreamRateStruct"]],["impl Freeze for SetCellVoltageMinimumStruct",1,["ping_rs::bluebps::SetCellVoltageMinimumStruct"]],["impl Freeze for SetLpfSettingStruct",1,["ping_rs::bluebps::SetLpfSettingStruct"]],["impl Freeze for CellVoltageMinStruct",1,["ping_rs::bluebps::CellVoltageMinStruct"]],["impl Freeze for StateStruct",1,["ping_rs::bluebps::StateStruct"]],["impl Freeze for CurrentTimeoutStruct",1,["ping_rs::bluebps::CurrentTimeoutStruct"]],["impl Freeze for ResetDefaultsStruct",1,["ping_rs::bluebps::ResetDefaultsStruct"]],["impl Freeze for SetLpfSampleFrequencyStruct",1,["ping_rs::bluebps::SetLpfSampleFrequencyStruct"]],["impl Freeze for EventsStruct",1,["ping_rs::bluebps::EventsStruct"]],["impl Freeze for CurrentMaxStruct",1,["ping_rs::bluebps::CurrentMaxStruct"]],["impl Freeze for ParseError",1,["ping_rs::decoder::ParseError"]],["impl Freeze for DecoderResult",1,["ping_rs::decoder::DecoderResult"]],["impl Freeze for DecoderState",1,["ping_rs::decoder::DecoderState"]],["impl Freeze for Decoder",1,["ping_rs::decoder::Decoder"]],["impl Freeze for ProtocolMessage",1,["ping_rs::message::ProtocolMessage"]],["impl Freeze for Messages",1,["ping_rs::Messages"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Send.js b/trait.impl/core/marker/trait.Send.js index f93b0df6d..9ec4916af 100644 --- a/trait.impl/core/marker/trait.Send.js +++ b/trait.impl/core/marker/trait.Send.js @@ -1,4 +1,4 @@ (function() {var implementors = { -"bytes":[["impl<T, U> Send for Chain<T, U>where\n T: Send,\n U: Send,",1,["bytes::buf::chain::Chain"]],["impl<T> Send for IntoIter<T>where\n T: Send,",1,["bytes::buf::iter::IntoIter"]],["impl<T> Send for Limit<T>where\n T: Send,",1,["bytes::buf::limit::Limit"]],["impl<B> Send for Reader<B>where\n B: Send,",1,["bytes::buf::reader::Reader"]],["impl<T> Send for Take<T>where\n T: Send,",1,["bytes::buf::take::Take"]],["impl Send for UninitSlice",1,["bytes::buf::uninit_slice::UninitSlice"]],["impl<B> Send for Writer<B>where\n B: Send,",1,["bytes::buf::writer::Writer"]],["impl Send for BytesMut"],["impl Send for Bytes"]], -"ping_rs":[["impl Send for PingProtocolHead",1,["ping_rs::bluebps::PingProtocolHead"]],["impl Send for Messages",1,["ping_rs::bluebps::Messages"]],["impl Send for CellVoltageMinStruct",1,["ping_rs::bluebps::CellVoltageMinStruct"]],["impl Send for SetTemperatureMaxStruct",1,["ping_rs::bluebps::SetTemperatureMaxStruct"]],["impl Send for TemperatureTimeoutStruct",1,["ping_rs::bluebps::TemperatureTimeoutStruct"]],["impl Send for RebootStruct",1,["ping_rs::bluebps::RebootStruct"]],["impl Send for ResetDefaultsStruct",1,["ping_rs::bluebps::ResetDefaultsStruct"]],["impl Send for SetCellVoltageTimeoutStruct",1,["ping_rs::bluebps::SetCellVoltageTimeoutStruct"]],["impl Send for StateStruct",1,["ping_rs::bluebps::StateStruct"]],["impl Send for CurrentTimeoutStruct",1,["ping_rs::bluebps::CurrentTimeoutStruct"]],["impl Send for SetLpfSettingStruct",1,["ping_rs::bluebps::SetLpfSettingStruct"]],["impl Send for SetStreamRateStruct",1,["ping_rs::bluebps::SetStreamRateStruct"]],["impl Send for SetCellVoltageMinimumStruct",1,["ping_rs::bluebps::SetCellVoltageMinimumStruct"]],["impl Send for SetLpfSampleFrequencyStruct",1,["ping_rs::bluebps::SetLpfSampleFrequencyStruct"]],["impl Send for SetCurrentTimeoutStruct",1,["ping_rs::bluebps::SetCurrentTimeoutStruct"]],["impl Send for CellTimeoutStruct",1,["ping_rs::bluebps::CellTimeoutStruct"]],["impl Send for EraseFlashStruct",1,["ping_rs::bluebps::EraseFlashStruct"]],["impl Send for SetTemperatureTimeoutStruct",1,["ping_rs::bluebps::SetTemperatureTimeoutStruct"]],["impl Send for CurrentMaxStruct",1,["ping_rs::bluebps::CurrentMaxStruct"]],["impl Send for TemperatureMaxStruct",1,["ping_rs::bluebps::TemperatureMaxStruct"]],["impl Send for EventsStruct",1,["ping_rs::bluebps::EventsStruct"]],["impl Send for SetCurrentMaxStruct",1,["ping_rs::bluebps::SetCurrentMaxStruct"]],["impl Send for PingProtocolHead",1,["ping_rs::ping360::PingProtocolHead"]],["impl Send for Messages",1,["ping_rs::ping360::Messages"]],["impl Send for DeviceDataStruct",1,["ping_rs::ping360::DeviceDataStruct"]],["impl Send for TransducerStruct",1,["ping_rs::ping360::TransducerStruct"]],["impl Send for AutoTransmitStruct",1,["ping_rs::ping360::AutoTransmitStruct"]],["impl Send for ResetStruct",1,["ping_rs::ping360::ResetStruct"]],["impl Send for MotorOffStruct",1,["ping_rs::ping360::MotorOffStruct"]],["impl Send for AutoDeviceDataStruct",1,["ping_rs::ping360::AutoDeviceDataStruct"]],["impl Send for DeviceIdStruct",1,["ping_rs::ping360::DeviceIdStruct"]],["impl Send for PingProtocolHead",1,["ping_rs::common::PingProtocolHead"]],["impl Send for Messages",1,["ping_rs::common::Messages"]],["impl Send for NackStruct",1,["ping_rs::common::NackStruct"]],["impl Send for AsciiTextStruct",1,["ping_rs::common::AsciiTextStruct"]],["impl Send for ProtocolVersionStruct",1,["ping_rs::common::ProtocolVersionStruct"]],["impl Send for GeneralRequestStruct",1,["ping_rs::common::GeneralRequestStruct"]],["impl Send for SetDeviceIdStruct",1,["ping_rs::common::SetDeviceIdStruct"]],["impl Send for AckStruct",1,["ping_rs::common::AckStruct"]],["impl Send for DeviceInformationStruct",1,["ping_rs::common::DeviceInformationStruct"]],["impl Send for PingProtocolHead",1,["ping_rs::ping1d::PingProtocolHead"]],["impl Send for Messages",1,["ping_rs::ping1d::Messages"]],["impl Send for SetGainSettingStruct",1,["ping_rs::ping1d::SetGainSettingStruct"]],["impl Send for ContinuousStartStruct",1,["ping_rs::ping1d::ContinuousStartStruct"]],["impl Send for ProcessorTemperatureStruct",1,["ping_rs::ping1d::ProcessorTemperatureStruct"]],["impl Send for FirmwareVersionStruct",1,["ping_rs::ping1d::FirmwareVersionStruct"]],["impl Send for PingEnableStruct",1,["ping_rs::ping1d::PingEnableStruct"]],["impl Send for SetPingEnableStruct",1,["ping_rs::ping1d::SetPingEnableStruct"]],["impl Send for DistanceSimpleStruct",1,["ping_rs::ping1d::DistanceSimpleStruct"]],["impl Send for GeneralInfoStruct",1,["ping_rs::ping1d::GeneralInfoStruct"]],["impl Send for SetSpeedOfSoundStruct",1,["ping_rs::ping1d::SetSpeedOfSoundStruct"]],["impl Send for PcbTemperatureStruct",1,["ping_rs::ping1d::PcbTemperatureStruct"]],["impl Send for GotoBootloaderStruct",1,["ping_rs::ping1d::GotoBootloaderStruct"]],["impl Send for ModeAutoStruct",1,["ping_rs::ping1d::ModeAutoStruct"]],["impl Send for SetDeviceIdStruct",1,["ping_rs::ping1d::SetDeviceIdStruct"]],["impl Send for ContinuousStopStruct",1,["ping_rs::ping1d::ContinuousStopStruct"]],["impl Send for DeviceIdStruct",1,["ping_rs::ping1d::DeviceIdStruct"]],["impl Send for SetRangeStruct",1,["ping_rs::ping1d::SetRangeStruct"]],["impl Send for Voltage5Struct",1,["ping_rs::ping1d::Voltage5Struct"]],["impl Send for ProfileStruct",1,["ping_rs::ping1d::ProfileStruct"]],["impl Send for GainSettingStruct",1,["ping_rs::ping1d::GainSettingStruct"]],["impl Send for RangeStruct",1,["ping_rs::ping1d::RangeStruct"]],["impl Send for DistanceStruct",1,["ping_rs::ping1d::DistanceStruct"]],["impl Send for SpeedOfSoundStruct",1,["ping_rs::ping1d::SpeedOfSoundStruct"]],["impl Send for SetModeAutoStruct",1,["ping_rs::ping1d::SetModeAutoStruct"]],["impl Send for TransmitDurationStruct",1,["ping_rs::ping1d::TransmitDurationStruct"]],["impl Send for PingIntervalStruct",1,["ping_rs::ping1d::PingIntervalStruct"]],["impl Send for SetPingIntervalStruct",1,["ping_rs::ping1d::SetPingIntervalStruct"]],["impl Send for ParseError",1,["ping_rs::decoder::ParseError"]],["impl Send for DecoderResult",1,["ping_rs::decoder::DecoderResult"]],["impl Send for DecoderState",1,["ping_rs::decoder::DecoderState"]],["impl Send for Decoder",1,["ping_rs::decoder::Decoder"]],["impl Send for ProtocolMessage",1,["ping_rs::message::ProtocolMessage"]],["impl Send for Messages",1,["ping_rs::Messages"]]] +"bytes":[["impl<T, U> Send for Chain<T, U>
    where\n T: Send,\n U: Send,
    ",1,["bytes::buf::chain::Chain"]],["impl<T> Send for IntoIter<T>
    where\n T: Send,
    ",1,["bytes::buf::iter::IntoIter"]],["impl<T> Send for Limit<T>
    where\n T: Send,
    ",1,["bytes::buf::limit::Limit"]],["impl<B> Send for Reader<B>
    where\n B: Send,
    ",1,["bytes::buf::reader::Reader"]],["impl<T> Send for Take<T>
    where\n T: Send,
    ",1,["bytes::buf::take::Take"]],["impl Send for UninitSlice",1,["bytes::buf::uninit_slice::UninitSlice"]],["impl<B> Send for Writer<B>
    where\n B: Send,
    ",1,["bytes::buf::writer::Writer"]],["impl Send for Bytes"],["impl Send for BytesMut"]], +"ping_rs":[["impl Send for PingProtocolHead",1,["ping_rs::ping360::PingProtocolHead"]],["impl Send for Messages",1,["ping_rs::ping360::Messages"]],["impl Send for AutoTransmitStruct",1,["ping_rs::ping360::AutoTransmitStruct"]],["impl Send for DeviceDataStruct",1,["ping_rs::ping360::DeviceDataStruct"]],["impl Send for ResetStruct",1,["ping_rs::ping360::ResetStruct"]],["impl Send for AutoDeviceDataStruct",1,["ping_rs::ping360::AutoDeviceDataStruct"]],["impl Send for TransducerStruct",1,["ping_rs::ping360::TransducerStruct"]],["impl Send for MotorOffStruct",1,["ping_rs::ping360::MotorOffStruct"]],["impl Send for DeviceIdStruct",1,["ping_rs::ping360::DeviceIdStruct"]],["impl Send for PingProtocolHead",1,["ping_rs::ping1d::PingProtocolHead"]],["impl Send for Messages",1,["ping_rs::ping1d::Messages"]],["impl Send for SetPingEnableStruct",1,["ping_rs::ping1d::SetPingEnableStruct"]],["impl Send for PcbTemperatureStruct",1,["ping_rs::ping1d::PcbTemperatureStruct"]],["impl Send for SpeedOfSoundStruct",1,["ping_rs::ping1d::SpeedOfSoundStruct"]],["impl Send for DistanceStruct",1,["ping_rs::ping1d::DistanceStruct"]],["impl Send for ProcessorTemperatureStruct",1,["ping_rs::ping1d::ProcessorTemperatureStruct"]],["impl Send for RangeStruct",1,["ping_rs::ping1d::RangeStruct"]],["impl Send for ContinuousStopStruct",1,["ping_rs::ping1d::ContinuousStopStruct"]],["impl Send for PingIntervalStruct",1,["ping_rs::ping1d::PingIntervalStruct"]],["impl Send for ContinuousStartStruct",1,["ping_rs::ping1d::ContinuousStartStruct"]],["impl Send for SetDeviceIdStruct",1,["ping_rs::ping1d::SetDeviceIdStruct"]],["impl Send for GotoBootloaderStruct",1,["ping_rs::ping1d::GotoBootloaderStruct"]],["impl Send for SetPingIntervalStruct",1,["ping_rs::ping1d::SetPingIntervalStruct"]],["impl Send for DeviceIdStruct",1,["ping_rs::ping1d::DeviceIdStruct"]],["impl Send for ProfileStruct",1,["ping_rs::ping1d::ProfileStruct"]],["impl Send for FirmwareVersionStruct",1,["ping_rs::ping1d::FirmwareVersionStruct"]],["impl Send for TransmitDurationStruct",1,["ping_rs::ping1d::TransmitDurationStruct"]],["impl Send for SetRangeStruct",1,["ping_rs::ping1d::SetRangeStruct"]],["impl Send for SetModeAutoStruct",1,["ping_rs::ping1d::SetModeAutoStruct"]],["impl Send for Voltage5Struct",1,["ping_rs::ping1d::Voltage5Struct"]],["impl Send for ModeAutoStruct",1,["ping_rs::ping1d::ModeAutoStruct"]],["impl Send for SetSpeedOfSoundStruct",1,["ping_rs::ping1d::SetSpeedOfSoundStruct"]],["impl Send for GainSettingStruct",1,["ping_rs::ping1d::GainSettingStruct"]],["impl Send for PingEnableStruct",1,["ping_rs::ping1d::PingEnableStruct"]],["impl Send for DistanceSimpleStruct",1,["ping_rs::ping1d::DistanceSimpleStruct"]],["impl Send for SetGainSettingStruct",1,["ping_rs::ping1d::SetGainSettingStruct"]],["impl Send for GeneralInfoStruct",1,["ping_rs::ping1d::GeneralInfoStruct"]],["impl Send for PingProtocolHead",1,["ping_rs::common::PingProtocolHead"]],["impl Send for Messages",1,["ping_rs::common::Messages"]],["impl Send for NackStruct",1,["ping_rs::common::NackStruct"]],["impl Send for AsciiTextStruct",1,["ping_rs::common::AsciiTextStruct"]],["impl Send for DeviceInformationStruct",1,["ping_rs::common::DeviceInformationStruct"]],["impl Send for ProtocolVersionStruct",1,["ping_rs::common::ProtocolVersionStruct"]],["impl Send for AckStruct",1,["ping_rs::common::AckStruct"]],["impl Send for GeneralRequestStruct",1,["ping_rs::common::GeneralRequestStruct"]],["impl Send for SetDeviceIdStruct",1,["ping_rs::common::SetDeviceIdStruct"]],["impl Send for PingProtocolHead",1,["ping_rs::bluebps::PingProtocolHead"]],["impl Send for Messages",1,["ping_rs::bluebps::Messages"]],["impl Send for SetTemperatureMaxStruct",1,["ping_rs::bluebps::SetTemperatureMaxStruct"]],["impl Send for SetCellVoltageTimeoutStruct",1,["ping_rs::bluebps::SetCellVoltageTimeoutStruct"]],["impl Send for CellTimeoutStruct",1,["ping_rs::bluebps::CellTimeoutStruct"]],["impl Send for RebootStruct",1,["ping_rs::bluebps::RebootStruct"]],["impl Send for TemperatureMaxStruct",1,["ping_rs::bluebps::TemperatureMaxStruct"]],["impl Send for SetTemperatureTimeoutStruct",1,["ping_rs::bluebps::SetTemperatureTimeoutStruct"]],["impl Send for SetCurrentTimeoutStruct",1,["ping_rs::bluebps::SetCurrentTimeoutStruct"]],["impl Send for EraseFlashStruct",1,["ping_rs::bluebps::EraseFlashStruct"]],["impl Send for SetCurrentMaxStruct",1,["ping_rs::bluebps::SetCurrentMaxStruct"]],["impl Send for TemperatureTimeoutStruct",1,["ping_rs::bluebps::TemperatureTimeoutStruct"]],["impl Send for SetStreamRateStruct",1,["ping_rs::bluebps::SetStreamRateStruct"]],["impl Send for SetCellVoltageMinimumStruct",1,["ping_rs::bluebps::SetCellVoltageMinimumStruct"]],["impl Send for SetLpfSettingStruct",1,["ping_rs::bluebps::SetLpfSettingStruct"]],["impl Send for CellVoltageMinStruct",1,["ping_rs::bluebps::CellVoltageMinStruct"]],["impl Send for StateStruct",1,["ping_rs::bluebps::StateStruct"]],["impl Send for CurrentTimeoutStruct",1,["ping_rs::bluebps::CurrentTimeoutStruct"]],["impl Send for ResetDefaultsStruct",1,["ping_rs::bluebps::ResetDefaultsStruct"]],["impl Send for SetLpfSampleFrequencyStruct",1,["ping_rs::bluebps::SetLpfSampleFrequencyStruct"]],["impl Send for EventsStruct",1,["ping_rs::bluebps::EventsStruct"]],["impl Send for CurrentMaxStruct",1,["ping_rs::bluebps::CurrentMaxStruct"]],["impl Send for ParseError",1,["ping_rs::decoder::ParseError"]],["impl Send for DecoderResult",1,["ping_rs::decoder::DecoderResult"]],["impl Send for DecoderState",1,["ping_rs::decoder::DecoderState"]],["impl Send for Decoder",1,["ping_rs::decoder::Decoder"]],["impl Send for ProtocolMessage",1,["ping_rs::message::ProtocolMessage"]],["impl Send for Messages",1,["ping_rs::Messages"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Sized.js b/trait.impl/core/marker/trait.Sized.js index 540b6db90..d3c101068 100644 --- a/trait.impl/core/marker/trait.Sized.js +++ b/trait.impl/core/marker/trait.Sized.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"bytes":[["impl !Sized for UninitSlice",1,["bytes::buf::uninit_slice::UninitSlice"]]] +"bytes":[["impl !Sized for UninitSlice",1,["bytes::buf::uninit_slice::UninitSlice"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.StructuralPartialEq.js b/trait.impl/core/marker/trait.StructuralPartialEq.js index 1b08dff12..7693f7080 100644 --- a/trait.impl/core/marker/trait.StructuralPartialEq.js +++ b/trait.impl/core/marker/trait.StructuralPartialEq.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"ping_rs":[["impl StructuralPartialEq for AutoTransmitStruct"],["impl StructuralPartialEq for TransmitDurationStruct"],["impl StructuralPartialEq for TemperatureMaxStruct"],["impl StructuralPartialEq for DeviceIdStruct"],["impl StructuralPartialEq for SetPingIntervalStruct"],["impl StructuralPartialEq for ContinuousStopStruct"],["impl StructuralPartialEq for DeviceInformationStruct"],["impl StructuralPartialEq for SetCurrentTimeoutStruct"],["impl StructuralPartialEq for SetTemperatureMaxStruct"],["impl StructuralPartialEq for SetDeviceIdStruct"],["impl StructuralPartialEq for Messages"],["impl StructuralPartialEq for SetCellVoltageMinimumStruct"],["impl StructuralPartialEq for RebootStruct"],["impl StructuralPartialEq for SetLpfSettingStruct"],["impl StructuralPartialEq for PingProtocolHead"],["impl StructuralPartialEq for DeviceIdStruct"],["impl StructuralPartialEq for EraseFlashStruct"],["impl StructuralPartialEq for AckStruct"],["impl StructuralPartialEq for AutoDeviceDataStruct"],["impl StructuralPartialEq for Messages"],["impl StructuralPartialEq for CellTimeoutStruct"],["impl StructuralPartialEq for PcbTemperatureStruct"],["impl StructuralPartialEq for CurrentMaxStruct"],["impl StructuralPartialEq for ContinuousStartStruct"],["impl StructuralPartialEq for PingIntervalStruct"],["impl StructuralPartialEq for PingEnableStruct"],["impl StructuralPartialEq for NackStruct"],["impl StructuralPartialEq for ProtocolVersionStruct"],["impl StructuralPartialEq for DistanceSimpleStruct"],["impl StructuralPartialEq for EventsStruct"],["impl StructuralPartialEq for TransducerStruct"],["impl StructuralPartialEq for SpeedOfSoundStruct"],["impl StructuralPartialEq for PingProtocolHead"],["impl StructuralPartialEq for ProcessorTemperatureStruct"],["impl StructuralPartialEq for CurrentTimeoutStruct"],["impl StructuralPartialEq for TemperatureTimeoutStruct"],["impl StructuralPartialEq for FirmwareVersionStruct"],["impl StructuralPartialEq for ModeAutoStruct"],["impl StructuralPartialEq for AsciiTextStruct"],["impl StructuralPartialEq for GainSettingStruct"],["impl StructuralPartialEq for CellVoltageMinStruct"],["impl StructuralPartialEq for StateStruct"],["impl StructuralPartialEq for SetPingEnableStruct"],["impl StructuralPartialEq for SetStreamRateStruct"],["impl StructuralPartialEq for PingProtocolHead"],["impl StructuralPartialEq for SetCellVoltageTimeoutStruct"],["impl StructuralPartialEq for SetSpeedOfSoundStruct"],["impl StructuralPartialEq for SetLpfSampleFrequencyStruct"],["impl StructuralPartialEq for SetGainSettingStruct"],["impl StructuralPartialEq for Voltage5Struct"],["impl StructuralPartialEq for SetTemperatureTimeoutStruct"],["impl StructuralPartialEq for Messages"],["impl StructuralPartialEq for MotorOffStruct"],["impl StructuralPartialEq for Messages"],["impl StructuralPartialEq for RangeStruct"],["impl StructuralPartialEq for SetCurrentMaxStruct"],["impl StructuralPartialEq for ProfileStruct"],["impl StructuralPartialEq for GeneralInfoStruct"],["impl StructuralPartialEq for GeneralRequestStruct"],["impl StructuralPartialEq for ResetDefaultsStruct"],["impl StructuralPartialEq for GotoBootloaderStruct"],["impl StructuralPartialEq for PingProtocolHead"],["impl StructuralPartialEq for SetDeviceIdStruct"],["impl StructuralPartialEq for DistanceStruct"],["impl StructuralPartialEq for ResetStruct"],["impl StructuralPartialEq for SetRangeStruct"],["impl StructuralPartialEq for DeviceDataStruct"],["impl StructuralPartialEq for SetModeAutoStruct"]] +"ping_rs":[["impl StructuralPartialEq for TransmitDurationStruct"],["impl StructuralPartialEq for ProfileStruct"],["impl StructuralPartialEq for CellVoltageMinStruct"],["impl StructuralPartialEq for DistanceSimpleStruct"],["impl StructuralPartialEq for AckStruct"],["impl StructuralPartialEq for SetStreamRateStruct"],["impl StructuralPartialEq for SpeedOfSoundStruct"],["impl StructuralPartialEq for SetDeviceIdStruct"],["impl StructuralPartialEq for ModeAutoStruct"],["impl StructuralPartialEq for AsciiTextStruct"],["impl StructuralPartialEq for DistanceStruct"],["impl StructuralPartialEq for PingProtocolHead"],["impl StructuralPartialEq for SetCurrentMaxStruct"],["impl StructuralPartialEq for Messages"],["impl StructuralPartialEq for SetGainSettingStruct"],["impl StructuralPartialEq for SetPingIntervalStruct"],["impl StructuralPartialEq for DeviceIdStruct"],["impl StructuralPartialEq for SetLpfSampleFrequencyStruct"],["impl StructuralPartialEq for PingEnableStruct"],["impl StructuralPartialEq for ProtocolVersionStruct"],["impl StructuralPartialEq for TemperatureTimeoutStruct"],["impl StructuralPartialEq for DeviceInformationStruct"],["impl StructuralPartialEq for ResetStruct"],["impl StructuralPartialEq for GotoBootloaderStruct"],["impl StructuralPartialEq for RebootStruct"],["impl StructuralPartialEq for StateStruct"],["impl StructuralPartialEq for FirmwareVersionStruct"],["impl StructuralPartialEq for DeviceIdStruct"],["impl StructuralPartialEq for Messages"],["impl StructuralPartialEq for Messages"],["impl StructuralPartialEq for AutoTransmitStruct"],["impl StructuralPartialEq for PingIntervalStruct"],["impl StructuralPartialEq for GeneralInfoStruct"],["impl StructuralPartialEq for SetModeAutoStruct"],["impl StructuralPartialEq for SetDeviceIdStruct"],["impl StructuralPartialEq for NackStruct"],["impl StructuralPartialEq for SetSpeedOfSoundStruct"],["impl StructuralPartialEq for EventsStruct"],["impl StructuralPartialEq for PcbTemperatureStruct"],["impl StructuralPartialEq for SetCurrentTimeoutStruct"],["impl StructuralPartialEq for SetPingEnableStruct"],["impl StructuralPartialEq for PingProtocolHead"],["impl StructuralPartialEq for RangeStruct"],["impl StructuralPartialEq for CurrentMaxStruct"],["impl StructuralPartialEq for CellTimeoutStruct"],["impl StructuralPartialEq for TemperatureMaxStruct"],["impl StructuralPartialEq for TransducerStruct"],["impl StructuralPartialEq for Voltage5Struct"],["impl StructuralPartialEq for SetTemperatureMaxStruct"],["impl StructuralPartialEq for EraseFlashStruct"],["impl StructuralPartialEq for SetLpfSettingStruct"],["impl StructuralPartialEq for SetTemperatureTimeoutStruct"],["impl StructuralPartialEq for CurrentTimeoutStruct"],["impl StructuralPartialEq for GeneralRequestStruct"],["impl StructuralPartialEq for DeviceDataStruct"],["impl StructuralPartialEq for ProcessorTemperatureStruct"],["impl StructuralPartialEq for SetCellVoltageMinimumStruct"],["impl StructuralPartialEq for SetCellVoltageTimeoutStruct"],["impl StructuralPartialEq for ResetDefaultsStruct"],["impl StructuralPartialEq for SetRangeStruct"],["impl StructuralPartialEq for MotorOffStruct"],["impl StructuralPartialEq for PingProtocolHead"],["impl StructuralPartialEq for ContinuousStartStruct"],["impl StructuralPartialEq for AutoDeviceDataStruct"],["impl StructuralPartialEq for Messages"],["impl StructuralPartialEq for ContinuousStopStruct"],["impl StructuralPartialEq for GainSettingStruct"],["impl StructuralPartialEq for PingProtocolHead"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Sync.js b/trait.impl/core/marker/trait.Sync.js index 187bc13b9..0a2d24f25 100644 --- a/trait.impl/core/marker/trait.Sync.js +++ b/trait.impl/core/marker/trait.Sync.js @@ -1,4 +1,4 @@ (function() {var implementors = { -"bytes":[["impl<T, U> Sync for Chain<T, U>where\n T: Sync,\n U: Sync,",1,["bytes::buf::chain::Chain"]],["impl<T> Sync for IntoIter<T>where\n T: Sync,",1,["bytes::buf::iter::IntoIter"]],["impl<T> Sync for Limit<T>where\n T: Sync,",1,["bytes::buf::limit::Limit"]],["impl<B> Sync for Reader<B>where\n B: Sync,",1,["bytes::buf::reader::Reader"]],["impl<T> Sync for Take<T>where\n T: Sync,",1,["bytes::buf::take::Take"]],["impl Sync for UninitSlice",1,["bytes::buf::uninit_slice::UninitSlice"]],["impl<B> Sync for Writer<B>where\n B: Sync,",1,["bytes::buf::writer::Writer"]],["impl Sync for BytesMut"],["impl Sync for Bytes"]], -"ping_rs":[["impl Sync for PingProtocolHead",1,["ping_rs::bluebps::PingProtocolHead"]],["impl Sync for Messages",1,["ping_rs::bluebps::Messages"]],["impl Sync for CellVoltageMinStruct",1,["ping_rs::bluebps::CellVoltageMinStruct"]],["impl Sync for SetTemperatureMaxStruct",1,["ping_rs::bluebps::SetTemperatureMaxStruct"]],["impl Sync for TemperatureTimeoutStruct",1,["ping_rs::bluebps::TemperatureTimeoutStruct"]],["impl Sync for RebootStruct",1,["ping_rs::bluebps::RebootStruct"]],["impl Sync for ResetDefaultsStruct",1,["ping_rs::bluebps::ResetDefaultsStruct"]],["impl Sync for SetCellVoltageTimeoutStruct",1,["ping_rs::bluebps::SetCellVoltageTimeoutStruct"]],["impl Sync for StateStruct",1,["ping_rs::bluebps::StateStruct"]],["impl Sync for CurrentTimeoutStruct",1,["ping_rs::bluebps::CurrentTimeoutStruct"]],["impl Sync for SetLpfSettingStruct",1,["ping_rs::bluebps::SetLpfSettingStruct"]],["impl Sync for SetStreamRateStruct",1,["ping_rs::bluebps::SetStreamRateStruct"]],["impl Sync for SetCellVoltageMinimumStruct",1,["ping_rs::bluebps::SetCellVoltageMinimumStruct"]],["impl Sync for SetLpfSampleFrequencyStruct",1,["ping_rs::bluebps::SetLpfSampleFrequencyStruct"]],["impl Sync for SetCurrentTimeoutStruct",1,["ping_rs::bluebps::SetCurrentTimeoutStruct"]],["impl Sync for CellTimeoutStruct",1,["ping_rs::bluebps::CellTimeoutStruct"]],["impl Sync for EraseFlashStruct",1,["ping_rs::bluebps::EraseFlashStruct"]],["impl Sync for SetTemperatureTimeoutStruct",1,["ping_rs::bluebps::SetTemperatureTimeoutStruct"]],["impl Sync for CurrentMaxStruct",1,["ping_rs::bluebps::CurrentMaxStruct"]],["impl Sync for TemperatureMaxStruct",1,["ping_rs::bluebps::TemperatureMaxStruct"]],["impl Sync for EventsStruct",1,["ping_rs::bluebps::EventsStruct"]],["impl Sync for SetCurrentMaxStruct",1,["ping_rs::bluebps::SetCurrentMaxStruct"]],["impl Sync for PingProtocolHead",1,["ping_rs::ping360::PingProtocolHead"]],["impl Sync for Messages",1,["ping_rs::ping360::Messages"]],["impl Sync for DeviceDataStruct",1,["ping_rs::ping360::DeviceDataStruct"]],["impl Sync for TransducerStruct",1,["ping_rs::ping360::TransducerStruct"]],["impl Sync for AutoTransmitStruct",1,["ping_rs::ping360::AutoTransmitStruct"]],["impl Sync for ResetStruct",1,["ping_rs::ping360::ResetStruct"]],["impl Sync for MotorOffStruct",1,["ping_rs::ping360::MotorOffStruct"]],["impl Sync for AutoDeviceDataStruct",1,["ping_rs::ping360::AutoDeviceDataStruct"]],["impl Sync for DeviceIdStruct",1,["ping_rs::ping360::DeviceIdStruct"]],["impl Sync for PingProtocolHead",1,["ping_rs::common::PingProtocolHead"]],["impl Sync for Messages",1,["ping_rs::common::Messages"]],["impl Sync for NackStruct",1,["ping_rs::common::NackStruct"]],["impl Sync for AsciiTextStruct",1,["ping_rs::common::AsciiTextStruct"]],["impl Sync for ProtocolVersionStruct",1,["ping_rs::common::ProtocolVersionStruct"]],["impl Sync for GeneralRequestStruct",1,["ping_rs::common::GeneralRequestStruct"]],["impl Sync for SetDeviceIdStruct",1,["ping_rs::common::SetDeviceIdStruct"]],["impl Sync for AckStruct",1,["ping_rs::common::AckStruct"]],["impl Sync for DeviceInformationStruct",1,["ping_rs::common::DeviceInformationStruct"]],["impl Sync for PingProtocolHead",1,["ping_rs::ping1d::PingProtocolHead"]],["impl Sync for Messages",1,["ping_rs::ping1d::Messages"]],["impl Sync for SetGainSettingStruct",1,["ping_rs::ping1d::SetGainSettingStruct"]],["impl Sync for ContinuousStartStruct",1,["ping_rs::ping1d::ContinuousStartStruct"]],["impl Sync for ProcessorTemperatureStruct",1,["ping_rs::ping1d::ProcessorTemperatureStruct"]],["impl Sync for FirmwareVersionStruct",1,["ping_rs::ping1d::FirmwareVersionStruct"]],["impl Sync for PingEnableStruct",1,["ping_rs::ping1d::PingEnableStruct"]],["impl Sync for SetPingEnableStruct",1,["ping_rs::ping1d::SetPingEnableStruct"]],["impl Sync for DistanceSimpleStruct",1,["ping_rs::ping1d::DistanceSimpleStruct"]],["impl Sync for GeneralInfoStruct",1,["ping_rs::ping1d::GeneralInfoStruct"]],["impl Sync for SetSpeedOfSoundStruct",1,["ping_rs::ping1d::SetSpeedOfSoundStruct"]],["impl Sync for PcbTemperatureStruct",1,["ping_rs::ping1d::PcbTemperatureStruct"]],["impl Sync for GotoBootloaderStruct",1,["ping_rs::ping1d::GotoBootloaderStruct"]],["impl Sync for ModeAutoStruct",1,["ping_rs::ping1d::ModeAutoStruct"]],["impl Sync for SetDeviceIdStruct",1,["ping_rs::ping1d::SetDeviceIdStruct"]],["impl Sync for ContinuousStopStruct",1,["ping_rs::ping1d::ContinuousStopStruct"]],["impl Sync for DeviceIdStruct",1,["ping_rs::ping1d::DeviceIdStruct"]],["impl Sync for SetRangeStruct",1,["ping_rs::ping1d::SetRangeStruct"]],["impl Sync for Voltage5Struct",1,["ping_rs::ping1d::Voltage5Struct"]],["impl Sync for ProfileStruct",1,["ping_rs::ping1d::ProfileStruct"]],["impl Sync for GainSettingStruct",1,["ping_rs::ping1d::GainSettingStruct"]],["impl Sync for RangeStruct",1,["ping_rs::ping1d::RangeStruct"]],["impl Sync for DistanceStruct",1,["ping_rs::ping1d::DistanceStruct"]],["impl Sync for SpeedOfSoundStruct",1,["ping_rs::ping1d::SpeedOfSoundStruct"]],["impl Sync for SetModeAutoStruct",1,["ping_rs::ping1d::SetModeAutoStruct"]],["impl Sync for TransmitDurationStruct",1,["ping_rs::ping1d::TransmitDurationStruct"]],["impl Sync for PingIntervalStruct",1,["ping_rs::ping1d::PingIntervalStruct"]],["impl Sync for SetPingIntervalStruct",1,["ping_rs::ping1d::SetPingIntervalStruct"]],["impl Sync for ParseError",1,["ping_rs::decoder::ParseError"]],["impl Sync for DecoderResult",1,["ping_rs::decoder::DecoderResult"]],["impl Sync for DecoderState",1,["ping_rs::decoder::DecoderState"]],["impl Sync for Decoder",1,["ping_rs::decoder::Decoder"]],["impl Sync for ProtocolMessage",1,["ping_rs::message::ProtocolMessage"]],["impl Sync for Messages",1,["ping_rs::Messages"]]] +"bytes":[["impl<T, U> Sync for Chain<T, U>
    where\n T: Sync,\n U: Sync,
    ",1,["bytes::buf::chain::Chain"]],["impl<T> Sync for IntoIter<T>
    where\n T: Sync,
    ",1,["bytes::buf::iter::IntoIter"]],["impl<T> Sync for Limit<T>
    where\n T: Sync,
    ",1,["bytes::buf::limit::Limit"]],["impl<B> Sync for Reader<B>
    where\n B: Sync,
    ",1,["bytes::buf::reader::Reader"]],["impl<T> Sync for Take<T>
    where\n T: Sync,
    ",1,["bytes::buf::take::Take"]],["impl Sync for UninitSlice",1,["bytes::buf::uninit_slice::UninitSlice"]],["impl<B> Sync for Writer<B>
    where\n B: Sync,
    ",1,["bytes::buf::writer::Writer"]],["impl Sync for Bytes"],["impl Sync for BytesMut"]], +"ping_rs":[["impl Sync for PingProtocolHead",1,["ping_rs::ping360::PingProtocolHead"]],["impl Sync for Messages",1,["ping_rs::ping360::Messages"]],["impl Sync for AutoTransmitStruct",1,["ping_rs::ping360::AutoTransmitStruct"]],["impl Sync for DeviceDataStruct",1,["ping_rs::ping360::DeviceDataStruct"]],["impl Sync for ResetStruct",1,["ping_rs::ping360::ResetStruct"]],["impl Sync for AutoDeviceDataStruct",1,["ping_rs::ping360::AutoDeviceDataStruct"]],["impl Sync for TransducerStruct",1,["ping_rs::ping360::TransducerStruct"]],["impl Sync for MotorOffStruct",1,["ping_rs::ping360::MotorOffStruct"]],["impl Sync for DeviceIdStruct",1,["ping_rs::ping360::DeviceIdStruct"]],["impl Sync for PingProtocolHead",1,["ping_rs::ping1d::PingProtocolHead"]],["impl Sync for Messages",1,["ping_rs::ping1d::Messages"]],["impl Sync for SetPingEnableStruct",1,["ping_rs::ping1d::SetPingEnableStruct"]],["impl Sync for PcbTemperatureStruct",1,["ping_rs::ping1d::PcbTemperatureStruct"]],["impl Sync for SpeedOfSoundStruct",1,["ping_rs::ping1d::SpeedOfSoundStruct"]],["impl Sync for DistanceStruct",1,["ping_rs::ping1d::DistanceStruct"]],["impl Sync for ProcessorTemperatureStruct",1,["ping_rs::ping1d::ProcessorTemperatureStruct"]],["impl Sync for RangeStruct",1,["ping_rs::ping1d::RangeStruct"]],["impl Sync for ContinuousStopStruct",1,["ping_rs::ping1d::ContinuousStopStruct"]],["impl Sync for PingIntervalStruct",1,["ping_rs::ping1d::PingIntervalStruct"]],["impl Sync for ContinuousStartStruct",1,["ping_rs::ping1d::ContinuousStartStruct"]],["impl Sync for SetDeviceIdStruct",1,["ping_rs::ping1d::SetDeviceIdStruct"]],["impl Sync for GotoBootloaderStruct",1,["ping_rs::ping1d::GotoBootloaderStruct"]],["impl Sync for SetPingIntervalStruct",1,["ping_rs::ping1d::SetPingIntervalStruct"]],["impl Sync for DeviceIdStruct",1,["ping_rs::ping1d::DeviceIdStruct"]],["impl Sync for ProfileStruct",1,["ping_rs::ping1d::ProfileStruct"]],["impl Sync for FirmwareVersionStruct",1,["ping_rs::ping1d::FirmwareVersionStruct"]],["impl Sync for TransmitDurationStruct",1,["ping_rs::ping1d::TransmitDurationStruct"]],["impl Sync for SetRangeStruct",1,["ping_rs::ping1d::SetRangeStruct"]],["impl Sync for SetModeAutoStruct",1,["ping_rs::ping1d::SetModeAutoStruct"]],["impl Sync for Voltage5Struct",1,["ping_rs::ping1d::Voltage5Struct"]],["impl Sync for ModeAutoStruct",1,["ping_rs::ping1d::ModeAutoStruct"]],["impl Sync for SetSpeedOfSoundStruct",1,["ping_rs::ping1d::SetSpeedOfSoundStruct"]],["impl Sync for GainSettingStruct",1,["ping_rs::ping1d::GainSettingStruct"]],["impl Sync for PingEnableStruct",1,["ping_rs::ping1d::PingEnableStruct"]],["impl Sync for DistanceSimpleStruct",1,["ping_rs::ping1d::DistanceSimpleStruct"]],["impl Sync for SetGainSettingStruct",1,["ping_rs::ping1d::SetGainSettingStruct"]],["impl Sync for GeneralInfoStruct",1,["ping_rs::ping1d::GeneralInfoStruct"]],["impl Sync for PingProtocolHead",1,["ping_rs::common::PingProtocolHead"]],["impl Sync for Messages",1,["ping_rs::common::Messages"]],["impl Sync for NackStruct",1,["ping_rs::common::NackStruct"]],["impl Sync for AsciiTextStruct",1,["ping_rs::common::AsciiTextStruct"]],["impl Sync for DeviceInformationStruct",1,["ping_rs::common::DeviceInformationStruct"]],["impl Sync for ProtocolVersionStruct",1,["ping_rs::common::ProtocolVersionStruct"]],["impl Sync for AckStruct",1,["ping_rs::common::AckStruct"]],["impl Sync for GeneralRequestStruct",1,["ping_rs::common::GeneralRequestStruct"]],["impl Sync for SetDeviceIdStruct",1,["ping_rs::common::SetDeviceIdStruct"]],["impl Sync for PingProtocolHead",1,["ping_rs::bluebps::PingProtocolHead"]],["impl Sync for Messages",1,["ping_rs::bluebps::Messages"]],["impl Sync for SetTemperatureMaxStruct",1,["ping_rs::bluebps::SetTemperatureMaxStruct"]],["impl Sync for SetCellVoltageTimeoutStruct",1,["ping_rs::bluebps::SetCellVoltageTimeoutStruct"]],["impl Sync for CellTimeoutStruct",1,["ping_rs::bluebps::CellTimeoutStruct"]],["impl Sync for RebootStruct",1,["ping_rs::bluebps::RebootStruct"]],["impl Sync for TemperatureMaxStruct",1,["ping_rs::bluebps::TemperatureMaxStruct"]],["impl Sync for SetTemperatureTimeoutStruct",1,["ping_rs::bluebps::SetTemperatureTimeoutStruct"]],["impl Sync for SetCurrentTimeoutStruct",1,["ping_rs::bluebps::SetCurrentTimeoutStruct"]],["impl Sync for EraseFlashStruct",1,["ping_rs::bluebps::EraseFlashStruct"]],["impl Sync for SetCurrentMaxStruct",1,["ping_rs::bluebps::SetCurrentMaxStruct"]],["impl Sync for TemperatureTimeoutStruct",1,["ping_rs::bluebps::TemperatureTimeoutStruct"]],["impl Sync for SetStreamRateStruct",1,["ping_rs::bluebps::SetStreamRateStruct"]],["impl Sync for SetCellVoltageMinimumStruct",1,["ping_rs::bluebps::SetCellVoltageMinimumStruct"]],["impl Sync for SetLpfSettingStruct",1,["ping_rs::bluebps::SetLpfSettingStruct"]],["impl Sync for CellVoltageMinStruct",1,["ping_rs::bluebps::CellVoltageMinStruct"]],["impl Sync for StateStruct",1,["ping_rs::bluebps::StateStruct"]],["impl Sync for CurrentTimeoutStruct",1,["ping_rs::bluebps::CurrentTimeoutStruct"]],["impl Sync for ResetDefaultsStruct",1,["ping_rs::bluebps::ResetDefaultsStruct"]],["impl Sync for SetLpfSampleFrequencyStruct",1,["ping_rs::bluebps::SetLpfSampleFrequencyStruct"]],["impl Sync for EventsStruct",1,["ping_rs::bluebps::EventsStruct"]],["impl Sync for CurrentMaxStruct",1,["ping_rs::bluebps::CurrentMaxStruct"]],["impl Sync for ParseError",1,["ping_rs::decoder::ParseError"]],["impl Sync for DecoderResult",1,["ping_rs::decoder::DecoderResult"]],["impl Sync for DecoderState",1,["ping_rs::decoder::DecoderState"]],["impl Sync for Decoder",1,["ping_rs::decoder::Decoder"]],["impl Sync for ProtocolMessage",1,["ping_rs::message::ProtocolMessage"]],["impl Sync for Messages",1,["ping_rs::Messages"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/marker/trait.Unpin.js b/trait.impl/core/marker/trait.Unpin.js index 6e9881a52..1863cc3db 100644 --- a/trait.impl/core/marker/trait.Unpin.js +++ b/trait.impl/core/marker/trait.Unpin.js @@ -1,4 +1,4 @@ (function() {var implementors = { -"bytes":[["impl<T, U> Unpin for Chain<T, U>where\n T: Unpin,\n U: Unpin,",1,["bytes::buf::chain::Chain"]],["impl<T> Unpin for IntoIter<T>where\n T: Unpin,",1,["bytes::buf::iter::IntoIter"]],["impl<T> Unpin for Limit<T>where\n T: Unpin,",1,["bytes::buf::limit::Limit"]],["impl<B> Unpin for Reader<B>where\n B: Unpin,",1,["bytes::buf::reader::Reader"]],["impl<T> Unpin for Take<T>where\n T: Unpin,",1,["bytes::buf::take::Take"]],["impl Unpin for UninitSlice",1,["bytes::buf::uninit_slice::UninitSlice"]],["impl<B> Unpin for Writer<B>where\n B: Unpin,",1,["bytes::buf::writer::Writer"]],["impl Unpin for Bytes",1,["bytes::bytes::Bytes"]],["impl Unpin for BytesMut",1,["bytes::bytes_mut::BytesMut"]]], -"ping_rs":[["impl Unpin for PingProtocolHead",1,["ping_rs::bluebps::PingProtocolHead"]],["impl Unpin for Messages",1,["ping_rs::bluebps::Messages"]],["impl Unpin for CellVoltageMinStruct",1,["ping_rs::bluebps::CellVoltageMinStruct"]],["impl Unpin for SetTemperatureMaxStruct",1,["ping_rs::bluebps::SetTemperatureMaxStruct"]],["impl Unpin for TemperatureTimeoutStruct",1,["ping_rs::bluebps::TemperatureTimeoutStruct"]],["impl Unpin for RebootStruct",1,["ping_rs::bluebps::RebootStruct"]],["impl Unpin for ResetDefaultsStruct",1,["ping_rs::bluebps::ResetDefaultsStruct"]],["impl Unpin for SetCellVoltageTimeoutStruct",1,["ping_rs::bluebps::SetCellVoltageTimeoutStruct"]],["impl Unpin for StateStruct",1,["ping_rs::bluebps::StateStruct"]],["impl Unpin for CurrentTimeoutStruct",1,["ping_rs::bluebps::CurrentTimeoutStruct"]],["impl Unpin for SetLpfSettingStruct",1,["ping_rs::bluebps::SetLpfSettingStruct"]],["impl Unpin for SetStreamRateStruct",1,["ping_rs::bluebps::SetStreamRateStruct"]],["impl Unpin for SetCellVoltageMinimumStruct",1,["ping_rs::bluebps::SetCellVoltageMinimumStruct"]],["impl Unpin for SetLpfSampleFrequencyStruct",1,["ping_rs::bluebps::SetLpfSampleFrequencyStruct"]],["impl Unpin for SetCurrentTimeoutStruct",1,["ping_rs::bluebps::SetCurrentTimeoutStruct"]],["impl Unpin for CellTimeoutStruct",1,["ping_rs::bluebps::CellTimeoutStruct"]],["impl Unpin for EraseFlashStruct",1,["ping_rs::bluebps::EraseFlashStruct"]],["impl Unpin for SetTemperatureTimeoutStruct",1,["ping_rs::bluebps::SetTemperatureTimeoutStruct"]],["impl Unpin for CurrentMaxStruct",1,["ping_rs::bluebps::CurrentMaxStruct"]],["impl Unpin for TemperatureMaxStruct",1,["ping_rs::bluebps::TemperatureMaxStruct"]],["impl Unpin for EventsStruct",1,["ping_rs::bluebps::EventsStruct"]],["impl Unpin for SetCurrentMaxStruct",1,["ping_rs::bluebps::SetCurrentMaxStruct"]],["impl Unpin for PingProtocolHead",1,["ping_rs::ping360::PingProtocolHead"]],["impl Unpin for Messages",1,["ping_rs::ping360::Messages"]],["impl Unpin for DeviceDataStruct",1,["ping_rs::ping360::DeviceDataStruct"]],["impl Unpin for TransducerStruct",1,["ping_rs::ping360::TransducerStruct"]],["impl Unpin for AutoTransmitStruct",1,["ping_rs::ping360::AutoTransmitStruct"]],["impl Unpin for ResetStruct",1,["ping_rs::ping360::ResetStruct"]],["impl Unpin for MotorOffStruct",1,["ping_rs::ping360::MotorOffStruct"]],["impl Unpin for AutoDeviceDataStruct",1,["ping_rs::ping360::AutoDeviceDataStruct"]],["impl Unpin for DeviceIdStruct",1,["ping_rs::ping360::DeviceIdStruct"]],["impl Unpin for PingProtocolHead",1,["ping_rs::common::PingProtocolHead"]],["impl Unpin for Messages",1,["ping_rs::common::Messages"]],["impl Unpin for NackStruct",1,["ping_rs::common::NackStruct"]],["impl Unpin for AsciiTextStruct",1,["ping_rs::common::AsciiTextStruct"]],["impl Unpin for ProtocolVersionStruct",1,["ping_rs::common::ProtocolVersionStruct"]],["impl Unpin for GeneralRequestStruct",1,["ping_rs::common::GeneralRequestStruct"]],["impl Unpin for SetDeviceIdStruct",1,["ping_rs::common::SetDeviceIdStruct"]],["impl Unpin for AckStruct",1,["ping_rs::common::AckStruct"]],["impl Unpin for DeviceInformationStruct",1,["ping_rs::common::DeviceInformationStruct"]],["impl Unpin for PingProtocolHead",1,["ping_rs::ping1d::PingProtocolHead"]],["impl Unpin for Messages",1,["ping_rs::ping1d::Messages"]],["impl Unpin for SetGainSettingStruct",1,["ping_rs::ping1d::SetGainSettingStruct"]],["impl Unpin for ContinuousStartStruct",1,["ping_rs::ping1d::ContinuousStartStruct"]],["impl Unpin for ProcessorTemperatureStruct",1,["ping_rs::ping1d::ProcessorTemperatureStruct"]],["impl Unpin for FirmwareVersionStruct",1,["ping_rs::ping1d::FirmwareVersionStruct"]],["impl Unpin for PingEnableStruct",1,["ping_rs::ping1d::PingEnableStruct"]],["impl Unpin for SetPingEnableStruct",1,["ping_rs::ping1d::SetPingEnableStruct"]],["impl Unpin for DistanceSimpleStruct",1,["ping_rs::ping1d::DistanceSimpleStruct"]],["impl Unpin for GeneralInfoStruct",1,["ping_rs::ping1d::GeneralInfoStruct"]],["impl Unpin for SetSpeedOfSoundStruct",1,["ping_rs::ping1d::SetSpeedOfSoundStruct"]],["impl Unpin for PcbTemperatureStruct",1,["ping_rs::ping1d::PcbTemperatureStruct"]],["impl Unpin for GotoBootloaderStruct",1,["ping_rs::ping1d::GotoBootloaderStruct"]],["impl Unpin for ModeAutoStruct",1,["ping_rs::ping1d::ModeAutoStruct"]],["impl Unpin for SetDeviceIdStruct",1,["ping_rs::ping1d::SetDeviceIdStruct"]],["impl Unpin for ContinuousStopStruct",1,["ping_rs::ping1d::ContinuousStopStruct"]],["impl Unpin for DeviceIdStruct",1,["ping_rs::ping1d::DeviceIdStruct"]],["impl Unpin for SetRangeStruct",1,["ping_rs::ping1d::SetRangeStruct"]],["impl Unpin for Voltage5Struct",1,["ping_rs::ping1d::Voltage5Struct"]],["impl Unpin for ProfileStruct",1,["ping_rs::ping1d::ProfileStruct"]],["impl Unpin for GainSettingStruct",1,["ping_rs::ping1d::GainSettingStruct"]],["impl Unpin for RangeStruct",1,["ping_rs::ping1d::RangeStruct"]],["impl Unpin for DistanceStruct",1,["ping_rs::ping1d::DistanceStruct"]],["impl Unpin for SpeedOfSoundStruct",1,["ping_rs::ping1d::SpeedOfSoundStruct"]],["impl Unpin for SetModeAutoStruct",1,["ping_rs::ping1d::SetModeAutoStruct"]],["impl Unpin for TransmitDurationStruct",1,["ping_rs::ping1d::TransmitDurationStruct"]],["impl Unpin for PingIntervalStruct",1,["ping_rs::ping1d::PingIntervalStruct"]],["impl Unpin for SetPingIntervalStruct",1,["ping_rs::ping1d::SetPingIntervalStruct"]],["impl Unpin for ParseError",1,["ping_rs::decoder::ParseError"]],["impl Unpin for DecoderResult",1,["ping_rs::decoder::DecoderResult"]],["impl Unpin for DecoderState",1,["ping_rs::decoder::DecoderState"]],["impl Unpin for Decoder",1,["ping_rs::decoder::Decoder"]],["impl Unpin for ProtocolMessage",1,["ping_rs::message::ProtocolMessage"]],["impl Unpin for Messages",1,["ping_rs::Messages"]]] +"bytes":[["impl<T, U> Unpin for Chain<T, U>
    where\n T: Unpin,\n U: Unpin,
    ",1,["bytes::buf::chain::Chain"]],["impl<T> Unpin for IntoIter<T>
    where\n T: Unpin,
    ",1,["bytes::buf::iter::IntoIter"]],["impl<T> Unpin for Limit<T>
    where\n T: Unpin,
    ",1,["bytes::buf::limit::Limit"]],["impl<B> Unpin for Reader<B>
    where\n B: Unpin,
    ",1,["bytes::buf::reader::Reader"]],["impl<T> Unpin for Take<T>
    where\n T: Unpin,
    ",1,["bytes::buf::take::Take"]],["impl Unpin for UninitSlice",1,["bytes::buf::uninit_slice::UninitSlice"]],["impl<B> Unpin for Writer<B>
    where\n B: Unpin,
    ",1,["bytes::buf::writer::Writer"]],["impl Unpin for Bytes",1,["bytes::bytes::Bytes"]],["impl Unpin for BytesMut",1,["bytes::bytes_mut::BytesMut"]]], +"ping_rs":[["impl Unpin for PingProtocolHead",1,["ping_rs::ping360::PingProtocolHead"]],["impl Unpin for Messages",1,["ping_rs::ping360::Messages"]],["impl Unpin for AutoTransmitStruct",1,["ping_rs::ping360::AutoTransmitStruct"]],["impl Unpin for DeviceDataStruct",1,["ping_rs::ping360::DeviceDataStruct"]],["impl Unpin for ResetStruct",1,["ping_rs::ping360::ResetStruct"]],["impl Unpin for AutoDeviceDataStruct",1,["ping_rs::ping360::AutoDeviceDataStruct"]],["impl Unpin for TransducerStruct",1,["ping_rs::ping360::TransducerStruct"]],["impl Unpin for MotorOffStruct",1,["ping_rs::ping360::MotorOffStruct"]],["impl Unpin for DeviceIdStruct",1,["ping_rs::ping360::DeviceIdStruct"]],["impl Unpin for PingProtocolHead",1,["ping_rs::ping1d::PingProtocolHead"]],["impl Unpin for Messages",1,["ping_rs::ping1d::Messages"]],["impl Unpin for SetPingEnableStruct",1,["ping_rs::ping1d::SetPingEnableStruct"]],["impl Unpin for PcbTemperatureStruct",1,["ping_rs::ping1d::PcbTemperatureStruct"]],["impl Unpin for SpeedOfSoundStruct",1,["ping_rs::ping1d::SpeedOfSoundStruct"]],["impl Unpin for DistanceStruct",1,["ping_rs::ping1d::DistanceStruct"]],["impl Unpin for ProcessorTemperatureStruct",1,["ping_rs::ping1d::ProcessorTemperatureStruct"]],["impl Unpin for RangeStruct",1,["ping_rs::ping1d::RangeStruct"]],["impl Unpin for ContinuousStopStruct",1,["ping_rs::ping1d::ContinuousStopStruct"]],["impl Unpin for PingIntervalStruct",1,["ping_rs::ping1d::PingIntervalStruct"]],["impl Unpin for ContinuousStartStruct",1,["ping_rs::ping1d::ContinuousStartStruct"]],["impl Unpin for SetDeviceIdStruct",1,["ping_rs::ping1d::SetDeviceIdStruct"]],["impl Unpin for GotoBootloaderStruct",1,["ping_rs::ping1d::GotoBootloaderStruct"]],["impl Unpin for SetPingIntervalStruct",1,["ping_rs::ping1d::SetPingIntervalStruct"]],["impl Unpin for DeviceIdStruct",1,["ping_rs::ping1d::DeviceIdStruct"]],["impl Unpin for ProfileStruct",1,["ping_rs::ping1d::ProfileStruct"]],["impl Unpin for FirmwareVersionStruct",1,["ping_rs::ping1d::FirmwareVersionStruct"]],["impl Unpin for TransmitDurationStruct",1,["ping_rs::ping1d::TransmitDurationStruct"]],["impl Unpin for SetRangeStruct",1,["ping_rs::ping1d::SetRangeStruct"]],["impl Unpin for SetModeAutoStruct",1,["ping_rs::ping1d::SetModeAutoStruct"]],["impl Unpin for Voltage5Struct",1,["ping_rs::ping1d::Voltage5Struct"]],["impl Unpin for ModeAutoStruct",1,["ping_rs::ping1d::ModeAutoStruct"]],["impl Unpin for SetSpeedOfSoundStruct",1,["ping_rs::ping1d::SetSpeedOfSoundStruct"]],["impl Unpin for GainSettingStruct",1,["ping_rs::ping1d::GainSettingStruct"]],["impl Unpin for PingEnableStruct",1,["ping_rs::ping1d::PingEnableStruct"]],["impl Unpin for DistanceSimpleStruct",1,["ping_rs::ping1d::DistanceSimpleStruct"]],["impl Unpin for SetGainSettingStruct",1,["ping_rs::ping1d::SetGainSettingStruct"]],["impl Unpin for GeneralInfoStruct",1,["ping_rs::ping1d::GeneralInfoStruct"]],["impl Unpin for PingProtocolHead",1,["ping_rs::common::PingProtocolHead"]],["impl Unpin for Messages",1,["ping_rs::common::Messages"]],["impl Unpin for NackStruct",1,["ping_rs::common::NackStruct"]],["impl Unpin for AsciiTextStruct",1,["ping_rs::common::AsciiTextStruct"]],["impl Unpin for DeviceInformationStruct",1,["ping_rs::common::DeviceInformationStruct"]],["impl Unpin for ProtocolVersionStruct",1,["ping_rs::common::ProtocolVersionStruct"]],["impl Unpin for AckStruct",1,["ping_rs::common::AckStruct"]],["impl Unpin for GeneralRequestStruct",1,["ping_rs::common::GeneralRequestStruct"]],["impl Unpin for SetDeviceIdStruct",1,["ping_rs::common::SetDeviceIdStruct"]],["impl Unpin for PingProtocolHead",1,["ping_rs::bluebps::PingProtocolHead"]],["impl Unpin for Messages",1,["ping_rs::bluebps::Messages"]],["impl Unpin for SetTemperatureMaxStruct",1,["ping_rs::bluebps::SetTemperatureMaxStruct"]],["impl Unpin for SetCellVoltageTimeoutStruct",1,["ping_rs::bluebps::SetCellVoltageTimeoutStruct"]],["impl Unpin for CellTimeoutStruct",1,["ping_rs::bluebps::CellTimeoutStruct"]],["impl Unpin for RebootStruct",1,["ping_rs::bluebps::RebootStruct"]],["impl Unpin for TemperatureMaxStruct",1,["ping_rs::bluebps::TemperatureMaxStruct"]],["impl Unpin for SetTemperatureTimeoutStruct",1,["ping_rs::bluebps::SetTemperatureTimeoutStruct"]],["impl Unpin for SetCurrentTimeoutStruct",1,["ping_rs::bluebps::SetCurrentTimeoutStruct"]],["impl Unpin for EraseFlashStruct",1,["ping_rs::bluebps::EraseFlashStruct"]],["impl Unpin for SetCurrentMaxStruct",1,["ping_rs::bluebps::SetCurrentMaxStruct"]],["impl Unpin for TemperatureTimeoutStruct",1,["ping_rs::bluebps::TemperatureTimeoutStruct"]],["impl Unpin for SetStreamRateStruct",1,["ping_rs::bluebps::SetStreamRateStruct"]],["impl Unpin for SetCellVoltageMinimumStruct",1,["ping_rs::bluebps::SetCellVoltageMinimumStruct"]],["impl Unpin for SetLpfSettingStruct",1,["ping_rs::bluebps::SetLpfSettingStruct"]],["impl Unpin for CellVoltageMinStruct",1,["ping_rs::bluebps::CellVoltageMinStruct"]],["impl Unpin for StateStruct",1,["ping_rs::bluebps::StateStruct"]],["impl Unpin for CurrentTimeoutStruct",1,["ping_rs::bluebps::CurrentTimeoutStruct"]],["impl Unpin for ResetDefaultsStruct",1,["ping_rs::bluebps::ResetDefaultsStruct"]],["impl Unpin for SetLpfSampleFrequencyStruct",1,["ping_rs::bluebps::SetLpfSampleFrequencyStruct"]],["impl Unpin for EventsStruct",1,["ping_rs::bluebps::EventsStruct"]],["impl Unpin for CurrentMaxStruct",1,["ping_rs::bluebps::CurrentMaxStruct"]],["impl Unpin for ParseError",1,["ping_rs::decoder::ParseError"]],["impl Unpin for DecoderResult",1,["ping_rs::decoder::DecoderResult"]],["impl Unpin for DecoderState",1,["ping_rs::decoder::DecoderState"]],["impl Unpin for Decoder",1,["ping_rs::decoder::Decoder"]],["impl Unpin for ProtocolMessage",1,["ping_rs::message::ProtocolMessage"]],["impl Unpin for Messages",1,["ping_rs::Messages"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/ops/deref/trait.Deref.js b/trait.impl/core/ops/deref/trait.Deref.js index df1592d2d..fd9da5d3b 100644 --- a/trait.impl/core/ops/deref/trait.Deref.js +++ b/trait.impl/core/ops/deref/trait.Deref.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"bytes":[["impl Deref for Bytes"],["impl Deref for BytesMut"]] +"bytes":[["impl Deref for Bytes"],["impl Deref for BytesMut"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/ops/deref/trait.DerefMut.js b/trait.impl/core/ops/deref/trait.DerefMut.js index df0e93450..b0ba1d65e 100644 --- a/trait.impl/core/ops/deref/trait.DerefMut.js +++ b/trait.impl/core/ops/deref/trait.DerefMut.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"bytes":[["impl DerefMut for BytesMut"]] +"bytes":[["impl DerefMut for BytesMut"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/ops/drop/trait.Drop.js b/trait.impl/core/ops/drop/trait.Drop.js index 6c601e46d..7efa05408 100644 --- a/trait.impl/core/ops/drop/trait.Drop.js +++ b/trait.impl/core/ops/drop/trait.Drop.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"bytes":[["impl Drop for BytesMut"],["impl Drop for Bytes"]] +"bytes":[["impl Drop for BytesMut"],["impl Drop for Bytes"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/ops/index/trait.Index.js b/trait.impl/core/ops/index/trait.Index.js index 7fb394437..46054a51c 100644 --- a/trait.impl/core/ops/index/trait.Index.js +++ b/trait.impl/core/ops/index/trait.Index.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"bytes":[["impl Index<RangeToInclusive<usize>> for UninitSlice"],["impl Index<RangeFrom<usize>> for UninitSlice"],["impl Index<Range<usize>> for UninitSlice"],["impl Index<RangeTo<usize>> for UninitSlice"],["impl Index<RangeInclusive<usize>> for UninitSlice"],["impl Index<RangeFull> for UninitSlice"]] +"bytes":[["impl Index<Range<usize>> for UninitSlice"],["impl Index<RangeFrom<usize>> for UninitSlice"],["impl Index<RangeTo<usize>> for UninitSlice"],["impl Index<RangeInclusive<usize>> for UninitSlice"],["impl Index<RangeFull> for UninitSlice"],["impl Index<RangeToInclusive<usize>> for UninitSlice"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/ops/index/trait.IndexMut.js b/trait.impl/core/ops/index/trait.IndexMut.js index e33ac0a67..11028d3c2 100644 --- a/trait.impl/core/ops/index/trait.IndexMut.js +++ b/trait.impl/core/ops/index/trait.IndexMut.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"bytes":[["impl IndexMut<RangeInclusive<usize>> for UninitSlice"],["impl IndexMut<RangeToInclusive<usize>> for UninitSlice"],["impl IndexMut<RangeTo<usize>> for UninitSlice"],["impl IndexMut<RangeFrom<usize>> for UninitSlice"],["impl IndexMut<Range<usize>> for UninitSlice"],["impl IndexMut<RangeFull> for UninitSlice"]] +"bytes":[["impl IndexMut<RangeFull> for UninitSlice"],["impl IndexMut<RangeInclusive<usize>> for UninitSlice"],["impl IndexMut<RangeFrom<usize>> for UninitSlice"],["impl IndexMut<RangeTo<usize>> for UninitSlice"],["impl IndexMut<RangeToInclusive<usize>> for UninitSlice"],["impl IndexMut<Range<usize>> for UninitSlice"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js b/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js index befee2c32..b9d5c867c 100644 --- a/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js +++ b/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js @@ -1,4 +1,4 @@ (function() {var implementors = { -"bytes":[["impl<T, U> RefUnwindSafe for Chain<T, U>where\n T: RefUnwindSafe,\n U: RefUnwindSafe,",1,["bytes::buf::chain::Chain"]],["impl<T> RefUnwindSafe for IntoIter<T>where\n T: RefUnwindSafe,",1,["bytes::buf::iter::IntoIter"]],["impl<T> RefUnwindSafe for Limit<T>where\n T: RefUnwindSafe,",1,["bytes::buf::limit::Limit"]],["impl<B> RefUnwindSafe for Reader<B>where\n B: RefUnwindSafe,",1,["bytes::buf::reader::Reader"]],["impl<T> RefUnwindSafe for Take<T>where\n T: RefUnwindSafe,",1,["bytes::buf::take::Take"]],["impl RefUnwindSafe for UninitSlice",1,["bytes::buf::uninit_slice::UninitSlice"]],["impl<B> RefUnwindSafe for Writer<B>where\n B: RefUnwindSafe,",1,["bytes::buf::writer::Writer"]],["impl RefUnwindSafe for Bytes",1,["bytes::bytes::Bytes"]],["impl RefUnwindSafe for BytesMut",1,["bytes::bytes_mut::BytesMut"]]], -"ping_rs":[["impl RefUnwindSafe for PingProtocolHead",1,["ping_rs::bluebps::PingProtocolHead"]],["impl RefUnwindSafe for Messages",1,["ping_rs::bluebps::Messages"]],["impl RefUnwindSafe for CellVoltageMinStruct",1,["ping_rs::bluebps::CellVoltageMinStruct"]],["impl RefUnwindSafe for SetTemperatureMaxStruct",1,["ping_rs::bluebps::SetTemperatureMaxStruct"]],["impl RefUnwindSafe for TemperatureTimeoutStruct",1,["ping_rs::bluebps::TemperatureTimeoutStruct"]],["impl RefUnwindSafe for RebootStruct",1,["ping_rs::bluebps::RebootStruct"]],["impl RefUnwindSafe for ResetDefaultsStruct",1,["ping_rs::bluebps::ResetDefaultsStruct"]],["impl RefUnwindSafe for SetCellVoltageTimeoutStruct",1,["ping_rs::bluebps::SetCellVoltageTimeoutStruct"]],["impl RefUnwindSafe for StateStruct",1,["ping_rs::bluebps::StateStruct"]],["impl RefUnwindSafe for CurrentTimeoutStruct",1,["ping_rs::bluebps::CurrentTimeoutStruct"]],["impl RefUnwindSafe for SetLpfSettingStruct",1,["ping_rs::bluebps::SetLpfSettingStruct"]],["impl RefUnwindSafe for SetStreamRateStruct",1,["ping_rs::bluebps::SetStreamRateStruct"]],["impl RefUnwindSafe for SetCellVoltageMinimumStruct",1,["ping_rs::bluebps::SetCellVoltageMinimumStruct"]],["impl RefUnwindSafe for SetLpfSampleFrequencyStruct",1,["ping_rs::bluebps::SetLpfSampleFrequencyStruct"]],["impl RefUnwindSafe for SetCurrentTimeoutStruct",1,["ping_rs::bluebps::SetCurrentTimeoutStruct"]],["impl RefUnwindSafe for CellTimeoutStruct",1,["ping_rs::bluebps::CellTimeoutStruct"]],["impl RefUnwindSafe for EraseFlashStruct",1,["ping_rs::bluebps::EraseFlashStruct"]],["impl RefUnwindSafe for SetTemperatureTimeoutStruct",1,["ping_rs::bluebps::SetTemperatureTimeoutStruct"]],["impl RefUnwindSafe for CurrentMaxStruct",1,["ping_rs::bluebps::CurrentMaxStruct"]],["impl RefUnwindSafe for TemperatureMaxStruct",1,["ping_rs::bluebps::TemperatureMaxStruct"]],["impl RefUnwindSafe for EventsStruct",1,["ping_rs::bluebps::EventsStruct"]],["impl RefUnwindSafe for SetCurrentMaxStruct",1,["ping_rs::bluebps::SetCurrentMaxStruct"]],["impl RefUnwindSafe for PingProtocolHead",1,["ping_rs::ping360::PingProtocolHead"]],["impl RefUnwindSafe for Messages",1,["ping_rs::ping360::Messages"]],["impl RefUnwindSafe for DeviceDataStruct",1,["ping_rs::ping360::DeviceDataStruct"]],["impl RefUnwindSafe for TransducerStruct",1,["ping_rs::ping360::TransducerStruct"]],["impl RefUnwindSafe for AutoTransmitStruct",1,["ping_rs::ping360::AutoTransmitStruct"]],["impl RefUnwindSafe for ResetStruct",1,["ping_rs::ping360::ResetStruct"]],["impl RefUnwindSafe for MotorOffStruct",1,["ping_rs::ping360::MotorOffStruct"]],["impl RefUnwindSafe for AutoDeviceDataStruct",1,["ping_rs::ping360::AutoDeviceDataStruct"]],["impl RefUnwindSafe for DeviceIdStruct",1,["ping_rs::ping360::DeviceIdStruct"]],["impl RefUnwindSafe for PingProtocolHead",1,["ping_rs::common::PingProtocolHead"]],["impl RefUnwindSafe for Messages",1,["ping_rs::common::Messages"]],["impl RefUnwindSafe for NackStruct",1,["ping_rs::common::NackStruct"]],["impl RefUnwindSafe for AsciiTextStruct",1,["ping_rs::common::AsciiTextStruct"]],["impl RefUnwindSafe for ProtocolVersionStruct",1,["ping_rs::common::ProtocolVersionStruct"]],["impl RefUnwindSafe for GeneralRequestStruct",1,["ping_rs::common::GeneralRequestStruct"]],["impl RefUnwindSafe for SetDeviceIdStruct",1,["ping_rs::common::SetDeviceIdStruct"]],["impl RefUnwindSafe for AckStruct",1,["ping_rs::common::AckStruct"]],["impl RefUnwindSafe for DeviceInformationStruct",1,["ping_rs::common::DeviceInformationStruct"]],["impl RefUnwindSafe for PingProtocolHead",1,["ping_rs::ping1d::PingProtocolHead"]],["impl RefUnwindSafe for Messages",1,["ping_rs::ping1d::Messages"]],["impl RefUnwindSafe for SetGainSettingStruct",1,["ping_rs::ping1d::SetGainSettingStruct"]],["impl RefUnwindSafe for ContinuousStartStruct",1,["ping_rs::ping1d::ContinuousStartStruct"]],["impl RefUnwindSafe for ProcessorTemperatureStruct",1,["ping_rs::ping1d::ProcessorTemperatureStruct"]],["impl RefUnwindSafe for FirmwareVersionStruct",1,["ping_rs::ping1d::FirmwareVersionStruct"]],["impl RefUnwindSafe for PingEnableStruct",1,["ping_rs::ping1d::PingEnableStruct"]],["impl RefUnwindSafe for SetPingEnableStruct",1,["ping_rs::ping1d::SetPingEnableStruct"]],["impl RefUnwindSafe for DistanceSimpleStruct",1,["ping_rs::ping1d::DistanceSimpleStruct"]],["impl RefUnwindSafe for GeneralInfoStruct",1,["ping_rs::ping1d::GeneralInfoStruct"]],["impl RefUnwindSafe for SetSpeedOfSoundStruct",1,["ping_rs::ping1d::SetSpeedOfSoundStruct"]],["impl RefUnwindSafe for PcbTemperatureStruct",1,["ping_rs::ping1d::PcbTemperatureStruct"]],["impl RefUnwindSafe for GotoBootloaderStruct",1,["ping_rs::ping1d::GotoBootloaderStruct"]],["impl RefUnwindSafe for ModeAutoStruct",1,["ping_rs::ping1d::ModeAutoStruct"]],["impl RefUnwindSafe for SetDeviceIdStruct",1,["ping_rs::ping1d::SetDeviceIdStruct"]],["impl RefUnwindSafe for ContinuousStopStruct",1,["ping_rs::ping1d::ContinuousStopStruct"]],["impl RefUnwindSafe for DeviceIdStruct",1,["ping_rs::ping1d::DeviceIdStruct"]],["impl RefUnwindSafe for SetRangeStruct",1,["ping_rs::ping1d::SetRangeStruct"]],["impl RefUnwindSafe for Voltage5Struct",1,["ping_rs::ping1d::Voltage5Struct"]],["impl RefUnwindSafe for ProfileStruct",1,["ping_rs::ping1d::ProfileStruct"]],["impl RefUnwindSafe for GainSettingStruct",1,["ping_rs::ping1d::GainSettingStruct"]],["impl RefUnwindSafe for RangeStruct",1,["ping_rs::ping1d::RangeStruct"]],["impl RefUnwindSafe for DistanceStruct",1,["ping_rs::ping1d::DistanceStruct"]],["impl RefUnwindSafe for SpeedOfSoundStruct",1,["ping_rs::ping1d::SpeedOfSoundStruct"]],["impl RefUnwindSafe for SetModeAutoStruct",1,["ping_rs::ping1d::SetModeAutoStruct"]],["impl RefUnwindSafe for TransmitDurationStruct",1,["ping_rs::ping1d::TransmitDurationStruct"]],["impl RefUnwindSafe for PingIntervalStruct",1,["ping_rs::ping1d::PingIntervalStruct"]],["impl RefUnwindSafe for SetPingIntervalStruct",1,["ping_rs::ping1d::SetPingIntervalStruct"]],["impl RefUnwindSafe for ParseError",1,["ping_rs::decoder::ParseError"]],["impl RefUnwindSafe for DecoderResult",1,["ping_rs::decoder::DecoderResult"]],["impl RefUnwindSafe for DecoderState",1,["ping_rs::decoder::DecoderState"]],["impl RefUnwindSafe for Decoder",1,["ping_rs::decoder::Decoder"]],["impl RefUnwindSafe for ProtocolMessage",1,["ping_rs::message::ProtocolMessage"]],["impl RefUnwindSafe for Messages",1,["ping_rs::Messages"]]] +"bytes":[["impl<T, U> RefUnwindSafe for Chain<T, U>
    where\n T: RefUnwindSafe,\n U: RefUnwindSafe,
    ",1,["bytes::buf::chain::Chain"]],["impl<T> RefUnwindSafe for IntoIter<T>
    where\n T: RefUnwindSafe,
    ",1,["bytes::buf::iter::IntoIter"]],["impl<T> RefUnwindSafe for Limit<T>
    where\n T: RefUnwindSafe,
    ",1,["bytes::buf::limit::Limit"]],["impl<B> RefUnwindSafe for Reader<B>
    where\n B: RefUnwindSafe,
    ",1,["bytes::buf::reader::Reader"]],["impl<T> RefUnwindSafe for Take<T>
    where\n T: RefUnwindSafe,
    ",1,["bytes::buf::take::Take"]],["impl RefUnwindSafe for UninitSlice",1,["bytes::buf::uninit_slice::UninitSlice"]],["impl<B> RefUnwindSafe for Writer<B>
    where\n B: RefUnwindSafe,
    ",1,["bytes::buf::writer::Writer"]],["impl RefUnwindSafe for Bytes",1,["bytes::bytes::Bytes"]],["impl RefUnwindSafe for BytesMut",1,["bytes::bytes_mut::BytesMut"]]], +"ping_rs":[["impl RefUnwindSafe for PingProtocolHead",1,["ping_rs::ping360::PingProtocolHead"]],["impl RefUnwindSafe for Messages",1,["ping_rs::ping360::Messages"]],["impl RefUnwindSafe for AutoTransmitStruct",1,["ping_rs::ping360::AutoTransmitStruct"]],["impl RefUnwindSafe for DeviceDataStruct",1,["ping_rs::ping360::DeviceDataStruct"]],["impl RefUnwindSafe for ResetStruct",1,["ping_rs::ping360::ResetStruct"]],["impl RefUnwindSafe for AutoDeviceDataStruct",1,["ping_rs::ping360::AutoDeviceDataStruct"]],["impl RefUnwindSafe for TransducerStruct",1,["ping_rs::ping360::TransducerStruct"]],["impl RefUnwindSafe for MotorOffStruct",1,["ping_rs::ping360::MotorOffStruct"]],["impl RefUnwindSafe for DeviceIdStruct",1,["ping_rs::ping360::DeviceIdStruct"]],["impl RefUnwindSafe for PingProtocolHead",1,["ping_rs::ping1d::PingProtocolHead"]],["impl RefUnwindSafe for Messages",1,["ping_rs::ping1d::Messages"]],["impl RefUnwindSafe for SetPingEnableStruct",1,["ping_rs::ping1d::SetPingEnableStruct"]],["impl RefUnwindSafe for PcbTemperatureStruct",1,["ping_rs::ping1d::PcbTemperatureStruct"]],["impl RefUnwindSafe for SpeedOfSoundStruct",1,["ping_rs::ping1d::SpeedOfSoundStruct"]],["impl RefUnwindSafe for DistanceStruct",1,["ping_rs::ping1d::DistanceStruct"]],["impl RefUnwindSafe for ProcessorTemperatureStruct",1,["ping_rs::ping1d::ProcessorTemperatureStruct"]],["impl RefUnwindSafe for RangeStruct",1,["ping_rs::ping1d::RangeStruct"]],["impl RefUnwindSafe for ContinuousStopStruct",1,["ping_rs::ping1d::ContinuousStopStruct"]],["impl RefUnwindSafe for PingIntervalStruct",1,["ping_rs::ping1d::PingIntervalStruct"]],["impl RefUnwindSafe for ContinuousStartStruct",1,["ping_rs::ping1d::ContinuousStartStruct"]],["impl RefUnwindSafe for SetDeviceIdStruct",1,["ping_rs::ping1d::SetDeviceIdStruct"]],["impl RefUnwindSafe for GotoBootloaderStruct",1,["ping_rs::ping1d::GotoBootloaderStruct"]],["impl RefUnwindSafe for SetPingIntervalStruct",1,["ping_rs::ping1d::SetPingIntervalStruct"]],["impl RefUnwindSafe for DeviceIdStruct",1,["ping_rs::ping1d::DeviceIdStruct"]],["impl RefUnwindSafe for ProfileStruct",1,["ping_rs::ping1d::ProfileStruct"]],["impl RefUnwindSafe for FirmwareVersionStruct",1,["ping_rs::ping1d::FirmwareVersionStruct"]],["impl RefUnwindSafe for TransmitDurationStruct",1,["ping_rs::ping1d::TransmitDurationStruct"]],["impl RefUnwindSafe for SetRangeStruct",1,["ping_rs::ping1d::SetRangeStruct"]],["impl RefUnwindSafe for SetModeAutoStruct",1,["ping_rs::ping1d::SetModeAutoStruct"]],["impl RefUnwindSafe for Voltage5Struct",1,["ping_rs::ping1d::Voltage5Struct"]],["impl RefUnwindSafe for ModeAutoStruct",1,["ping_rs::ping1d::ModeAutoStruct"]],["impl RefUnwindSafe for SetSpeedOfSoundStruct",1,["ping_rs::ping1d::SetSpeedOfSoundStruct"]],["impl RefUnwindSafe for GainSettingStruct",1,["ping_rs::ping1d::GainSettingStruct"]],["impl RefUnwindSafe for PingEnableStruct",1,["ping_rs::ping1d::PingEnableStruct"]],["impl RefUnwindSafe for DistanceSimpleStruct",1,["ping_rs::ping1d::DistanceSimpleStruct"]],["impl RefUnwindSafe for SetGainSettingStruct",1,["ping_rs::ping1d::SetGainSettingStruct"]],["impl RefUnwindSafe for GeneralInfoStruct",1,["ping_rs::ping1d::GeneralInfoStruct"]],["impl RefUnwindSafe for PingProtocolHead",1,["ping_rs::common::PingProtocolHead"]],["impl RefUnwindSafe for Messages",1,["ping_rs::common::Messages"]],["impl RefUnwindSafe for NackStruct",1,["ping_rs::common::NackStruct"]],["impl RefUnwindSafe for AsciiTextStruct",1,["ping_rs::common::AsciiTextStruct"]],["impl RefUnwindSafe for DeviceInformationStruct",1,["ping_rs::common::DeviceInformationStruct"]],["impl RefUnwindSafe for ProtocolVersionStruct",1,["ping_rs::common::ProtocolVersionStruct"]],["impl RefUnwindSafe for AckStruct",1,["ping_rs::common::AckStruct"]],["impl RefUnwindSafe for GeneralRequestStruct",1,["ping_rs::common::GeneralRequestStruct"]],["impl RefUnwindSafe for SetDeviceIdStruct",1,["ping_rs::common::SetDeviceIdStruct"]],["impl RefUnwindSafe for PingProtocolHead",1,["ping_rs::bluebps::PingProtocolHead"]],["impl RefUnwindSafe for Messages",1,["ping_rs::bluebps::Messages"]],["impl RefUnwindSafe for SetTemperatureMaxStruct",1,["ping_rs::bluebps::SetTemperatureMaxStruct"]],["impl RefUnwindSafe for SetCellVoltageTimeoutStruct",1,["ping_rs::bluebps::SetCellVoltageTimeoutStruct"]],["impl RefUnwindSafe for CellTimeoutStruct",1,["ping_rs::bluebps::CellTimeoutStruct"]],["impl RefUnwindSafe for RebootStruct",1,["ping_rs::bluebps::RebootStruct"]],["impl RefUnwindSafe for TemperatureMaxStruct",1,["ping_rs::bluebps::TemperatureMaxStruct"]],["impl RefUnwindSafe for SetTemperatureTimeoutStruct",1,["ping_rs::bluebps::SetTemperatureTimeoutStruct"]],["impl RefUnwindSafe for SetCurrentTimeoutStruct",1,["ping_rs::bluebps::SetCurrentTimeoutStruct"]],["impl RefUnwindSafe for EraseFlashStruct",1,["ping_rs::bluebps::EraseFlashStruct"]],["impl RefUnwindSafe for SetCurrentMaxStruct",1,["ping_rs::bluebps::SetCurrentMaxStruct"]],["impl RefUnwindSafe for TemperatureTimeoutStruct",1,["ping_rs::bluebps::TemperatureTimeoutStruct"]],["impl RefUnwindSafe for SetStreamRateStruct",1,["ping_rs::bluebps::SetStreamRateStruct"]],["impl RefUnwindSafe for SetCellVoltageMinimumStruct",1,["ping_rs::bluebps::SetCellVoltageMinimumStruct"]],["impl RefUnwindSafe for SetLpfSettingStruct",1,["ping_rs::bluebps::SetLpfSettingStruct"]],["impl RefUnwindSafe for CellVoltageMinStruct",1,["ping_rs::bluebps::CellVoltageMinStruct"]],["impl RefUnwindSafe for StateStruct",1,["ping_rs::bluebps::StateStruct"]],["impl RefUnwindSafe for CurrentTimeoutStruct",1,["ping_rs::bluebps::CurrentTimeoutStruct"]],["impl RefUnwindSafe for ResetDefaultsStruct",1,["ping_rs::bluebps::ResetDefaultsStruct"]],["impl RefUnwindSafe for SetLpfSampleFrequencyStruct",1,["ping_rs::bluebps::SetLpfSampleFrequencyStruct"]],["impl RefUnwindSafe for EventsStruct",1,["ping_rs::bluebps::EventsStruct"]],["impl RefUnwindSafe for CurrentMaxStruct",1,["ping_rs::bluebps::CurrentMaxStruct"]],["impl RefUnwindSafe for ParseError",1,["ping_rs::decoder::ParseError"]],["impl RefUnwindSafe for DecoderResult",1,["ping_rs::decoder::DecoderResult"]],["impl RefUnwindSafe for DecoderState",1,["ping_rs::decoder::DecoderState"]],["impl RefUnwindSafe for Decoder",1,["ping_rs::decoder::Decoder"]],["impl RefUnwindSafe for ProtocolMessage",1,["ping_rs::message::ProtocolMessage"]],["impl RefUnwindSafe for Messages",1,["ping_rs::Messages"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js b/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js index d47157f63..46f2b7f12 100644 --- a/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js +++ b/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js @@ -1,4 +1,4 @@ (function() {var implementors = { -"bytes":[["impl<T, U> UnwindSafe for Chain<T, U>where\n T: UnwindSafe,\n U: UnwindSafe,",1,["bytes::buf::chain::Chain"]],["impl<T> UnwindSafe for IntoIter<T>where\n T: UnwindSafe,",1,["bytes::buf::iter::IntoIter"]],["impl<T> UnwindSafe for Limit<T>where\n T: UnwindSafe,",1,["bytes::buf::limit::Limit"]],["impl<B> UnwindSafe for Reader<B>where\n B: UnwindSafe,",1,["bytes::buf::reader::Reader"]],["impl<T> UnwindSafe for Take<T>where\n T: UnwindSafe,",1,["bytes::buf::take::Take"]],["impl UnwindSafe for UninitSlice",1,["bytes::buf::uninit_slice::UninitSlice"]],["impl<B> UnwindSafe for Writer<B>where\n B: UnwindSafe,",1,["bytes::buf::writer::Writer"]],["impl UnwindSafe for Bytes",1,["bytes::bytes::Bytes"]],["impl UnwindSafe for BytesMut",1,["bytes::bytes_mut::BytesMut"]]], -"ping_rs":[["impl UnwindSafe for PingProtocolHead",1,["ping_rs::bluebps::PingProtocolHead"]],["impl UnwindSafe for Messages",1,["ping_rs::bluebps::Messages"]],["impl UnwindSafe for CellVoltageMinStruct",1,["ping_rs::bluebps::CellVoltageMinStruct"]],["impl UnwindSafe for SetTemperatureMaxStruct",1,["ping_rs::bluebps::SetTemperatureMaxStruct"]],["impl UnwindSafe for TemperatureTimeoutStruct",1,["ping_rs::bluebps::TemperatureTimeoutStruct"]],["impl UnwindSafe for RebootStruct",1,["ping_rs::bluebps::RebootStruct"]],["impl UnwindSafe for ResetDefaultsStruct",1,["ping_rs::bluebps::ResetDefaultsStruct"]],["impl UnwindSafe for SetCellVoltageTimeoutStruct",1,["ping_rs::bluebps::SetCellVoltageTimeoutStruct"]],["impl UnwindSafe for StateStruct",1,["ping_rs::bluebps::StateStruct"]],["impl UnwindSafe for CurrentTimeoutStruct",1,["ping_rs::bluebps::CurrentTimeoutStruct"]],["impl UnwindSafe for SetLpfSettingStruct",1,["ping_rs::bluebps::SetLpfSettingStruct"]],["impl UnwindSafe for SetStreamRateStruct",1,["ping_rs::bluebps::SetStreamRateStruct"]],["impl UnwindSafe for SetCellVoltageMinimumStruct",1,["ping_rs::bluebps::SetCellVoltageMinimumStruct"]],["impl UnwindSafe for SetLpfSampleFrequencyStruct",1,["ping_rs::bluebps::SetLpfSampleFrequencyStruct"]],["impl UnwindSafe for SetCurrentTimeoutStruct",1,["ping_rs::bluebps::SetCurrentTimeoutStruct"]],["impl UnwindSafe for CellTimeoutStruct",1,["ping_rs::bluebps::CellTimeoutStruct"]],["impl UnwindSafe for EraseFlashStruct",1,["ping_rs::bluebps::EraseFlashStruct"]],["impl UnwindSafe for SetTemperatureTimeoutStruct",1,["ping_rs::bluebps::SetTemperatureTimeoutStruct"]],["impl UnwindSafe for CurrentMaxStruct",1,["ping_rs::bluebps::CurrentMaxStruct"]],["impl UnwindSafe for TemperatureMaxStruct",1,["ping_rs::bluebps::TemperatureMaxStruct"]],["impl UnwindSafe for EventsStruct",1,["ping_rs::bluebps::EventsStruct"]],["impl UnwindSafe for SetCurrentMaxStruct",1,["ping_rs::bluebps::SetCurrentMaxStruct"]],["impl UnwindSafe for PingProtocolHead",1,["ping_rs::ping360::PingProtocolHead"]],["impl UnwindSafe for Messages",1,["ping_rs::ping360::Messages"]],["impl UnwindSafe for DeviceDataStruct",1,["ping_rs::ping360::DeviceDataStruct"]],["impl UnwindSafe for TransducerStruct",1,["ping_rs::ping360::TransducerStruct"]],["impl UnwindSafe for AutoTransmitStruct",1,["ping_rs::ping360::AutoTransmitStruct"]],["impl UnwindSafe for ResetStruct",1,["ping_rs::ping360::ResetStruct"]],["impl UnwindSafe for MotorOffStruct",1,["ping_rs::ping360::MotorOffStruct"]],["impl UnwindSafe for AutoDeviceDataStruct",1,["ping_rs::ping360::AutoDeviceDataStruct"]],["impl UnwindSafe for DeviceIdStruct",1,["ping_rs::ping360::DeviceIdStruct"]],["impl UnwindSafe for PingProtocolHead",1,["ping_rs::common::PingProtocolHead"]],["impl UnwindSafe for Messages",1,["ping_rs::common::Messages"]],["impl UnwindSafe for NackStruct",1,["ping_rs::common::NackStruct"]],["impl UnwindSafe for AsciiTextStruct",1,["ping_rs::common::AsciiTextStruct"]],["impl UnwindSafe for ProtocolVersionStruct",1,["ping_rs::common::ProtocolVersionStruct"]],["impl UnwindSafe for GeneralRequestStruct",1,["ping_rs::common::GeneralRequestStruct"]],["impl UnwindSafe for SetDeviceIdStruct",1,["ping_rs::common::SetDeviceIdStruct"]],["impl UnwindSafe for AckStruct",1,["ping_rs::common::AckStruct"]],["impl UnwindSafe for DeviceInformationStruct",1,["ping_rs::common::DeviceInformationStruct"]],["impl UnwindSafe for PingProtocolHead",1,["ping_rs::ping1d::PingProtocolHead"]],["impl UnwindSafe for Messages",1,["ping_rs::ping1d::Messages"]],["impl UnwindSafe for SetGainSettingStruct",1,["ping_rs::ping1d::SetGainSettingStruct"]],["impl UnwindSafe for ContinuousStartStruct",1,["ping_rs::ping1d::ContinuousStartStruct"]],["impl UnwindSafe for ProcessorTemperatureStruct",1,["ping_rs::ping1d::ProcessorTemperatureStruct"]],["impl UnwindSafe for FirmwareVersionStruct",1,["ping_rs::ping1d::FirmwareVersionStruct"]],["impl UnwindSafe for PingEnableStruct",1,["ping_rs::ping1d::PingEnableStruct"]],["impl UnwindSafe for SetPingEnableStruct",1,["ping_rs::ping1d::SetPingEnableStruct"]],["impl UnwindSafe for DistanceSimpleStruct",1,["ping_rs::ping1d::DistanceSimpleStruct"]],["impl UnwindSafe for GeneralInfoStruct",1,["ping_rs::ping1d::GeneralInfoStruct"]],["impl UnwindSafe for SetSpeedOfSoundStruct",1,["ping_rs::ping1d::SetSpeedOfSoundStruct"]],["impl UnwindSafe for PcbTemperatureStruct",1,["ping_rs::ping1d::PcbTemperatureStruct"]],["impl UnwindSafe for GotoBootloaderStruct",1,["ping_rs::ping1d::GotoBootloaderStruct"]],["impl UnwindSafe for ModeAutoStruct",1,["ping_rs::ping1d::ModeAutoStruct"]],["impl UnwindSafe for SetDeviceIdStruct",1,["ping_rs::ping1d::SetDeviceIdStruct"]],["impl UnwindSafe for ContinuousStopStruct",1,["ping_rs::ping1d::ContinuousStopStruct"]],["impl UnwindSafe for DeviceIdStruct",1,["ping_rs::ping1d::DeviceIdStruct"]],["impl UnwindSafe for SetRangeStruct",1,["ping_rs::ping1d::SetRangeStruct"]],["impl UnwindSafe for Voltage5Struct",1,["ping_rs::ping1d::Voltage5Struct"]],["impl UnwindSafe for ProfileStruct",1,["ping_rs::ping1d::ProfileStruct"]],["impl UnwindSafe for GainSettingStruct",1,["ping_rs::ping1d::GainSettingStruct"]],["impl UnwindSafe for RangeStruct",1,["ping_rs::ping1d::RangeStruct"]],["impl UnwindSafe for DistanceStruct",1,["ping_rs::ping1d::DistanceStruct"]],["impl UnwindSafe for SpeedOfSoundStruct",1,["ping_rs::ping1d::SpeedOfSoundStruct"]],["impl UnwindSafe for SetModeAutoStruct",1,["ping_rs::ping1d::SetModeAutoStruct"]],["impl UnwindSafe for TransmitDurationStruct",1,["ping_rs::ping1d::TransmitDurationStruct"]],["impl UnwindSafe for PingIntervalStruct",1,["ping_rs::ping1d::PingIntervalStruct"]],["impl UnwindSafe for SetPingIntervalStruct",1,["ping_rs::ping1d::SetPingIntervalStruct"]],["impl UnwindSafe for ParseError",1,["ping_rs::decoder::ParseError"]],["impl UnwindSafe for DecoderResult",1,["ping_rs::decoder::DecoderResult"]],["impl UnwindSafe for DecoderState",1,["ping_rs::decoder::DecoderState"]],["impl UnwindSafe for Decoder",1,["ping_rs::decoder::Decoder"]],["impl UnwindSafe for ProtocolMessage",1,["ping_rs::message::ProtocolMessage"]],["impl UnwindSafe for Messages",1,["ping_rs::Messages"]]] +"bytes":[["impl<T, U> UnwindSafe for Chain<T, U>
    where\n T: UnwindSafe,\n U: UnwindSafe,
    ",1,["bytes::buf::chain::Chain"]],["impl<T> UnwindSafe for IntoIter<T>
    where\n T: UnwindSafe,
    ",1,["bytes::buf::iter::IntoIter"]],["impl<T> UnwindSafe for Limit<T>
    where\n T: UnwindSafe,
    ",1,["bytes::buf::limit::Limit"]],["impl<B> UnwindSafe for Reader<B>
    where\n B: UnwindSafe,
    ",1,["bytes::buf::reader::Reader"]],["impl<T> UnwindSafe for Take<T>
    where\n T: UnwindSafe,
    ",1,["bytes::buf::take::Take"]],["impl UnwindSafe for UninitSlice",1,["bytes::buf::uninit_slice::UninitSlice"]],["impl<B> UnwindSafe for Writer<B>
    where\n B: UnwindSafe,
    ",1,["bytes::buf::writer::Writer"]],["impl UnwindSafe for Bytes",1,["bytes::bytes::Bytes"]],["impl UnwindSafe for BytesMut",1,["bytes::bytes_mut::BytesMut"]]], +"ping_rs":[["impl UnwindSafe for PingProtocolHead",1,["ping_rs::ping360::PingProtocolHead"]],["impl UnwindSafe for Messages",1,["ping_rs::ping360::Messages"]],["impl UnwindSafe for AutoTransmitStruct",1,["ping_rs::ping360::AutoTransmitStruct"]],["impl UnwindSafe for DeviceDataStruct",1,["ping_rs::ping360::DeviceDataStruct"]],["impl UnwindSafe for ResetStruct",1,["ping_rs::ping360::ResetStruct"]],["impl UnwindSafe for AutoDeviceDataStruct",1,["ping_rs::ping360::AutoDeviceDataStruct"]],["impl UnwindSafe for TransducerStruct",1,["ping_rs::ping360::TransducerStruct"]],["impl UnwindSafe for MotorOffStruct",1,["ping_rs::ping360::MotorOffStruct"]],["impl UnwindSafe for DeviceIdStruct",1,["ping_rs::ping360::DeviceIdStruct"]],["impl UnwindSafe for PingProtocolHead",1,["ping_rs::ping1d::PingProtocolHead"]],["impl UnwindSafe for Messages",1,["ping_rs::ping1d::Messages"]],["impl UnwindSafe for SetPingEnableStruct",1,["ping_rs::ping1d::SetPingEnableStruct"]],["impl UnwindSafe for PcbTemperatureStruct",1,["ping_rs::ping1d::PcbTemperatureStruct"]],["impl UnwindSafe for SpeedOfSoundStruct",1,["ping_rs::ping1d::SpeedOfSoundStruct"]],["impl UnwindSafe for DistanceStruct",1,["ping_rs::ping1d::DistanceStruct"]],["impl UnwindSafe for ProcessorTemperatureStruct",1,["ping_rs::ping1d::ProcessorTemperatureStruct"]],["impl UnwindSafe for RangeStruct",1,["ping_rs::ping1d::RangeStruct"]],["impl UnwindSafe for ContinuousStopStruct",1,["ping_rs::ping1d::ContinuousStopStruct"]],["impl UnwindSafe for PingIntervalStruct",1,["ping_rs::ping1d::PingIntervalStruct"]],["impl UnwindSafe for ContinuousStartStruct",1,["ping_rs::ping1d::ContinuousStartStruct"]],["impl UnwindSafe for SetDeviceIdStruct",1,["ping_rs::ping1d::SetDeviceIdStruct"]],["impl UnwindSafe for GotoBootloaderStruct",1,["ping_rs::ping1d::GotoBootloaderStruct"]],["impl UnwindSafe for SetPingIntervalStruct",1,["ping_rs::ping1d::SetPingIntervalStruct"]],["impl UnwindSafe for DeviceIdStruct",1,["ping_rs::ping1d::DeviceIdStruct"]],["impl UnwindSafe for ProfileStruct",1,["ping_rs::ping1d::ProfileStruct"]],["impl UnwindSafe for FirmwareVersionStruct",1,["ping_rs::ping1d::FirmwareVersionStruct"]],["impl UnwindSafe for TransmitDurationStruct",1,["ping_rs::ping1d::TransmitDurationStruct"]],["impl UnwindSafe for SetRangeStruct",1,["ping_rs::ping1d::SetRangeStruct"]],["impl UnwindSafe for SetModeAutoStruct",1,["ping_rs::ping1d::SetModeAutoStruct"]],["impl UnwindSafe for Voltage5Struct",1,["ping_rs::ping1d::Voltage5Struct"]],["impl UnwindSafe for ModeAutoStruct",1,["ping_rs::ping1d::ModeAutoStruct"]],["impl UnwindSafe for SetSpeedOfSoundStruct",1,["ping_rs::ping1d::SetSpeedOfSoundStruct"]],["impl UnwindSafe for GainSettingStruct",1,["ping_rs::ping1d::GainSettingStruct"]],["impl UnwindSafe for PingEnableStruct",1,["ping_rs::ping1d::PingEnableStruct"]],["impl UnwindSafe for DistanceSimpleStruct",1,["ping_rs::ping1d::DistanceSimpleStruct"]],["impl UnwindSafe for SetGainSettingStruct",1,["ping_rs::ping1d::SetGainSettingStruct"]],["impl UnwindSafe for GeneralInfoStruct",1,["ping_rs::ping1d::GeneralInfoStruct"]],["impl UnwindSafe for PingProtocolHead",1,["ping_rs::common::PingProtocolHead"]],["impl UnwindSafe for Messages",1,["ping_rs::common::Messages"]],["impl UnwindSafe for NackStruct",1,["ping_rs::common::NackStruct"]],["impl UnwindSafe for AsciiTextStruct",1,["ping_rs::common::AsciiTextStruct"]],["impl UnwindSafe for DeviceInformationStruct",1,["ping_rs::common::DeviceInformationStruct"]],["impl UnwindSafe for ProtocolVersionStruct",1,["ping_rs::common::ProtocolVersionStruct"]],["impl UnwindSafe for AckStruct",1,["ping_rs::common::AckStruct"]],["impl UnwindSafe for GeneralRequestStruct",1,["ping_rs::common::GeneralRequestStruct"]],["impl UnwindSafe for SetDeviceIdStruct",1,["ping_rs::common::SetDeviceIdStruct"]],["impl UnwindSafe for PingProtocolHead",1,["ping_rs::bluebps::PingProtocolHead"]],["impl UnwindSafe for Messages",1,["ping_rs::bluebps::Messages"]],["impl UnwindSafe for SetTemperatureMaxStruct",1,["ping_rs::bluebps::SetTemperatureMaxStruct"]],["impl UnwindSafe for SetCellVoltageTimeoutStruct",1,["ping_rs::bluebps::SetCellVoltageTimeoutStruct"]],["impl UnwindSafe for CellTimeoutStruct",1,["ping_rs::bluebps::CellTimeoutStruct"]],["impl UnwindSafe for RebootStruct",1,["ping_rs::bluebps::RebootStruct"]],["impl UnwindSafe for TemperatureMaxStruct",1,["ping_rs::bluebps::TemperatureMaxStruct"]],["impl UnwindSafe for SetTemperatureTimeoutStruct",1,["ping_rs::bluebps::SetTemperatureTimeoutStruct"]],["impl UnwindSafe for SetCurrentTimeoutStruct",1,["ping_rs::bluebps::SetCurrentTimeoutStruct"]],["impl UnwindSafe for EraseFlashStruct",1,["ping_rs::bluebps::EraseFlashStruct"]],["impl UnwindSafe for SetCurrentMaxStruct",1,["ping_rs::bluebps::SetCurrentMaxStruct"]],["impl UnwindSafe for TemperatureTimeoutStruct",1,["ping_rs::bluebps::TemperatureTimeoutStruct"]],["impl UnwindSafe for SetStreamRateStruct",1,["ping_rs::bluebps::SetStreamRateStruct"]],["impl UnwindSafe for SetCellVoltageMinimumStruct",1,["ping_rs::bluebps::SetCellVoltageMinimumStruct"]],["impl UnwindSafe for SetLpfSettingStruct",1,["ping_rs::bluebps::SetLpfSettingStruct"]],["impl UnwindSafe for CellVoltageMinStruct",1,["ping_rs::bluebps::CellVoltageMinStruct"]],["impl UnwindSafe for StateStruct",1,["ping_rs::bluebps::StateStruct"]],["impl UnwindSafe for CurrentTimeoutStruct",1,["ping_rs::bluebps::CurrentTimeoutStruct"]],["impl UnwindSafe for ResetDefaultsStruct",1,["ping_rs::bluebps::ResetDefaultsStruct"]],["impl UnwindSafe for SetLpfSampleFrequencyStruct",1,["ping_rs::bluebps::SetLpfSampleFrequencyStruct"]],["impl UnwindSafe for EventsStruct",1,["ping_rs::bluebps::EventsStruct"]],["impl UnwindSafe for CurrentMaxStruct",1,["ping_rs::bluebps::CurrentMaxStruct"]],["impl UnwindSafe for ParseError",1,["ping_rs::decoder::ParseError"]],["impl UnwindSafe for DecoderResult",1,["ping_rs::decoder::DecoderResult"]],["impl UnwindSafe for DecoderState",1,["ping_rs::decoder::DecoderState"]],["impl UnwindSafe for Decoder",1,["ping_rs::decoder::Decoder"]],["impl UnwindSafe for ProtocolMessage",1,["ping_rs::message::ProtocolMessage"]],["impl UnwindSafe for Messages",1,["ping_rs::Messages"]]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/std/io/trait.BufRead.js b/trait.impl/std/io/trait.BufRead.js index e6f66d2a7..a6a6ec075 100644 --- a/trait.impl/std/io/trait.BufRead.js +++ b/trait.impl/std/io/trait.BufRead.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"bytes":[["impl<B: Buf + Sized> BufRead for Reader<B>"]] +"bytes":[["impl<B: Buf + Sized> BufRead for Reader<B>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/std/io/trait.Read.js b/trait.impl/std/io/trait.Read.js index f2c346198..e45df8183 100644 --- a/trait.impl/std/io/trait.Read.js +++ b/trait.impl/std/io/trait.Read.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"bytes":[["impl<B: Buf + Sized> Read for Reader<B>"]] +"bytes":[["impl<B: Buf + Sized> Read for Reader<B>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/trait.impl/std/io/trait.Write.js b/trait.impl/std/io/trait.Write.js index 5c9306dde..d97e76d72 100644 --- a/trait.impl/std/io/trait.Write.js +++ b/trait.impl/std/io/trait.Write.js @@ -1,3 +1,3 @@ (function() {var implementors = { -"bytes":[["impl<B: BufMut + Sized> Write for Writer<B>"]] +"bytes":[["impl<B: BufMut + Sized> Write for Writer<B>"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file