Struct spinoso_array::TinyArray[][src]

pub struct TinyArray<T: Default>(_);
This is supported on crate feature tiny-array only.
Expand description

A contiguous growable array type based on TinyVec<[T; INLINE_CAPACITY]> that implements the small vector optimization.

TinyArray is an alternate implementation of Array that implements the small vector optimization. For TinyArrays less then INLINE_CAPACITY elements long, there is no heap allocation.

TinyArray provides a nearly identical API to the one in Array. There are two important differences:

  1. TinyVec<[T; INLINE_CAPACITY]> is used in some places where Vec<T> would have been used.
  2. Trait bounds on some methods are more restrictive and require elements to be Copy.

Similar to Array, TinyArray implements indexing and mutating APIs that make an ideal backend for the Ruby Array core class. In practice, this results in less generic, more single-use APIs. For example, instead of Vec::drain, TinyArray implements shift, shift_n, pop, and pop_n.

Similarly, slicing APIs are more specialized, such as first_n and last_n. Slicing APIs do not return Option, instead preferring to return an empty slice.

Examples

let mut ary = TinyArray::new();
ary.push(1);
ary.push(2);

assert_eq!(ary.len(), 2);
assert_eq!(ary[0], 1);

assert_eq!(ary.pop(), Some(2));
assert_eq!(ary.len(), 1);

ary[0] = 7;
assert_eq!(ary[0], 7);

ary.extend([1, 2, 3].iter().copied());

for x in &ary {
    println!("{}", x);
}
assert_eq!(ary, &[7, 1, 2, 3]);

Implementations

Construct a new, empty TinyArray<T>.

The vector will not allocate until more than INLINE_CAPACITY elements are pushed into it.

Examples

use spinoso_array::{INLINE_CAPACITY, TinyArray};
let ary: TinyArray<i32> = TinyArray::new();
assert!(ary.is_empty());
assert_eq!(ary.capacity(), INLINE_CAPACITY);

Construct a new, empty TinyArray<T> with the specified capacity.

The vector will be able to hold max(capacity, INLINE_CAPACITY) elements without reallocating. If capacity is less than or equal to INLINE_CAPACITY, the vector will not allocate.

It is important to note that although the returned vector has the capacity specified, the vector will have a zero length.

Examples

let mut ary: TinyArray<i32> = TinyArray::with_capacity(10);
assert_eq!(ary.len(), 0);
assert_eq!(ary.capacity(), 10);

// These are pushes all done without reallocating...
for i in 0..10 {
    ary.push(i);
}

// ...but this may make the vector reallocate
ary.push(11);

Constuct a new two-element TinyArray from the given arguments.

The vector is constructed without a heap allocation.

Examples

use spinoso_array::{INLINE_CAPACITY, TinyArray};
let ary = TinyArray::assoc(0, 100);
assert_eq!(ary.capacity(), INLINE_CAPACITY);
assert_eq!(ary.len(), 2);
assert_eq!(ary[0], 0);
assert_eq!(ary[1], 100);

Returns an iterator over the slice.

Examples

let ary = TinyArray::from(&[1, 2, 4]);
let mut iterator = ary.iter();

assert_eq!(iterator.next(), Some(&1));
assert_eq!(iterator.next(), Some(&2));
assert_eq!(iterator.next(), Some(&4));
assert_eq!(iterator.next(), None);

Returns an iterator that allows modifying each value.

Examples

let mut ary = TinyArray::from(&[1, 2, 4]);
for elem in ary.iter_mut() {
    *elem += 2;
}

assert_eq!(ary, &[3, 4, 6]);

Extracts a slice containing the entire vector.

Equivalent to &ary[..].

Examples

let ary = TinyArray::from(&[1, 2, 4]);
let four_index = ary.as_slice().binary_search(&4);
assert_eq!(four_index, Ok(2));

Extracts a mutable slice containing the entire vector.

Equivalent to &mut ary[..].

Examples

let mut ary = TinyArray::from(&[2, 1, 4]);
ary.as_mut_slice().sort();
assert_eq!(ary, &[1, 2, 4]);

