Skip to main content

ValidatorsVec

Struct ValidatorsVec 

Source
pub struct ValidatorsVec(/* private fields */);
Expand description

ValidatorsVec is a wrapper over non-empty vector of Address. It is needed because NonEmpty does not implement Encode and Decode.

Methods from Deref<Target = NonEmpty<Address>>§

Source

pub fn as_ref(&self) -> NonEmpty<&T>

Converts from &NonEmpty<T> to NonEmpty<&T>.

Source

pub fn is_empty(&self) -> bool

Always returns false.

Source

pub fn first(&self) -> &T

Get the first element. Never fails.

Source

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

Get the mutable reference to the first element. Never fails.

§Examples
use nonempty::NonEmpty;

let mut non_empty = NonEmpty::new(42);
let head = non_empty.first_mut();
*head += 1;
assert_eq!(non_empty.first(), &43);

let mut non_empty = NonEmpty::from((1, vec![4, 2, 3]));
let head = non_empty.first_mut();
*head *= 42;
assert_eq!(non_empty.first(), &42);
Source

pub fn tail(&self) -> &[T]

Get the possibly-empty tail of the list.

use nonempty::NonEmpty;

let non_empty = NonEmpty::new(42);
assert_eq!(non_empty.tail(), &[]);

let non_empty = NonEmpty::from((1, vec![4, 2, 3]));
assert_eq!(non_empty.tail(), &[4, 2, 3]);
Source

pub fn push(&mut self, e: T)

Push an element to the end of the list.

Source

pub fn pop(&mut self) -> Option<T>

Pop an element from the end of the list.

Source

pub fn insert(&mut self, index: usize, element: T)

Inserts an element at position index within the vector, shifting all elements after it to the right.

§Panics

Panics if index > len.

§Examples
use nonempty::NonEmpty;

let mut non_empty = NonEmpty::from((1, vec![2, 3]));
non_empty.insert(1, 4);
assert_eq!(non_empty, NonEmpty::from((1, vec![4, 2, 3])));
non_empty.insert(4, 5);
assert_eq!(non_empty, NonEmpty::from((1, vec![4, 2, 3, 5])));
non_empty.insert(0, 42);
assert_eq!(non_empty, NonEmpty::from((42, vec![1, 4, 2, 3, 5])));
Source

pub fn len(&self) -> usize

Get the length of the list.

Source

pub fn len_nonzero(&self) -> NonZero<usize>

Gets the length of the list as a NonZeroUsize.

Source

pub fn capacity(&self) -> NonZero<usize>

Get the capacity of the list.

Source

pub fn last(&self) -> &T

Get the last element. Never fails.

Source

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

Get the last element mutably.

Source

pub fn contains(&self, x: &T) -> bool
where T: PartialEq,

Check whether an element is contained in the list.

use nonempty::NonEmpty;

let mut l = NonEmpty::from((42, vec![36, 58]));

assert!(l.contains(&42));
assert!(!l.contains(&101));
Source

pub fn get(&self, index: usize) -> Option<&T>

Get an element by index.

Source

pub fn get_mut(&mut self, index: usize) -> Option<&mut T>

Get an element by index, mutably.

Source

pub fn truncate(&mut self, len: usize)

Truncate the list to a certain size. Must be greater than 0.

Source

pub fn iter(&self) -> Iter<'_, T>

use nonempty::NonEmpty;

let mut l = NonEmpty::from((42, vec![36, 58]));

let mut l_iter = l.iter();

assert_eq!(l_iter.len(), 3);
assert_eq!(l_iter.next(), Some(&42));
assert_eq!(l_iter.next(), Some(&36));
assert_eq!(l_iter.next(), Some(&58));
assert_eq!(l_iter.next(), None);
Source

pub fn iter_mut(&mut self) -> impl DoubleEndedIterator

use nonempty::NonEmpty;

let mut l = NonEmpty::new(42);
l.push(36);
l.push(58);

for i in l.iter_mut() {
    *i *= 10;
}

let mut l_iter = l.iter();

assert_eq!(l_iter.next(), Some(&420));
assert_eq!(l_iter.next(), Some(&360));
assert_eq!(l_iter.next(), Some(&580));
assert_eq!(l_iter.next(), None);
Source

pub fn split_first(&self) -> (&T, &[T])

Deconstruct a NonEmpty into its head and tail. This operation never fails since we are guaranteed to have a head element.

§Example Use
use nonempty::NonEmpty;

let mut non_empty = NonEmpty::from((1, vec![2, 3, 4, 5]));

// Guaranteed to have the head and we also get the tail.
assert_eq!(non_empty.split_first(), (&1, &[2, 3, 4, 5][..]));

let non_empty = NonEmpty::new(1);

