[−][src]Struct bitvec::boxed::BitBox
A pointer type for owned bit sequences.
This type is essentially a &BitSlice
that owns its own memory. It can change
the contents of its domain, but it cannot change its own domain like BitVec
can. It is useful for fixed-size collections without lifetime tracking.
Type Parameters
C: Cursor
: An implementor of theCursor
trait. This type is used to convert semantic indices into concrete bit positions in elements, and store or retrieve bit values from the storage type.T: Bits
: An implementor of theBits
trait:u8
,u16
,u32
, oru64
. This is the actual type in memory that the box will use to store data.
Safety
The BitBox
handle has the same size as standard Rust Box<[T]>
handles, but
it is extremely binary incompatible with them. Attempting to treat
BitBox<_, T>
as Box<[T]>
in any manner except through the provided APIs is
catastrophically unsafe and unsound.
Trait Implementations
BitBox<C, T>
implements all the traits that BitSlice<C, T>
does, by
deferring to the BitSlice
implementation. It also implements conversion traits
to and from BitSlice
, and to/from BitVec
.
Methods
impl<C, T> BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
pub fn empty() -> Self
[src]
Constructs an empty boxed bitslice.
Returns
An empty BitBox
at an arbitrary location.
Examples
use bitvec::prelude::*; let bb: BitBox = BitBox::empty(); assert!(bb.is_empty());
pub fn from_element(elt: T) -> Self
[src]
Produces a BitBox
from a single element.
Parameters
elt
: The source element from which to make theBitBox
.
Returns
A BitBox
containing the provided element.
Examples
use bitvec::prelude::*; let bb: BitBox<BigEndian, u16> = BitBox::from_element(!0); assert!(bb.all());
pub fn from_slice(slice: &[T]) -> Self
[src]
Builds a BitBox
from a borrowed slice of elements.
Parameters
slice
: The source slice from which to make theBitBox
.
Returns
A BitBox
containing the (cloned) provided slice.
Panics
This function may panic if the provided slice is longer than the
BitBox
can support.
Examples
use bitvec::prelude::*; let src: &[u8] = &[5, 10]; let bv: BitBox = src.into(); assert!(bv[5]); assert!(bv[7]); assert!(bv[12]); assert!(bv[14]);
pub fn from_bitslice(slice: &BitSlice<C, T>) -> Self
[src]
Clones a &BitSlice
into a BitBox
.
Parameters
slice
: The bit slice to clone into a bit box.
Returns
A BitBox
containing the same bits as the source slice.
Examples
use bitvec::prelude::*; let src: &[u8] = &[0, !0]; let bs: &BitSlice = src.into(); let bb = BitBox::from_bitslice(bs); assert_eq!(bb.len(), 16); assert!(bb.some());
pub fn from_boxed_slice(slice: Box<[T]>) -> Self
[src]
Produces a BitBox
from an owned slice of elements.
Parameters
slice
: The source boxed slice from which to make theBitBox
.
Returns
A BitBox
governing the same slice that was passed in. This function
does not reallocate.
Panics
This function may panic if the provided slice is longer than the
BitBox
can support.
Examples
use bitvec::prelude::*; let slice: Box<[u16]> = vec![0, !0].into_boxed_slice(); let bb = BitBox::<LittleEndian, _>::from_boxed_slice(slice); assert!(bb.some()); assert_eq!(bb.len(), 32);
pub fn into_boxed_slice(self) -> Box<[T]>
[src]
Removes the BitBox
wrapper from a Box<[T]>
.
Parameters
self
Returns
The Box<[T]>
underneath self
.
Examples
use bitvec::prelude::*; let slice: Box<[u16]> = vec![0, !0].into_boxed_slice(); let bb = BitBox::<LittleEndian, _>::from_boxed_slice(slice); assert_eq!(bb.len(), 32); let slice = bb.into_boxed_slice(); assert_eq!(slice.len(), 2);
pub unsafe fn from_raw(pointer: BitPtr<T>) -> Self
[src]
Constructs a BitBox
from a raw BitPtr
.
After calling this function, the raw pointer is owned by the resulting
BitBox
. The BitBox
will deallocate the memory region it describes.
Parameters
pointer
: ABitPtr<T>
describing a region of owned memory. This must have previously produced byBitBox
constructors; it is unsound to even pass inBitPtr<T>
values taken fromBitVec<C, T>
handles.
Returns
An owned BitBox
over the given pointer.
Safety
Because Rust does not specify the allocation scheme used, the only
valid pointer to pass into this function is one that had previously been
produced by BitBox
constructors and extracted by BitBox::into_raw
.
This function is unsafe because improper use can lead to double-free
errors (constructing multiple BitBox
es from the same BitPtr
) or
allocator inconsistencies (arbitrary pointers).
pub unsafe fn into_raw(self) -> BitPtr<T>
[src]
Consumes the BitBox
, returning the wrapped BitPtr
directly.
After calling this function, the caller is responsible for the memory
previously managed by the BitBox
. In particular, the caller must
properly release the memory region to which the BitPtr
refers.
The proper way to do so is to convert the BitPtr
back into a BitBox
with the BitBox::from_raw
function.
pub fn leak<'a>(self) -> &'a mut BitSlice<C, T>
[src]
Consumes and leaks the BitBox
, returning a mutable reference,
&'a mut BitSlice<C, T>
. Note that the memory region [T]
must outlive
the chosen lifetime 'a
.
This function is mainly useful for bit regions that live for the
remainder of the program’s life. Dropping the returned reference will
cause a memory leak. If this is not acceptable, the reference should
first be wrapped with the Box::from_raw
function, producing a
BitBox
. This BitBox
can then be dropped which will properly
deallocate the memory.
Parameters
b
: TheBitBox
to deconstruct.
Returns
The slice formerly governed by the BitBox
, which will never
deallocate.
pub fn change_cursor<D>(self) -> BitBox<D, T> where
D: Cursor,
[src]
D: Cursor,
Changes the cursor on a box handle, without changing the data it governs.
Parameters
self
Returns
An equivalent handle to the same data, with a new cursor parameter.
pub fn as_bitslice(&self) -> &BitSlice<C, T>
[src]
Accesses the BitSlice<C, T>
to which the BitBox
refers.
Parameters
&self
Returns
The slice of bits behind the box.
pub fn as_mut_bitslice(&mut self) -> &mut BitSlice<C, T>
[src]
Accesses the BitSlice<C, T>
to which the BitBox
refers.
Parameters
&mut self
Returns
The slice of bits behind the box.
Methods from Deref<Target = BitSlice<C, T>>
pub fn len(&self) -> usize
[src]
Returns the number of bits contained in the BitSlice
.
Parameters
&self
Returns
The number of live bits in the slice domain.
Examples
use bitvec::prelude::*; let store: &[u8] = &[0]; let bv: &BitSlice = store.into(); assert_eq!(bv.len(), 8);
pub fn is_empty(&self) -> bool
[src]
Tests if the slice is empty.
Parameters
&self
Returns
Whether the slice has no live bits.
Examples
use bitvec::prelude::*; let bv: &BitSlice = BitSlice::empty(); assert!(bv.is_empty()); let bv: &BitSlice = (&[0u8] as &[u8]).into();; assert!(!bv.is_empty());
pub fn first(&self) -> Option<bool>
[src]
Gets the first element of the slice, if present.
Parameters
&self
Returns
None
if the slice is empty, or Some(bit)
if it is not.
Examples
use bitvec::prelude::*; assert!(BitSlice::<BigEndian, u8>::empty().first().is_none()); let bv: &BitSlice = (&[128u8] as &[u8]).into(); assert!(bv.first().unwrap());
pub fn split_first(&self) -> Option<(bool, &Self)>
[src]
Returns the first and all the rest of the bits of the slice, or None
if it is empty.
Parameters
&self
Returns
If the slice is empty, this returns None
, otherwise, it returns Some
of:
- the first bit
- a
&BitSlice
of all the rest of the bits (this may be empty)
Examples
use bitvec::prelude::*; assert!(BitSlice::<BigEndian, u8>::empty().split_first().is_none()); let store: &[u8] = &[128]; let bv: &BitSlice = store.into(); let (h, t) = bv.split_first().unwrap(); assert!(h); assert!(t.not_any()); let bv = &bv[0 .. 1]; let (h, t) = bv.split_first().unwrap(); assert!(h); assert!(t.is_empty());
pub fn split_first_mut(&mut self) -> Option<(bool, &mut Self)>
[src]
Returns the first and all the rest of the bits of the slice, or None
if it is empty.
Parameters
&self
Returns
If the slice is empty, this returns None
, otherwise, it returns Some
of:
- the first bit
- a
&mut BitSlice
of all the rest of the bits (this may be empty)
pub fn split_last(&self) -> Option<(bool, &Self)>
[src]
Returns the last and all the rest of the bits in the slice, or None
if it is empty.
Parameters
&self
Returns
If the slice is empty, this returns None
, otherwise, it returns Some
of:
- the last bit
- a
&BitSlice
of all the rest of the bits (this may be empty)
Examples
use bitvec::prelude::*; assert!(BitSlice::<BigEndian, u8>::empty().split_last().is_none()); let bv: &BitSlice = (&[1u8] as &[u8]).into(); let (t, h) = bv.split_last().unwrap(); assert!(t); assert!(h.not_any()); let bv = &bv[7 .. 8]; let (t, h) = bv.split_last().unwrap(); assert!(t); assert!(h.is_empty());
pub fn split_last_mut(&mut self) -> Option<(bool, &mut Self)>
[src]
Returns the last and all the rest of the bits in the slice, or None
if it is empty.
Parameters
&self
Returns
If the slice is empty, this returns None
, otherwise, it returns Some
of:
- the last bit
- a
&BitSlice
of all the rest of the bits (this may be empty)
pub fn last(&self) -> Option<bool>
[src]
Gets the last element of the slice, or None
if it is empty.
Parameters
&self
Returns
None
if the slice is empty, or Some(bit)
if it is not.
Examples
use bitvec::prelude::*; assert!(BitSlice::<BigEndian, u8>::empty().last().is_none()); let bv: &BitSlice = (&[1u8] as &[u8]).into(); assert!(bv.last().unwrap());
pub fn get(&self, index: usize) -> Option<bool>
[src]
Gets the bit value at the given position.
Parameters
&self
index
: The bit index to retrieve.
Returns
The bit at the specified index, if any.
Examples
use bitvec::prelude::*; let bv: &BitSlice = (&[8u8] as &[u8]).into(); assert!(bv.get(4).unwrap()); assert!(!bv.get(3).unwrap()); assert!(bv.get(10).is_none());
pub fn set(&mut self, index: usize, value: bool)
[src]
Sets the bit value at the given position.
Parameters
&mut self
index
: The bit index to set. It must be in the domain0 .. self.len()
.value
: The value to be set,true
for1
andfalse
for0
.
Panics
This method panics if index
is outside the slice domain.
Examples
use bitvec::prelude::*; let store: &mut [u8] = &mut [8u8]; let bv: &mut BitSlice = store.into(); assert!(!bv[3]); bv.set(3, true); assert!(bv[3]);
pub fn as_ptr(&self) -> *const T
[src]
Retrieves a read pointer to the start of the underlying data slice.
Parameters
&self
Returns
A pointer to the first element, partial or not, in the underlying store.
Safety
The caller must ensure that the slice outlives the pointer this function returns, or else it will dangle and point to garbage.
Modifying the container referenced by this slice may cause its buffer to reallocate, which would also make any pointers to it invalid.
Examples
use bitvec::prelude::*; let store: &[u8] = &[0; 4]; let bv: &BitSlice = store.into(); assert_eq!(store.as_ptr(), bv.as_ptr());
pub fn as_mut_ptr(&mut self) -> *mut T
[src]
Retrieves a write pointer to the start of the underlying data slice.
Parameters
&mut self
Returns
A pointer to the first element, partial or not, in the underlying store.
Safety
The caller must ensure that the slice outlives the pointer this function returns, or else it will dangle and point to garbage.
Modifying the container referenced by this slice may cause its buffer to reallocate, which would also make any pointers to it invalid.
Examples
use bitvec::prelude::*; let store: &mut [u8] = &mut[0; 4]; let store_ptr = store.as_mut_ptr(); let bv: &mut BitSlice = store.into(); assert_eq!(store_ptr, bv.as_mut_ptr());
pub fn swap(&mut self, a: usize, b: usize)
[src]
Swaps two bits in the slice.
Parameters
&mut self
a
: The first index to be swapped.b
: The second index to be swapped.
Panics
Panics if either a
or b
are out of bounds.
Examples
use bitvec::prelude::*; let store: &mut [u8] = &mut[32u8]; let bv: &mut BitSlice = store.into(); assert!(!bv[0]); assert!(bv[2]); bv.swap(0, 2); assert!(bv[0]); assert!(!bv[2]);
pub fn reverse(&mut self)
[src]
Reverses the order of bits in the slice, in place.
Parameters
&mut self
Examples
use bitvec::prelude::*; let store: &mut [u8] = &mut[0b1010_1010]; { let bv: &mut BitSlice = store.into(); bv[1 .. 7].reverse(); } eprintln!("{:b}", store[0]); assert_eq!(store[0], 0b1101_0100);
ⓘImportant traits for Iter<'a, C, T>pub fn iter(&self) -> Iter<C, T>
[src]
Provides read-only iteration across the slice domain.
The iterator returned from this method implements ExactSizeIterator
and DoubleEndedIterator
just as the consuming .into_iter()
method’s
iterator does.
Parameters
&self
Returns
An iterator over all bits in the slice domain, in C
and T
ordering.
Examples
use bitvec::prelude::*; let store: &[u8] = &[64]; let bv: &BitSlice = store.into(); let mut iter = bv[.. 2].iter(); assert!(!iter.next().unwrap()); assert!(iter.next().unwrap()); assert!(iter.next().is_none());
ⓘImportant traits for Windows<'a, C, T>pub fn windows(&self, size: usize) -> Windows<C, T>
[src]
Produces a sliding iterator over consecutive windows in the slice. Each
windows has the width size
. The windows overlap. If the slice is
shorter than size
, the produced iterator is empty.
Parameters
&self
size
: The width of each window.
Returns
An iterator which yields sliding views into the slice.
Panics
This function panics if the size
is zero.
Examples
use bitvec::prelude::*; let store: &[u8] = &[0b0100_1011]; let bv: &BitSlice = store.into(); let mut windows = bv.windows(4); assert_eq!(windows.next(), Some(&bv[0 .. 4])); assert_eq!(windows.next(), Some(&bv[1 .. 5])); assert_eq!(windows.next(), Some(&bv[2 .. 6])); assert_eq!(windows.next(), Some(&bv[3 .. 7])); assert_eq!(windows.next(), Some(&bv[4 .. 8])); assert!(windows.next().is_none());
ⓘImportant traits for Chunks<'a, C, T>pub fn chunks(&self, size: usize) -> Chunks<C, T>
[src]
Produces a galloping iterator over consecutive chunks in the slice. Each
chunk, except possibly the last, has the width size
. The chunks do not
overlap. If the slice is shorter than size
, the produced iterator
produces only one chunk.
Parameters
&self
size
: The width of each chunk.
Returns
An iterator which yields consecutive chunks of the slice.
Panics
This function panics if the size
is zero.
Examples
use bitvec::prelude::*; let store: &[u8] = &[0b0100_1011]; let bv: &BitSlice = store.into(); let mut chunks = bv.chunks(3); assert_eq!(chunks.next(), Some(&bv[0 .. 3])); assert_eq!(chunks.next(), Some(&bv[3 .. 6])); assert_eq!(chunks.next(), Some(&bv[6 .. 8])); assert!(chunks.next().is_none());
ⓘImportant traits for ChunksMut<'a, C, T>pub fn chunks_mut(&mut self, size: usize) -> ChunksMut<C, T>
[src]
Produces a galloping iterator over consecutive chunks in the slice. Each
chunk, except possibly the last, has the width size
. The chunks do not
overlap. If the slice is shorter than size
, the produced iterator
produces only one chunk.
Parameters
&mut self
size
: The width of each chunk.
Returns
An iterator which yields consecutive mutable chunks of the slice.
Panics
This function panics if the size
is zero.
ⓘImportant traits for ChunksExact<'a, C, T>pub fn chunks_exact(&self, size: usize) -> ChunksExact<C, T>
[src]
Produces a galloping iterator over consecutive chunks in the slice. Each
chunk has the width size
. If size
does not evenly divide the slice,
then the remainder is not part of the iteration, and can be accessed
separately with the .remainder()
method.
Parameters
&self
size
: The width of each chunk.
Returns
An iterator which yields consecutive chunks of the slice.
Panics
This function panics if size
is zero.
Examples
use bitvec::prelude::*; let store: &[u8] = &[0b0100_1011]; let bv: &BitSlice = store.into(); let mut chunks_exact = bv.chunks_exact(3); assert_eq!(chunks_exact.next(), Some(&bv[0 .. 3])); assert_eq!(chunks_exact.next(), Some(&bv[3 .. 6])); assert!(chunks_exact.next().is_none()); assert_eq!(chunks_exact.remainder(), &bv[6 .. 8]);
ⓘImportant traits for ChunksExactMut<'a, C, T>pub fn chunks_exact_mut(&mut self, size: usize) -> ChunksExactMut<C, T>
[src]
Produces a galloping iterator over consecutive chunks in the slice. Each
chunk has the width size
. If size
does not evenly divide the slice,
then the remainder is not part of the iteration, and can be accessed
separately with the .remainder()
method.
Parameters
&mut self
size
: The width of each chunk.
Returns
An iterator which yields consecutive mutable chunks of the slice.
Panics
This function panics if size
is zero.
ⓘImportant traits for RChunks<'a, C, T>pub fn rchunks(&self, size: usize) -> RChunks<C, T>
[src]
Produces a galloping iterator over consecutive chunks in the slice, from
the back to the front. Each chunk, except possibly the front, has the
width size
. The chunks do not overlap. If the slice is shorter than
size
, then the iterator produces one item.
Parameters
&self
size
: The width of each chunk.
Returns
An iterator which yields consecutive chunks of the slice, from the back to the front.
Panics
This function panics if size
is zero.
Examples
use bitvec::prelude::*; let store: &[u8] = &[0b0100_1011]; let bv: &BitSlice = store.into(); let mut rchunks = bv.rchunks(3); assert_eq!(rchunks.next(), Some(&bv[5 .. 8])); assert_eq!(rchunks.next(), Some(&bv[2 .. 5])); assert_eq!(rchunks.next(), Some(&bv[0 .. 2])); assert!(rchunks.next().is_none());
ⓘImportant traits for RChunksMut<'a, C, T>pub fn rchunks_mut(&mut self, size: usize) -> RChunksMut<C, T>
[src]
Produces a galloping iterator over consecutive chunks in the slice, from
the back to the front. Each chunk, except possibly the front, has the
width size
. The chunks do not overlap. If the slice is shorter than
size
, then the iterator produces one item.
Parameters
&mut self
size
: The width of each chunk.
Returns
An iterator which yields consecutive mutable chunks of the slice, from the back to the front.
Panics
This function panics if size
is zero.
ⓘImportant traits for RChunksExact<'a, C, T>pub fn rchunks_exact(&self, size: usize) -> RChunksExact<C, T>
[src]
Produces a galloping iterator over consecutive chunks in the slice, from
the back to the front. Each chunk has the width size
. If size
does
not evenly divide the slice, then the remainder is not part of the
iteration, and can be accessed separately with the .remainder()
method.
Parameters
&self
size
: The width of each chunk.
Returns
An iterator which yields consecutive chunks of the slice, from the back to the front.
Panics
This function panics if size
is zero.
Examples
use bitvec::prelude::*; let store: &[u8] = &[0b0100_1011]; let bv: &BitSlice = store.into(); let mut rchunks_exact = bv.rchunks_exact(3); assert_eq!(rchunks_exact.next(), Some(&bv[5 .. 8])); assert_eq!(rchunks_exact.next(), Some(&bv[2 .. 5])); assert!(rchunks_exact.next().is_none()); assert_eq!(rchunks_exact.remainder(), &bv[0 .. 2]);
ⓘImportant traits for RChunksExactMut<'a, C, T>pub fn rchunks_exact_mut(&mut self, size: usize) -> RChunksExactMut<C, T>
[src]
Produces a galloping iterator over consecutive chunks in the slice, from
the back to the front. Each chunk has the width size
. If size
does
not evenly divide the slice, then the remainder is not part of the
iteration, and can be accessed separately with the .remainder()
method.
Parameters
&mut self
size
: The width of each chunk.
Returns
An iterator which yields consecutive mutable chunks of the slice, from the back to the front.
Panics
This function panics if size
is zero.
pub fn split_at(&self, mid: usize) -> (&Self, &Self)
[src]
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).
Parameters
&self
mid
: The index at which to split
Returns
- The bits up to but not including
mid
. - The bits from mid onwards.
Panics
Panics if mid > self.len()
.
Examples
use bitvec::prelude::*; let store: &[u8] = &[0x0F]; let bv: &BitSlice = store.into(); let (l, r) = bv.split_at(0); assert!(l.is_empty()); assert_eq!(r, bv); let (l, r) = bv.split_at(4); assert_eq!(l, &bv[0 .. 4]); assert_eq!(r, &bv[4 .. 8]); let (l, r) = bv.split_at(8); assert_eq!(l, bv); assert!(r.is_empty());
pub fn split_at_mut(&mut self, mid: usize) -> (&mut Self, &mut Self)
[src]
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).
Parameters
&mut self
mid
: The index at which to split
Returns
- The bits up to but not including
mid
. - The bits from mid onwards.
Panics
Panics if mid > self.len()
.
pub fn starts_with<D, U>(&self, prefix: &BitSlice<D, U>) -> bool where
D: Cursor,
U: Bits,
[src]
D: Cursor,
U: Bits,
Tests if the slice begins with the given prefix.
Parameters
&self
prefix
: AnyBitSlice
against whichself
is tested. This is not required to have the same cursor or storage types asself
.
Returns
Whether self
begins with prefix
. This is true only if self
is at
least as long as prefix
and their bits are semantically equal.
Examples
use bitvec::prelude::*; let store: &[u8] = &[0xA6]; let bv: &BitSlice = store.into();; assert!(bv.starts_with(&bv[.. 3])); assert!(!bv.starts_with(&bv[3 ..]));
pub fn ends_with<D, U>(&self, suffix: &BitSlice<D, U>) -> bool where
D: Cursor,
U: Bits,
[src]
D: Cursor,
U: Bits,
Tests if the slice ends with the given suffix.
Parameters
&self
suffix
: AnyBitSlice
against whichself
is tested. This is not required to have the same cursor or storage types asself
.
Returns
Whether self
ends with suffix
. This is true only if self
is at
least as long as suffix
and their bits are semantically equal.
Examples
use bitvec::prelude::*; let store: &[u8] = &[0xA6]; let bv: &BitSlice = store.into(); assert!(bv.ends_with(&bv[5 ..])); assert!(!bv.ends_with(&bv[.. 5]));
pub fn rotate_left(&mut self, by: usize)
[src]
Rotates the slice, in place, to the left.
After calling this method, the bits from [.. by]
will be at the back
of the slice, and the bits from [by ..]
will be at the front. This
operates fully in-place.
In-place rotation of bits requires this method to take O(k × n)
time.
It is impossible to use machine intrinsics to perform galloping rotation
on bits.
Parameters
&mut self
by
: The number of bits by which to rotate left. This must be in the range0 ..= self.len()
. If it is0
orself.len()
, then this method is a no-op.
Examples
use bitvec::prelude::*; let store: &mut [u8] = &mut [0xF0]; let bv: &mut BitSlice = store.into(); bv.rotate_left(2); assert_eq!(bv.as_ref()[0], 0xC3);
pub fn rotate_right(&mut self, by: usize)
[src]
Rotates the slice, in place, to the right.
After calling this method, the bits from [self.len() - by ..]
will be
at the front of the slice, and the bits from [.. self.len() - by]
will
be at the back. This operates fully in-place.
In-place rotation of bits requires this method to take O(k × n)
time.
It is impossible to use machine intrinsics to perform galloping rotation
on bits.
Parameters
&mut self
by
: The number of bits by which to rotate right. This must be in the range0 ..= self.len()
. If it is0
orself.len
, then this method is a no-op.
Examples
use bitvec::prelude::*; let store: &mut [u8] = &mut [0xF0]; let bv: &mut BitSlice = store.into(); bv.rotate_right(2); assert_eq!(bv.as_ref()[0], 0x3C);
pub fn all(&self) -> bool
[src]
Tests if all bits in the slice domain are set (logical ∧
).
Truth Table
0 0 => 0
0 1 => 0
1 0 => 0
1 1 => 1
Parameters
&self
Returns
Whether all bits in the slice domain are set.
Examples
use bitvec::prelude::*; let store: &[u8] = &[0xFD]; let bv: &BitSlice = store.into(); assert!(bv[.. 4].all()); assert!(!bv[4 ..].all());
pub fn any(&self) -> bool
[src]
Tests if any bit in the slice is set (logical ∨
).
Truth Table
0 0 => 0
0 1 => 1
1 0 => 1
1 1 => 1
Parameters
&self
Returns
Whether any bit in the slice domain is set.
Examples
use bitvec::prelude::*; let store: &[u8] = &[0x40]; let bv: &BitSlice = store.into(); assert!(bv[.. 4].any()); assert!(!bv[4 ..].any());
pub fn not_all(&self) -> bool
[src]
Tests if any bit in the slice is unset (logical ¬∧
).
Truth Table
0 0 => 1
0 1 => 1
1 0 => 1
1 1 => 0
Parameters
- `&self
Returns
Whether any bit in the slice domain is unset.
Examples
use bitvec::prelude::*; let store: &[u8] = &[0xFD]; let bv: &BitSlice = store.into(); assert!(!bv[.. 4].not_all()); assert!(bv[4 ..].not_all());
pub fn not_any(&self) -> bool
[src]
Tests if all bits in the slice are unset (logical ¬∨
).
Truth Table
0 0 => 1
0 1 => 0
1 0 => 0
1 1 => 0
Parameters
&self
Returns
Whether all bits in the slice domain are unset.
Examples
use bitvec::prelude::*; let store: &[u8] = &[0x40]; let bv: &BitSlice = store.into(); assert!(!bv[.. 4].not_any()); assert!(bv[4 ..].not_any());
pub fn some(&self) -> bool
[src]
Tests whether the slice has some, but not all, bits set and some, but not all, bits unset.
This is false
if either all()
or not_any()
are true
.
Truth Table
0 0 => 0
0 1 => 1
1 0 => 1
1 1 => 0
Parameters
&self
Returns
Whether the slice domain has mixed content.
Examples
use bitvec::prelude::*; let store: &[u8] = &[0b111_000_10]; let bv: &BitSlice = store.into(); assert!(!bv[0 .. 3].some()); assert!(!bv[3 .. 6].some()); assert!(bv[6 ..].some());
pub fn count_ones(&self) -> usize
[src]
Counts how many bits are set high.
Parameters
&self
Returns
The number of high bits in the slice domain.
Examples
use bitvec::prelude::*; let store: &[u8] = &[0xFD, 0x25]; let bv: &BitSlice = store.into(); assert_eq!(bv.count_ones(), 10);
pub fn count_zeros(&self) -> usize
[src]
Counts how many bits are set low.
Parameters
&self
Returns
The number of low bits in the slice domain.
Examples
use bitvec::prelude::*; let store: &[u8] = &[0xFD, 0x25]; let bv: &BitSlice = store.into(); assert_eq!(bv.count_zeros(), 6);
pub fn set_all(&mut self, value: bool)
[src]
Set all bits in the slice to a value.
Parameters
&mut self
value
: The bit value to which all bits in the slice will be set.
Examples
use bitvec::prelude::*; let store: &mut [u8] = &mut [0]; let bv: &mut BitSlice = store.into(); bv[2 .. 6].set_all(true); assert_eq!(bv.as_ref(), &[0b0011_1100]); bv[3 .. 5].set_all(false); assert_eq!(bv.as_ref(), &[0b0010_0100]); bv[.. 1].set_all(true); assert_eq!(bv.as_ref(), &[0b1010_0100]);
pub fn for_each<F>(&mut self, func: F) where
F: Fn(usize, bool) -> bool,
[src]
F: Fn(usize, bool) -> bool,
Provides mutable traversal of the collection.
It is impossible to implement IndexMut
on BitSlice
, because bits do
not have addresses, so there can be no &mut u1
. This method allows the
client to receive an enumerated bit, and provide a new bit to set at
each index.
Parameters
&mut self
func
: A function which receives a(usize, bool)
pair of index and value, and returns a bool. It receives the bit at each position, and the return value is written back at that position.
Examples
use bitvec::prelude::*;
pub fn as_slice(&self) -> &[T]
[src]
Accesses the backing storage of the BitSlice
as a slice of its
elements.
Parameters
&self
Returns
A slice of all the elements that the BitSlice
uses for storage.
Examples
use bitvec::prelude::*; let store: &[u8] = &[0b0000_0001, 0b0100_0000]; let bs: &BitSlice = store.into(); let mut accum = 0; for elt in bs.as_slice() { accum += elt.count_ones(); } assert_eq!(accum, 2);
pub fn as_mut_slice(&mut self) -> &mut [T]
[src]
Accesses the underlying store.
Examples
use bitvec::prelude::*; let store: &mut [u8] = &mut [0b0000_0001, 0b0100_0000]; let bs: &mut BitSlice = store.into(); for elt in bs.as_mut_slice() { *elt += 2; } assert_eq!(&[3, 66], bs.as_slice());
pub fn change_cursor<D>(&self) -> &BitSlice<D, T> where
D: Cursor,
[src]
D: Cursor,
Changes the cursor type of the slice handle.
Parameters
&self
Returns
An equivalent slice handle with a new cursor type.
Type Parameters
D: Cursor
The new cursor type to use for the handle.
pub fn change_cursor_mut<D>(&mut self) -> &mut BitSlice<D, T> where
D: Cursor,
[src]
D: Cursor,
Changes the cursor type of the slice handle.
Parameters
&mut self
Returns
An equivalent slice handle with a new cursor type.
Type Parameters
D: Cursor
The new cursor type to use for the handle.
pub fn bitptr(&self) -> BitPtr<T>
[src]
Accesses the underlying pointer structure.
Parameters
&self
Returns
The BitPtr
structure of the slice handle.
Trait Implementations
impl<C, T> Sync for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
&BitBox
is safe to move across thread boundaries.
impl<C, T> Eq for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
impl<C, T> Into<Box<[T]>> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
impl<C, T> Ord for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
fn cmp(&self, rhs: &Self) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl<C, T> Send for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
BitBox
is safe to move across thread boundaries, as is &mut BitBox
.
impl<C, T> AsMut<BitSlice<C, T>> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
impl<C, T> AsMut<[T]> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
impl<A, B, C, D> PartialEq<BitBox<C, D>> for BitBox<A, B> where
A: Cursor,
B: Bits,
C: Cursor,
D: Bits,
[src]
A: Cursor,
B: Bits,
C: Cursor,
D: Bits,
fn eq(&self, rhs: &BitBox<C, D>) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<A, B, C, D> PartialEq<BitSlice<C, D>> for BitBox<A, B> where
A: Cursor,
B: Bits,
C: Cursor,
D: Bits,
[src]
A: Cursor,
B: Bits,
C: Cursor,
D: Bits,
fn eq(&self, rhs: &BitSlice<C, D>) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<A, B, C, D> PartialEq<BitBox<C, D>> for BitSlice<A, B> where
A: Cursor,
B: Bits,
C: Cursor,
D: Bits,
[src]
A: Cursor,
B: Bits,
C: Cursor,
D: Bits,
fn eq(&self, rhs: &BitBox<C, D>) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<C, T> Drop for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
impl<C, T> Clone for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<A, B, C, D> PartialOrd<BitBox<C, D>> for BitBox<A, B> where
A: Cursor,
B: Bits,
C: Cursor,
D: Bits,
[src]
A: Cursor,
B: Bits,
C: Cursor,
D: Bits,
fn partial_cmp(&self, rhs: &BitBox<C, D>) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<A, B, C, D> PartialOrd<BitSlice<C, D>> for BitBox<A, B> where
A: Cursor,
B: Bits,
C: Cursor,
D: Bits,
[src]
A: Cursor,
B: Bits,
C: Cursor,
D: Bits,
fn partial_cmp(&self, rhs: &BitSlice<C, D>) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<A, B, C, D> PartialOrd<BitBox<C, D>> for BitSlice<A, B> where
A: Cursor,
B: Bits,
C: Cursor,
D: Bits,
[src]
A: Cursor,
B: Bits,
C: Cursor,
D: Bits,
fn partial_cmp(&self, rhs: &BitBox<C, D>) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<C, T> AsRef<BitSlice<C, T>> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
impl<C, T> AsRef<[T]> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
impl<C, T, '_> From<&'_ BitSlice<C, T>> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
impl<C, T, '_> From<&'_ [T]> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
impl<C, T> From<BitVec<C, T>> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
impl<C, T> From<Box<[T]>> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
impl<C, T> From<BitBox<C, T>> for BitVec<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
impl<C, T> Default for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
impl<C, T> IntoIterator for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
type Item = bool
The type of the elements being iterated over.
type IntoIter = IntoIter<C, T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl<'a, C, T> IntoIterator for &'a BitBox<C, T> where
C: Cursor,
T: 'a + Bits,
[src]
C: Cursor,
T: 'a + Bits,
type Item = bool
The type of the elements being iterated over.
type IntoIter = <&'a BitSlice<C, T> as IntoIterator>::IntoIter
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl<C, T> DerefMut for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
impl<C, T> Deref for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
type Target = BitSlice<C, T>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl<C, T> Debug for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
impl<C, T> Display for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
impl<C, T> Add<BitBox<C, T>> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
type Output = Self
The resulting type after applying the +
operator.
fn add(self, addend: Self) -> Self::Output
[src]
impl<C, T> Neg for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
type Output = Self
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
impl<C, T> AddAssign<BitBox<C, T>> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
fn add_assign(&mut self, addend: Self)
[src]
impl<C, T> Not for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
type Output = Self
The resulting type after applying the !
operator.
fn not(self) -> Self::Output
[src]
impl<C, T, I> BitAnd<I> for BitBox<C, T> where
C: Cursor,
T: Bits,
I: IntoIterator<Item = bool>,
[src]
C: Cursor,
T: Bits,
I: IntoIterator<Item = bool>,
type Output = Self
The resulting type after applying the &
operator.
fn bitand(self, rhs: I) -> Self::Output
[src]
impl<C, T, I> BitOr<I> for BitBox<C, T> where
C: Cursor,
T: Bits,
I: IntoIterator<Item = bool>,
[src]
C: Cursor,
T: Bits,
I: IntoIterator<Item = bool>,
type Output = Self
The resulting type after applying the |
operator.
fn bitor(self, rhs: I) -> Self::Output
[src]
impl<C, T, I> BitXor<I> for BitBox<C, T> where
C: Cursor,
T: Bits,
I: IntoIterator<Item = bool>,
[src]
C: Cursor,
T: Bits,
I: IntoIterator<Item = bool>,
type Output = Self
The resulting type after applying the ^
operator.
fn bitxor(self, rhs: I) -> Self::Output
[src]
impl<C, T> Shl<usize> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
type Output = Self
The resulting type after applying the <<
operator.
fn shl(self, shamt: usize) -> Self::Output
[src]
impl<C, T> Shr<usize> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
type Output = Self
The resulting type after applying the >>
operator.
fn shr(self, shamt: usize) -> Self::Output
[src]
impl<C, T, I> BitAndAssign<I> for BitBox<C, T> where
C: Cursor,
T: Bits,
I: IntoIterator<Item = bool>,
[src]
C: Cursor,
T: Bits,
I: IntoIterator<Item = bool>,
fn bitand_assign(&mut self, rhs: I)
[src]
impl<C, T, I> BitOrAssign<I> for BitBox<C, T> where
C: Cursor,
T: Bits,
I: IntoIterator<Item = bool>,
[src]
C: Cursor,
T: Bits,
I: IntoIterator<Item = bool>,
fn bitor_assign(&mut self, rhs: I)
[src]
impl<C, T, I> BitXorAssign<I> for BitBox<C, T> where
C: Cursor,
T: Bits,
I: IntoIterator<Item = bool>,
[src]
C: Cursor,
T: Bits,
I: IntoIterator<Item = bool>,
fn bitxor_assign(&mut self, rhs: I)
[src]
impl<C, T> ShlAssign<usize> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
fn shl_assign(&mut self, shamt: usize)
[src]
impl<C, T> ShrAssign<usize> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
fn shr_assign(&mut self, shamt: usize)
[src]
impl<C, T> Index<usize> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
type Output = bool
The returned type after indexing.
fn index(&self, index: usize) -> &Self::Output
[src]
impl<C, T> Index<Range<usize>> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
type Output = BitSlice<C, T>
The returned type after indexing.
fn index(&self, range: Range<usize>) -> &Self::Output
[src]
impl<C, T> Index<RangeFrom<usize>> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
type Output = BitSlice<C, T>
The returned type after indexing.
fn index(&self, range: RangeFrom<usize>) -> &Self::Output
[src]
impl<C, T> Index<RangeFull> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
type Output = BitSlice<C, T>
The returned type after indexing.
fn index(&self, range: RangeFull) -> &Self::Output
[src]
impl<C, T> Index<RangeInclusive<usize>> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
type Output = BitSlice<C, T>
The returned type after indexing.
fn index(&self, range: RangeInclusive<usize>) -> &Self::Output
[src]
impl<C, T> Index<RangeTo<usize>> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
type Output = BitSlice<C, T>
The returned type after indexing.
fn index(&self, range: RangeTo<usize>) -> &Self::Output
[src]
impl<C, T> Index<RangeToInclusive<usize>> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
type Output = BitSlice<C, T>
The returned type after indexing.
fn index(&self, range: RangeToInclusive<usize>) -> &Self::Output
[src]
impl<C, T> IndexMut<Range<usize>> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
impl<C, T> IndexMut<RangeFrom<usize>> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
impl<C, T> IndexMut<RangeFull> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
impl<C, T> IndexMut<RangeInclusive<usize>> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
fn index_mut(&mut self, range: RangeInclusive<usize>) -> &mut Self::Output
[src]
impl<C, T> IndexMut<RangeTo<usize>> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
impl<C, T> IndexMut<RangeToInclusive<usize>> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
fn index_mut(&mut self, range: RangeToInclusive<usize>) -> &mut Self::Output
[src]
impl<C, T> Hash for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
fn hash<H: Hasher>(&self, hasher: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<C, T> BorrowMut<BitSlice<C, T>> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
fn borrow_mut(&mut self) -> &mut BitSlice<C, T>
[src]
impl<C, T> Borrow<BitSlice<C, T>> for BitBox<C, T> where
C: Cursor,
T: Bits,
[src]
C: Cursor,
T: Bits,
impl<C, T> Serialize for BitBox<C, T> where
C: Cursor,
T: Bits + Serialize,
[src]
C: Cursor,
T: Bits + Serialize,
impl<'de, C, T> Deserialize<'de> for BitBox<C, T> where
C: Cursor,
T: 'de + Bits + Deserialize<'de>,
[src]
C: Cursor,
T: 'de + Bits + Deserialize<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From<T> for T
[src]
impl<I> IntoIterator for I where
I: Iterator,
[src]
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?
fn into_iter(self) -> I
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,