Returns a raw pointer to the vector’s buffer.

The caller must ensure that the vector outlives the pointer this function returns, or else it will end up pointing to garbage. Modifying the vector may cause its buffer to be reallocated, which would also make any pointers to it invalid.

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.

Examples

let ary = TinyArray::from(&[1, 2, 4]);
let ary_ptr = ary.as_ptr();

unsafe {
    for i in 0..ary.len() {
        assert_eq!(*ary_ptr.add(i), 1 << i);
    }
}

Returns an unsafe mutable pointer to the vector’s buffer.

The caller must ensure that the vector outlives the pointer this function returns, or else it will end up pointing to garbage. Modifying the vector may cause its buffer to be reallocated, which would also make any pointers to it invalid.

Examples

This method is primarily used when mutating a Array via a raw pointer passed over FFI.

See the ARY_PTR macro in mruby.

Consume the array and return the inner TinyVec<[T; INLINE_CAPACITY]>.

Examples

use spinoso_array::{INLINE_CAPACITY, TinyArray};
let ary = TinyArray::from(&[1, 2, 4]);
let vec: TinyVec<[i32; INLINE_CAPACITY]> = ary.into_inner();

Consume the array and return its elements as a Vec<T>.

For TinyArrays with len() > INLINE_CAPACITY, this is a cheap operation that unwraps the spilled Vec from the TinyVec. For shorter arrays, this method will allocate.

Examples

let ary = TinyArray::from(&[1, 2, 4]);
let vec: Vec<i32> = ary.into_vec();

Converts the vector into Box<[T]>.

This will drop any excess capacity.

Examples

let ary = TinyArray::from(&[1, 2, 4]);
let slice: Box<[i32]> = ary.into_boxed_slice();

Returns the number of elements the vector can hold without reallocating.

The minimum capacity of a TinyArray is INLINE_CAPACITY. TinyArrays with capacity less than or equal to INLINE_CAPACITY are not allocated on the heap.

Examples

use spinoso_array::{INLINE_CAPACITY, TinyArray};
let ary: TinyArray<i32> = TinyArray::with_capacity(1);
assert_eq!(ary.capacity(), INLINE_CAPACITY);

let ary: TinyArray<i32> = TinyArray::with_capacity(10);
assert_eq!(ary.capacity(), 10);

Reserves capacity for at least additional more elements to be inserted in the given TinyArray<T>. The collection may reserve more space to avoid frequent reallocations. After calling reserve, capacity will be greater than or equal to self.len() + additional. Does nothing if capacity is already sufficient.

Panics

Panics if the new capacity overflows usize.

Examples

let mut ary = TinyArray::from(&[1]);
ary.reserve(10);
assert!(ary.capacity() >= 11);

Shrinks the capacity of the vector as much as possible.

It will drop down as close as possible to the length but the allocator may still inform the vector that there is space for a few more elements.

Examples

let mut ary = TinyArray::with_capacity(10);
ary.extend([1, 2, 3].iter().copied());
assert_eq!(ary.capacity(), 10);
ary.shrink_to_fit();
assert!(ary.capacity() >= 3);

Clears the vector, removing all values.

Note that this method has no effect on the allocated capacity of the vector.

Examples

let mut ary = TinyArray::from(&[1, 2, 4]);
let capacity = ary.capacity();
ary.clear();
assert!(ary.is_empty());
assert_eq!(ary.capacity(), capacity);

Returns the number of elements in the vector, also referred to as its ‘length’.

Examples

let ary = TinyArray::from(&[1, 2, 4]);
assert_eq!(ary.len(), 3);

Returns true if the vector contains no elements.

Examples

use spinoso_array::TinyArray;
let mut ary = TinyArray::new();
assert!(ary.is_empty());
ary.push(1);
assert!(!ary.is_empty());

Returns a reference to an element at the index.

Unlike Vec, this method does not support indexing with a range. See the slice method for retrieving a sub-slice from the array.

Examples