// Guaranteed to have the head element.
assert_eq!(non_empty.split_first(), (&1, &[][..]));
Source

pub fn split(&self) -> (&T, &[T], Option<&T>)

Deconstruct a NonEmpty into its first, last, and middle elements, in that order.

If there is only one element then last is None.

§Example Use
use nonempty::NonEmpty;

let mut non_empty = NonEmpty::from((1, vec![2, 3, 4, 5]));

// When there are two or more elements, the last element is represented
// as a `Some`. Elements preceding it, except for the first, are returned
// in the middle.
assert_eq!(non_empty.split(), (&1, &[2, 3, 4][..], Some(&5)));

let non_empty = NonEmpty::new(1);

// The last element is `None` when there's only one element.
assert_eq!(non_empty.split(), (&1, &[][..], None));
Source

pub fn append(&mut self, other: &mut Vec<T>)

Append a Vec to the tail of the NonEmpty.

§Example Use
use nonempty::NonEmpty;

let mut non_empty = NonEmpty::new(1);
let mut vec = vec![2, 3, 4, 5];
non_empty.append(&mut vec);

let mut expected = NonEmpty::from((1, vec![2, 3, 4, 5]));

assert_eq!(non_empty, expected);

Binary searches this sorted non-empty vector for a given element.

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.

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.

§Examples
use nonempty::NonEmpty;

let non_empty = NonEmpty::from((0, vec![1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]));
assert_eq!(non_empty.binary_search(&0),   Ok(0));
assert_eq!(non_empty.binary_search(&13),  Ok(9));
assert_eq!(non_empty.binary_search(&4),   Err(7));
assert_eq!(non_empty.binary_search(&100), Err(13));
let r = non_empty.binary_search(&1);
assert!(match r { Ok(1..=4) => true, _ => false, });

If you want to insert an item to a sorted non-empty vector, while maintaining sort order:

use nonempty::NonEmpty;

let mut non_empty = NonEmpty::from((0, vec![1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]));
let num = 42;
let idx = non_empty.binary_search(&num).unwrap_or_else(|x| x);
non_empty.insert(idx, num);
assert_eq!(non_empty, NonEmpty::from((0, vec![1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 42, 55])));
Source

pub fn binary_search_by<'a, F>(&'a self, f: F) -> Result<usize, usize>
where F: FnMut(&'a T) -> Ordering,

Binary searches this sorted non-empty with a comparator function.

The comparator function should implement an order consistent with the sort order of the underlying slice, returning an order code that indicates whether its argument is Less, Equal or Greater the desired target.

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. 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.

§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].

use nonempty::NonEmpty;

let non_empty = NonEmpty::from((0, vec![1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55]));
let seek = 0;
assert_eq!(non_empty.binary_search_by(|probe| probe.cmp(&seek)), Ok(0));
let seek = 13;
assert_eq!(non_empty.binary_search_by(|probe| probe.cmp(&seek)), Ok(9));
let seek = 4;
assert_eq!(non_empty.binary_search_by(|probe| probe.cmp(&seek)), Err(7));
let seek = 100;
assert_eq!(non_empty.binary_search_by(|probe| probe.cmp(&seek)), Err(13));
let seek = 1;
let r = non_empty.binary_search_by(|probe| probe.cmp(&seek));
assert!(match r { Ok(1..=4) => true, _ => false, });
Source

pub fn binary_search_by_key<'a, B, F>( &'a self, b: &B, f: F, ) -> Result<usize, usize>
where B: Ord, F: FnMut(&'a T) -> B,

Binary searches this sorted non-empty vector with a key extraction function.

Assumes that the vector is sorted by the key.

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. 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.

§Examples

Looks up a series of four elements in a non-empty vector of pairs sorted by their second 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].

use nonempty::NonEmpty;

let non_empty = NonEmpty::from((
    (0, 0),
    vec![(2, 1), (4, 1), (5, 1), (3, 1),
         (1, 2), (2, 3), (4, 5), (5, 8), (3, 13),
         (1, 21), (2, 34), (4, 55)]
));

assert_eq!(non_empty.binary_search_by_key(&0, |&(a,b)| b),  Ok(0));
assert_eq!(non_empty.binary_search_by_key(&13, |&(a,b)| b),  Ok(9));
assert_eq!(non_empty.binary_search_by_key(&4, |&(a,b)| b),   Err(7));
assert_eq!(non_empty.binary_search_by_key(&100, |&(a,b)| b), Err(13));
let r = non_empty.binary_search_by_key(&1, |&(a,b)| b);
assert!(match r { Ok(1..=4) => true, _ => false, });
Source

pub fn maximum(&self) -> &T
where T: Ord,

Returns the maximum element in the non-empty vector.

This will return the first item in the vector if the tail is empty.

§Examples
use nonempty::NonEmpty;

let non_empty = NonEmpty::new(42);
assert_eq!(non_empty.maximum(), &42);

let non_empty = NonEmpty::from((1, vec![-34, 42, 76, 4, 5]));
assert_eq!(non_empty.maximum(), &76);
Source

pub fn minimum(&self) -> &T
where T: Ord,

Returns the minimum element in the non-empty vector.

This will return the first item in the vector if the tail is empty.

§Examples
use nonempty::NonEmpty;

let non_empty = NonEmpty::new(42);
assert_eq!(non_empty.minimum(), &42);

let non_empty = NonEmpty::from((1, vec![-34, 42, 76, 4, 5]));
assert_eq!(non_empty.minimum(), &-34);
Source

pub fn maximum_by<F>(&self, compare: F) -> &T
where F: FnMut(&T, &T) -> Ordering,

Returns the element that gives the maximum value with respect to the specified comparison function.

This will return the first item in the vector if the tail is empty.

§Examples
use nonempty::NonEmpty;

let non_empty = NonEmpty::new((0, 42));
assert_eq!(non_empty.maximum_by(|(k, _), (l, _)| k.cmp(l)), &(0, 42));

let non_empty = NonEmpty::from(((2, 1), vec![(2, -34), (4, 42), (0, 76), (1, 4), (3, 5)]));
assert_eq!(non_empty.maximum_by(|(k, _), (l, _)| k.cmp(l)), &(4, 42));
Source

pub fn minimum_by<F>(&self, compare: F) -> &T
where F: FnMut(&T, &T) -> Ordering,

Returns the element that gives the minimum value with respect to the specified comparison function.

This will return the first item in the vector if the tail is empty.

use nonempty::NonEmpty;

let non_empty = NonEmpty::new((0, 42));
assert_eq!(non_empty.minimum_by(|(k, _), (l, _)| k.cmp(l)), &(0, 42));

let non_empty = NonEmpty::from(((2, 1), vec![(2, -34), (4, 42), (0, 76), (1, 4), (3, 5)]));
assert_eq!(non_empty.minimum_by(|(k, _), (l, _)| k.cmp(l)), &(0, 76));
Source

pub fn maximum_by_key<U, F>(&self, f: F) -> &T
where U: Ord, F: FnMut(&T) -> U,

Returns the element that gives the maximum value with respect to the specified function.

This will return the first item in the vector if the tail is empty.

§Examples
use nonempty::NonEmpty;

let non_empty = NonEmpty::new((0, 42));
assert_eq!(non_empty.maximum_by_key(|(k, _)| *k), &(0, 42));

let non_empty = NonEmpty::from(((2, 1), vec![(2, -34), (4, 42), (0, 76), (1, 4), (3, 5)]));
assert_eq!(non_empty.maximum_by_key(|(k, _)| *k), &(4, 42));
assert_eq!(non_empty.maximum_by_key(|(k, _)| -k), &(0, 76));
Source

pub fn minimum_by_key<U, F>(&self, f: F) -> &T
where U: Ord, F: FnMut(&T) -> U,

Returns the element that gives the minimum value with respect to the specified function.

This will return the first item in the vector if the tail is empty.

§Examples
use nonempty::NonEmpty;

let non_empty = NonEmpty::new((0, 42));
assert_eq!(non_empty.minimum_by_key(|(k, _)| *k), &(0, 42));

let non_empty = NonEmpty::from(((2, 1), vec![(2, -34), (4, 42), (0, 76), (1, 4), (3, 5)]));
assert_eq!(non_empty.minimum_by_key(|(k, _)| *k), &(0, 76));
assert_eq!(non_empty.minimum_by_key(|(k, _)| -k), &(4, 42));
Source

pub fn sort(&mut self)
where T: Ord,

Sorts the nonempty.

The implementation uses slice::sort for the tail and then checks where the head belongs. If the head is already the smallest element, this should be as fast as sorting a slice. However, if the head needs to be inserted, then it incurs extra cost for removing the new head from the tail and adding the old head at the correct index.

§Examples
use nonempty::nonempty;

let mut non_empty = nonempty![-5, 4, 1, -3, 2];

non_empty.sort();
assert!(non_empty == nonempty![-5, -3, 1, 2, 4]);

Trait Implementations§

Source§

impl Clone for ValidatorsVec

Source§

fn clone(&self) -> ValidatorsVec

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ValidatorsVec

Source§

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

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

impl Decode for ValidatorsVec

Source§

fn decode<I: Input>(input: &mut I) -> Result<Self, Error>

Attempt to deserialise the value from input.
Source§

fn decode_into<I>( input: &mut I, dst: &mut MaybeUninit<Self>, ) -> Result<DecodeFinished, Error>
where I: Input,

Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
Source§