let ary = TinyArray::from(&[1, 2, 4]);
assert_eq!(ary.get(1), Some(&2));
assert_eq!(ary.get(3), None);

Deletes the element at the specified index, returning that element, or None if the index is out of range.

Examples

let mut ary = TinyArray::from(&[1, 2, 4]);
assert_eq!(ary.delete_at(1), Some(2));
assert_eq!(ary.delete_at(10), None);

Returns the first element from the vector, or None if the vector is empty.

To retrieve a slice of the first elements in the vector, use first_n.

Examples

let mut ary = TinyArray::new();
assert_eq!(ary.first(), None);
ary.push(1);
assert_eq!(ary.first(), Some(&1));
ary.push(2);
assert_eq!(ary.first(), Some(&1));

Returns up to n of the first elements from the vector, or &[] if the vector is empty.

To retrieve only the first element in the vector, use first.

Examples

let mut ary = TinyArray::new();
assert_eq!(ary.first_n(0), &[]);
assert_eq!(ary.first_n(4), &[]);

ary.push(1);
ary.push(2);
assert_eq!(ary.first_n(0), &[]);
assert_eq!(ary.first_n(4), &[1, 2]);

ary.concat(&[3, 4, 5, 6, 7, 8, 9, 10]);
assert_eq!(ary.first_n(0), &[]);
assert_eq!(ary.first_n(4), &[1, 2, 3, 4]);

Returns the last element from the vector, or None if the vector is empty.

To retrieve a slice of the last elements in the vector, use last_n.

Examples

let mut ary = TinyArray::new();
assert_eq!(ary.last(), None);
ary.push(1);
assert_eq!(ary.last(), Some(&1));
ary.push(2);
assert_eq!(ary.last(), Some(&2));

Returns up to n of the last elements from the vector, or &[] if the vector is empty.

To retrieve only the last element in the vector, use last.

Examples

let mut ary = TinyArray::new();
assert_eq!(ary.last_n(0), &[]);
assert_eq!(ary.last_n(4), &[]);

ary.push(1);
ary.push(2);
assert_eq!(ary.last_n(0), &[]);
assert_eq!(ary.last_n(4), &[1, 2]);

ary.concat(&[3, 4, 5, 6, 7, 8, 9, 10]);
assert_eq!(ary.last_n(0), &[]);
assert_eq!(ary.last_n(4), &[7, 8, 9, 10]);

Returns a slice of the underlying vector that includes only the first n elements.

If n is greater than or equal to the length of the vector, &self[..] is returned.

The inverse of this operation is drop_n.

Examples

let ary = TinyArray::from(&[1, 2, 4, 7, 8, 9]);
assert_eq!(ary.take_n(0), &[]);
assert_eq!(ary.take_n(2), &[1, 2]);
assert_eq!(ary.take_n(10), &[1, 2, 4, 7, 8, 9]);

Returns a slice of the underlying vector that excludes the first n elements.

If n is greater than or equal to the length of the vector, &[] is returned.

The inverse of this operation is take_n.

Examples

let ary = TinyArray::from(&[1, 2, 4, 7, 8, 9]);
assert_eq!(ary.drop_n(0), &[1, 2, 4, 7, 8, 9]);
assert_eq!(ary.drop_n(4), &[8, 9]);
assert_eq!(ary.drop_n(10), &[]);

Removes the last element from the vector and returns it, or None if the vector is empty.

To pop more than one element from the end of the vector, use pop_n.

Examples

let mut ary = TinyArray::from(&[1, 2, 4]);
assert_eq!(ary.pop(), Some(4));
assert_eq!(ary, &[1, 2]);

Removes the last n elements from the vector.

To pop a single element from the end of the vector, use pop.

Examples

let mut ary = TinyArray::from(&[1, 2, 4, 7, 8, 9]);
assert_eq!(ary.pop_n(0), &[]);
assert_eq!(ary, &[1, 2, 4, 7, 8, 9]);

assert_eq!(ary.pop_n(3), &[7, 8, 9]);
assert_eq!(ary, &[1, 2, 4]);