fn skip<I>(input: &mut I) -> Result<(), Error>
where I: Input,

Attempt to skip the encoded value from input. Read more
Source§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
Source§

impl Default for ValidatorsVec

Source§

fn default() -> ValidatorsVec

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

impl Deref for ValidatorsVec

Source§

type Target = NonEmpty<Address>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl DerefMut for ValidatorsVec

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl Encode for ValidatorsVec

Source§

fn encode(&self) -> Vec<u8>

Convert self to an owned vector.
Source§

fn size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
Source§

fn encode_to<T>(&self, dest: &mut T)
where T: Output + ?Sized,

Convert self to a slice and append it to the destination.
Source§

fn using_encoded<R, F>(&self, f: F) -> R
where F: FnOnce(&[u8]) -> R,

Convert self to a slice and then invoke the given closure with it.
Source§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
Source§

impl Eq for ValidatorsVec

Source§

impl From<NonEmpty<Address>> for ValidatorsVec

Source§

fn from(value: NonEmpty<Address>) -> Self

Converts to this type from the input type.
Source§

impl From<ValidatorsVec> for Vec<Address>

Source§

fn from(value: ValidatorsVec) -> Self

Converts to this type from the input type.
Source§

impl From<ValidatorsVec> for Vec<ActorId>

Source§

fn from(value: ValidatorsVec) -> Self

Converts to this type from the input type.
Source§

impl Hash for ValidatorsVec

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

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 IntoIterator for ValidatorsVec

Source§

type Item = <NonEmpty<Address> as IntoIterator>::Item

The type of the elements being iterated over.
Source§

type IntoIter = <NonEmpty<Address> as IntoIterator>::IntoIter

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 PartialEq for ValidatorsVec

Source§

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

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

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for ValidatorsVec

Source§

impl TryFrom<Vec<Address>> for ValidatorsVec

Source§

type Error = EmptyValidatorsError

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

fn try_from(value: Vec<Address>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Vec<Address>> for ValidatorsVec

Source§

type Error = EmptyValidatorsError

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

fn try_from(value: Vec<Address>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TypeInfo for ValidatorsVec

Source§

type Identity = ValidatorsVec

The type identifying for which type info is provided. Read more
Source§

fn type_info() -> Type

Returns the static type identifier for Self.

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<S> Codec for S
where S: Decode + Encode,

Source§

impl<T> DecodeAll for T
where T: Decode,

Source§

fn decode_all(input: &mut &[u8]) -> Result<T, Error>

Decode Self and consume all of the given input data. Read more
Source§

impl<T> DecodeLimit for T
where T: Decode,

Source§

fn decode_all_with_depth_limit( limit: u32, input: &mut &[u8], ) -> Result<T, Error>

Decode Self and consume all of the given input data. Read more
Source§

fn decode_with_depth_limit<I>(limit: u32, input: &mut I) -> Result<T, Error>
where I: Input,

Decode Self with the given maximum recursion depth and advance input by the number of bytes consumed. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> EncodeLike<&&T> for T
where T: Encode,

Source§

impl<T> EncodeLike<&T> for T
where T: Encode,

Source§

impl<T> EncodeLike<&mut T> for T
where T: Encode,

Source§

impl<T> EncodeLike<Arc<T>> for T
where T: Encode,

Source§

impl<T> EncodeLike<Box<T>> for T
where T: Encode,

Source§

impl<T> EncodeLike<Cow<'_, T>> for T
where T: ToOwned + Encode,

Source§

impl<T> EncodeLike<Rc<T>> for T
where T: Encode,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, Outer> IsWrappedBy<Outer> for T
where Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,

Source§

fn from_ref(outer: &Outer) -> &T

Get a reference to the inner from the outer.

Source§

fn from_mut(outer: &mut Outer) -> &mut T

Get a mutable reference to the inner from the outer.

Source§

impl<T> JsonSchemaMaybe for T

Source§

impl<T> KeyedVec for T
where T: Codec,

Source§

fn to_keyed_vec(&self, prepend_key: &[u8]) -> Vec<u8>

Return an encoding of Self prepended by given slice.
Source§

impl<T> MaybeDebug for T
where T: Debug,

Source§

impl<T> MaybeRefUnwindSafe for T
where T: RefUnwindSafe,

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> StaticTypeInfo for T
where T: TypeInfo + 'static,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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>,

Source§

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>,

Source§

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.
Source§

impl<T> TypeId for T
where T: Clone + Debug + Default,

Source§

impl<S, T> UncheckedInto<T> for S
where T: UncheckedFrom<S>,

Source§

fn unchecked_into(self) -> T

The counterpart to unchecked_from.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more