assert_eq!(ary.pop_n(100), &[1, 2, 4]);
assert!(ary.is_empty());

assert_eq!(ary.pop_n(1), &[]);
assert!(ary.is_empty());

Appends an element to the back of the vector.

To push more than one element to the end of the vector, use concat or extend.

Panics

Panics if the number of elements in the vector overflows a usize.

Examples

let mut ary = TinyArray::from(&[1, 2]);
ary.push(3);
assert_eq!(ary, &[1, 2, 3]);

Reverses the order of elements of the vector, in place.

Examples

let mut ary = TinyArray::from(&[1, 2, 4]);
ary.reverse();
assert_eq!(ary, &[4, 2, 1]);

Removes the first element of the vector and returns it (shifting all other elements down by one). Returns None if the vector is empty.

This operation is also known as “pop front”.

To remove more than one element from the front of the vector, use shift_n.

Examples

let mut ary = TinyArray::from(&[1, 2]);
assert_eq!(ary.shift(), Some(1));
assert_eq!(ary.shift(), Some(2));
assert_eq!(ary.shift(), None);

Removes the first n elements from the vector.

To shift a single element from the front of the vector, use shift.

Examples

let mut ary = TinyArray::from(&[1, 2, 4, 7, 8, 9]);
assert_eq!(ary.shift_n(0), &[]);
assert_eq!(ary, &[1, 2, 4, 7, 8, 9]);

assert_eq!(ary.shift_n(3), &[1, 2, 4]);
assert_eq!(ary, &[7, 8, 9]);

assert_eq!(ary.shift_n(100), &[7, 8, 9]);
assert!(ary.is_empty());

assert_eq!(ary.shift_n(1), &[]);
assert!(ary.is_empty());

Inserts an element to the front of the vector.

To insert more than one element to the front of the vector, use unshift_n.

This operation is also known as “prepend”.

Panics

Panics if the number of elements in the vector overflows a usize.

Examples

let mut ary = TinyArray::from(&[1, 2]);
ary.unshift(3);
assert_eq!(ary, &[3, 1, 2]);

Return a reference to a subslice of the vector.

This function always returns a slice. If the range specified by start and end overlaps the vector (even if only partially), the overlapping slice is returned. If the range does not overlap the vector, an empty slice is returned.

Examples

let empty: TinyArray<i32> = TinyArray::new();
assert_eq!(empty.slice(0, 0), &[]);
assert_eq!(empty.slice(0, 4), &[]);
assert_eq!(empty.slice(2, 4), &[]);

let ary = TinyArray::from(&[1, 2, 3]);
assert_eq!(ary.slice(0, 0), &[]);
assert_eq!(ary.slice(0, 4), &[1, 2, 3]);
assert_eq!(ary.slice(2, 0), &[]);
assert_eq!(ary.slice(2, 4), &[3]);
assert_eq!(ary.slice(10, 100), &[]);

Construct a new TinyArray<T> with length len and all elements set to default. The TinyArray will have capacity at least len.

Examples

let ary: TinyArray<&str> = TinyArray::with_len_and_default(3, "spinoso");
assert_eq!(ary.len(), 3);
assert!(ary.capacity() >= 3);
assert_eq!(ary, &["spinoso", "spinoso", "spinoso"]);

Appends the elements of other to self.

Slice version of extend. This operation is analogous to “push n”.

Examples

let mut ary = TinyArray::from(&[1, 2, 4]);
ary.concat(&[7, 8, 9]);
assert_eq!(ary.len(), 6);

Prepends the elements of other to self.

To insert one element to the front of the vector, use unshift.

This operation is also known as “prepend”.

Panics

Panics if the number of elements in the vector overflows a usize.

Examples

let mut ary = TinyArray::from(&[1, 2]);
ary.unshift_n(&[0, 5, 9]);
assert_eq!(ary, &[0, 5, 9, 1, 2]);

Creates a new array by repeating this array n times.

This function will not panic. If the resulting Array’s capacity would overflow, None is returned.

Examples

Basic usage:

let mut ary = TinyArray::from(&[1, 2]);
let repeated_ary = ary.repeat(3)?;
assert_eq!(repeated_ary, &[1, 2, 1, 2, 1, 2]);

None should be returned on overflow:

let mut ary = TinyArray::from(&[1, 2]);
let repeated_ary = ary.repeat(usize::MAX);
assert_eq!(repeated_ary, None);

Set element at position index within the vector, extending the vector with T::default() if index is out of bounds.

Examples

let mut ary = TinyArray::from(&[1, 2 ,4]);
ary.set(1, 11);
assert_eq!(ary, &[1, 11, 4]);
ary.set(5, 263);
assert_eq!(ary, &[1, 11, 4, 0, 0, 263]);

let mut ary: TinyArray<i32> = TinyArray::from(&[]);
ary.set(5, 11);
assert_eq!(ary, &[0, 0, 0, 0, 0, 11]);

Insert element at position start within the vector and remove the following drain elements. If start is out of bounds, the vector will be extended with T::default().

This method sets a slice of the TinyArray to a single element, including the zero-length slice. It is similar in intent to calling Vec::splice with a one-element iterator.

set_with_drain will only drain up to the end of the vector.

To set a single element without draining, use set.

Examples

let mut ary = TinyArray::from(&[1, 2, 4]);
ary.set_with_drain(1, 0, 10);
assert_eq!(ary, &[1, 10, 2, 4]);
ary.set_with_drain(2, 5, 20);
assert_eq!(ary, &[1, 10, 20]);
ary.set_with_drain(5, 5, 30);
assert_eq!(ary, &[1, 10, 20, 0, 0, 30]);

Insert the elements from a slice at a position index in the vector, extending the vector with T::default() if index is out of bounds.

This method is similar to Vec::splice when called with a zero-length range.

Examples

let mut ary = TinyArray::from(&[1, 2, 4]);
ary.insert_slice(1, &[7, 8, 9]);
assert_eq!(ary, &[1, 7, 8, 9, 2, 4]);
ary.insert_slice(8, &[100, 200]);
assert_eq!(ary, &[1, 7, 8, 9, 2, 4, 0, 0, 100, 200]);

Insert the elements from a slice at a position index in the vector and remove the following drain elements. The vector is extended with T::default() if index is out of bounds.

This method is similar to Vec::splice when called with a nonzero-length range.

When called with drain == 0, this method is equivalent to insert_slice.

If drain >= src.len() or the tail of the vector is replaced, this method is efficient. Otherwise, a temporary buffer is used to move the elements.

Examples

let mut ary = TinyArray::from(&[1, 2, 4]);
ary.set_slice(1, 5, &[7, 8, 9]);
assert_eq!(ary, &[1, 7, 8, 9]);
ary.set_slice(6, 1, &[100, 200]);
assert_eq!(ary, &[1, 7, 8, 9, 0, 0, 100, 200]);
ary.set_slice(4, 2, &[88, 99]);
assert_eq!(ary, &[1, 7, 8, 9, 88, 99, 100, 200]);
ary.set_slice(6, 2, &[1000, 2000, 3000, 4000]);
assert_eq!(ary, &[1, 7, 8, 9, 88, 99, 1000, 2000, 3000, 4000]);

Trait Implementations

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Extends a collection with the contents of an iterator. Read more

🔬 This is a nightly-only experimental API. (extend_one)

Extends a collection with exactly one element.

🔬 This is a nightly-only experimental API. (extend_one)

Reserves capacity in a collection for the given number of additional elements. Read more

Extends a collection with the contents of an iterator. Read more

🔬 This is a nightly-only experimental API. (extend_one)

Extends a collection with exactly one element.

🔬 This is a nightly-only experimental API. (extend_one)

Reserves capacity in a collection for the given number of additional elements. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Creates a value from an iterator. Read more

Creates a value from an iterator. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

Performs the mutable indexing (container[index]) operation. Read more

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.