Skip to main content

BitMask

Struct BitMask 

Source
pub struct BitMask<const N: usize, A: Sealed = Current>(pub <Const<N> as SupportedLaneCount>::BitMaskType, _)
where
    Const<N>: SupportedLaneCount;
Expand description

A lane-wise mask represented as a bit-mask.

The representation for this type is the smallest unsigned integer capable of holding N bits.

Tuple Fields§

§0: <Const<N> as SupportedLaneCount>::BitMaskType

Implementations§

Source§

impl<const N: usize, A> BitMask<N, A>
where Const<N>: SupportedLaneCount, A: Sealed,

Source

pub fn as_scalar(self) -> BitMask<N, Scalar>

Source

pub fn as_current(self) -> BitMask<N, Current>

Source

pub fn as_arch<B>(self, arch: B) -> BitMask<N, B>
where B: Sealed,

Trait Implementations§

Source§

impl<const N: usize, A: Clone + Sealed> Clone for BitMask<N, A>

Source§

fn clone(&self) -> BitMask<N, A>

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<const N: usize, A: Debug + Sealed> Debug for BitMask<N, A>

Source§

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

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

impl From<BitMask<1>> for u8

Source§

fn from(value: BitMask<1>) -> Self

Converts to this type from the input type.
Source§

impl From<BitMask<16>> for u16

Source§

fn from(value: BitMask<16>) -> Self

Converts to this type from the input type.
Source§

impl From<BitMask<16, V3>> for mask8x16

Source§

fn from(mask: BitMask<16, V3>) -> Self

Converts to this type from the input type.
Source§

impl From<BitMask<2>> for u8

Source§

fn from(value: BitMask<2>) -> Self

Converts to this type from the input type.
Source§

impl From<BitMask<2, V3>> for mask64x2

Source§

fn from(mask: BitMask<2, V3>) -> Self

Converts to this type from the input type.
Source§

impl From<BitMask<32>> for u32

Source§

fn from(value: BitMask<32>) -> Self

Converts to this type from the input type.
Source§

impl From<BitMask<32, V3>> for mask8x32

Source§

fn from(mask: BitMask<32, V3>) -> Self

Converts to this type from the input type.
Source§

impl From<BitMask<4>> for u8

Source§

fn from(value: BitMask<4>) -> Self

Converts to this type from the input type.
Source§

impl From<BitMask<4, V3>> for mask32x4

Source§

fn from(mask: BitMask<4, V3>) -> Self

Converts to this type from the input type.
Source§

impl From<BitMask<4, V3>> for mask64x4

Source§

fn from(mask: BitMask<4, V3>) -> Self

Converts to this type from the input type.
Source§

impl From<BitMask<64>> for u64

Source§

fn from(value: BitMask<64>) -> Self

Converts to this type from the input type.
Source§

impl From<BitMask<8>> for u8

Source§

fn from(value: BitMask<8>) -> Self

Converts to this type from the input type.
Source§

impl From<BitMask<8, V3>> for mask32x8

Source§

fn from(mask: BitMask<8, V3>) -> Self

Converts to this type from the input type.
Source§

impl From<mask32x4> for BitMask<4, V3>

Source§

fn from(mask: mask32x4) -> Self

Converts to this type from the input type.
Source§

impl From<mask32x8> for BitMask<8, V3>

Source§

fn from(mask: mask32x8) -> Self

Converts to this type from the input type.
Source§

impl From<mask64x2> for BitMask<2, V3>

Source§

fn from(mask: mask64x2) -> Self

Converts to this type from the input type.
Source§

impl From<mask64x4> for BitMask<4, V3>

Source§

fn from(mask: mask64x4) -> Self

Converts to this type from the input type.
Source§

impl From<mask8x16> for BitMask<16, V3>

Source§

fn from(mask: mask8x16) -> Self

Converts to this type from the input type.
Source§

impl From<mask8x32> for BitMask<32, V3>

Source§

fn from(mask: mask8x32) -> Self

Converts to this type from the input type.
Source§

impl<A: Sealed> FromInt<u16, A> for BitMask<16, A>

Source§

const NARROWING: bool = false

Will the conversion only sample from the lower-order bits of the provided integer.
Source§

fn from_int(arch: A, value: u16) -> Self

Turn an integer into an instance of Self.
Source§

impl<A: Sealed> FromInt<u32, A> for BitMask<32, A>

Source§

const NARROWING: bool = false

Will the conversion only sample from the lower-order bits of the provided integer.
Source§

fn from_int(arch: A, value: u32) -> Self

Turn an integer into an instance of Self.
Source§

impl<A: Sealed> FromInt<u64, A> for BitMask<64, A>

Source§

const NARROWING: bool = false

Will the conversion only sample from the lower-order bits of the provided integer.
Source§

fn from_int(arch: A, value: u64) -> Self

Turn an integer into an instance of Self.
Source§

impl<A: Sealed> FromInt<u8, A> for BitMask<1, A>

Source§

const NARROWING: bool = true

Will the conversion only sample from the lower-order bits of the provided integer.
Source§

fn from_int(arch: A, value: u8) -> Self

Turn an integer into an instance of Self.
Source§

impl<A: Sealed> FromInt<u8, A> for BitMask<2, A>

Source§

const NARROWING: bool = true

Will the conversion only sample from the lower-order bits of the provided integer.
Source§

fn from_int(arch: A, value: u8) -> Self

Turn an integer into an instance of Self.
Source§

impl<A: Sealed> FromInt<u8, A> for BitMask<4, A>

Source§

const NARROWING: bool = true

Will the conversion only sample from the lower-order bits of the provided integer.
Source§

fn from_int(arch: A, value: u8) -> Self

Turn an integer into an instance of Self.
Source§

impl<A: Sealed> FromInt<u8, A> for BitMask<8, A>

Source§

const NARROWING: bool = false

Will the conversion only sample from the lower-order bits of the provided integer.
Source§

fn from_int(arch: A, value: u8) -> Self

Turn an integer into an instance of Self.
Source§

impl<const N: usize, A: PartialEq + Sealed> PartialEq for BitMask<N, A>

Source§

fn eq(&self, other: &BitMask<N, A>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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<A: Sealed> SIMDMask for BitMask<1, A>

Source§

const ISBITS: bool = true

Whether or not this mask implementation is a bit mask.
Source§

const LANES: usize = 1

The number of lanes in the bitmask.
Source§

type Arch = A

The architecture type this struct belongs to.
Source§

type Underlying = u8

The type of the underlying intrinsic.
Source§

type BitMask = BitMask<1, A>

The bitmask associated with the logical mask.
Source§

fn arch(self) -> A

Return the architecture object associated with this vector.
Source§

fn to_underlying(self) -> Self::Underlying

Retrieve the underlying type. This will always be an unsigned integer of the minimum width required to contain LANES bits.
Source§

fn from_underlying(arch: A, value: Self::Underlying) -> Self

Construct the mask from the underlying type.
Source§

fn keep_first(arch: A, i: usize) -> Self

Efficiently construct a new mask with the first i bits set and the remainder set to zero. Read more
Source§

fn get_unchecked(&self, i: usize) -> bool

Return true if lane i is set and false otherwise. Read more
Source§

fn first(&self) -> Option<usize>

Return the first set index in the mask or None if no entries are set.
Source§

fn from_fn<F>(arch: A, f: F) -> Self
where F: FnMut(usize) -> bool,

Construct a mask based on the result of invoking f once each element in the range 0..Self::LANES in order. Read more
Source§

fn any(self) -> bool

Return true if any lane in the mask is set. Otherwise, return `false.
Source§

fn all(self) -> bool

Return true if all lanes in the mask are set. Otherwise, return false.
Source§

fn count(self) -> usize

Return the number of lanes that evaluate to true.
Source§

fn bitmask(self) -> Self::BitMask

Return the associated BitMask for this Mask.
Source§

fn get(&self, i: usize) -> Option<bool>

Return true if lane i is set and false otherwise. Returns an empty Option if the index i is out-of-bounds.
Source§

fn none(self) -> bool

Return true if all lanes in the mask are set. Otherwise, return false.
Source§

impl<A: Sealed> SIMDMask for BitMask<16, A>

Source§

const ISBITS: bool = true

Whether or not this mask implementation is a bit mask.
Source§

const LANES: usize = 16

The number of lanes in the bitmask.
Source§

type Arch = A

The architecture type this struct belongs to.
Source§

type Underlying = u16

The type of the underlying intrinsic.
Source§

type BitMask = BitMask<16, A>

The bitmask associated with the logical mask.
Source§

fn arch(self) -> A

Return the architecture object associated with this vector.
Source§

fn to_underlying(self) -> Self::Underlying

Retrieve the underlying type. This will always be an unsigned integer of the minimum width required to contain LANES bits.
Source§

fn from_underlying(arch: A, value: Self::Underlying) -> Self

Construct the mask from the underlying type.
Source§

fn keep_first(arch: A, i: usize) -> Self

Efficiently construct a new mask with the first i bits set and the remainder set to zero. Read more
Source§

fn get_unchecked(&self, i: usize) -> bool

Return true if lane i is set and false otherwise. Read more
Source§

fn first(&self) -> Option<usize>

Return the first set index in the mask or None if no entries are set.
Source§

fn from_fn<F>(arch: A, f: F) -> Self
where F: FnMut(usize) -> bool,

Construct a mask based on the result of invoking f once each element in the range 0..Self::LANES in order. Read more
Source§

fn any(self) -> bool

Return true if any lane in the mask is set. Otherwise, return `false.
Source§

fn all(self) -> bool

Return true if all lanes in the mask are set. Otherwise, return false.
Source§

fn count(self) -> usize

Return the number of lanes that evaluate to true.
Source§

fn bitmask(self) -> Self::BitMask

Return the associated BitMask for this Mask.
Source§

fn get(&self, i: usize) -> Option<bool>

Return true if lane i is set and false otherwise. Returns an empty Option if the index i is out-of-bounds.
Source§

fn none(self) -> bool

Return true if all lanes in the mask are set. Otherwise, return false.
Source§

impl<A: Sealed> SIMDMask for BitMask<2, A>

Source§

const ISBITS: bool = true

Whether or not this mask implementation is a bit mask.
Source§

const LANES: usize = 2

The number of lanes in the bitmask.
Source§

type Arch = A

The architecture type this struct belongs to.
Source§

type Underlying = u8

The type of the underlying intrinsic.
Source§

type BitMask = BitMask<2, A>

The bitmask associated with the logical mask.
Source§

fn arch(self) -> A

Return the architecture object associated with this vector.
Source§

fn to_underlying(self) -> Self::Underlying

Retrieve the underlying type. This will always be an unsigned integer of the minimum width required to contain LANES bits.
Source§

fn from_underlying(arch: A, value: Self::Underlying) -> Self

Construct the mask from the underlying type.
Source§

fn keep_first(arch: A, i: usize) -> Self

Efficiently construct a new mask with the first i bits set and the remainder set to zero. Read more
Source§

fn get_unchecked(&self, i: usize) -> bool

Return true if lane i is set and false otherwise. Read more
Source§

fn first(&self) -> Option<usize>

Return the first set index in the mask or None if no entries are set.
Source§

fn from_fn<F>(arch: A, f: F) -> Self
where F: FnMut(usize) -> bool,

Construct a mask based on the result of invoking f once each element in the range 0..Self::LANES in order. Read more
Source§

fn any(self) -> bool

Return true if any lane in the mask is set. Otherwise, return `false.
Source§

fn all(self) -> bool

Return true if all lanes in the mask are set. Otherwise, return false.
Source§

fn count(self) -> usize

Return the number of lanes that evaluate to true.
Source§

fn bitmask(self) -> Self::BitMask

Return the associated BitMask for this Mask.
Source§

fn get(&self, i: usize) -> Option<bool>

Return true if lane i is set and false otherwise. Returns an empty Option if the index i is out-of-bounds.
Source§

fn none(self) -> bool

Return true if all lanes in the mask are set. Otherwise, return false.
Source§

impl<A: Sealed> SIMDMask for BitMask<32, A>

Source§

const ISBITS: bool = true

Whether or not this mask implementation is a bit mask.
Source§

const LANES: usize = 32

The number of lanes in the bitmask.
Source§

type Arch = A

The architecture type this struct belongs to.
Source§

type Underlying = u32

The type of the underlying intrinsic.
Source§

type BitMask = BitMask<32, A>

The bitmask associated with the logical mask.
Source§

fn arch(self) -> A

Return the architecture object associated with this vector.
Source§

fn to_underlying(self) -> Self::Underlying

Retrieve the underlying type. This will always be an unsigned integer of the minimum width required to contain LANES bits.
Source§

fn from_underlying(arch: A, value: Self::Underlying) -> Self

Construct the mask from the underlying type.
Source§

fn keep_first(arch: A, i: usize) -> Self

Efficiently construct a new mask with the first i bits set and the remainder set to zero. Read more
Source§

fn get_unchecked(&self, i: usize) -> bool

Return true if lane i is set and false otherwise. Read more
Source§

fn first(&self) -> Option<usize>

Return the first set index in the mask or None if no entries are set.
Source§

fn from_fn<F>(arch: A, f: F) -> Self
where F: FnMut(usize) -> bool,

Construct a mask based on the result of invoking f once each element in the range 0..Self::LANES in order. Read more
Source§

fn any(self) -> bool

Return true if any lane in the mask is set. Otherwise, return `false.
Source§

fn all(self) -> bool

Return true if all lanes in the mask are set. Otherwise, return false.
Source§

fn count(self) -> usize

Return the number of lanes that evaluate to true.
Source§

fn bitmask(self) -> Self::BitMask

Return the associated BitMask for this Mask.
Source§

fn get(&self, i: usize) -> Option<bool>

Return true if lane i is set and false otherwise. Returns an empty Option if the index i is out-of-bounds.
Source§

fn none(self) -> bool

Return true if all lanes in the mask are set. Otherwise, return false.
Source§

impl<A: Sealed> SIMDMask for BitMask<4, A>

Source§

const ISBITS: bool = true

Whether or not this mask implementation is a bit mask.
Source§

const LANES: usize = 4

The number of lanes in the bitmask.
Source§

type Arch = A

The architecture type this struct belongs to.
Source§

type Underlying = u8

The type of the underlying intrinsic.
Source§

type BitMask = BitMask<4, A>

The bitmask associated with the logical mask.
Source§

fn arch(self) -> A

Return the architecture object associated with this vector.
Source§

fn to_underlying(self) -> Self::Underlying

Retrieve the underlying type. This will always be an unsigned integer of the minimum width required to contain LANES bits.
Source§

fn from_underlying(arch: A, value: Self::Underlying) -> Self

Construct the mask from the underlying type.
Source§

fn keep_first(arch: A, i: usize) -> Self

Efficiently construct a new mask with the first i bits set and the remainder set to zero. Read more
Source§

fn get_unchecked(&self, i: usize) -> bool

Return true if lane i is set and false otherwise. Read more
Source§

fn first(&self) -> Option<usize>

Return the first set index in the mask or None if no entries are set.
Source§

fn from_fn<F>(arch: A, f: F) -> Self
where F: FnMut(usize) -> bool,

Construct a mask based on the result of invoking f once each element in the range 0..Self::LANES in order. Read more
Source§

fn any(self) -> bool

Return true if any lane in the mask is set. Otherwise, return `false.
Source§

fn all(self) -> bool

Return true if all lanes in the mask are set. Otherwise, return false.
Source§

fn count(self) -> usize

Return the number of lanes that evaluate to true.
Source§

fn bitmask(self) -> Self::BitMask

Return the associated BitMask for this Mask.
Source§

fn get(&self, i: usize) -> Option<bool>

Return true if lane i is set and false otherwise. Returns an empty Option if the index i is out-of-bounds.
Source§

fn none(self) -> bool

Return true if all lanes in the mask are set. Otherwise, return false.
Source§

impl<A: Sealed> SIMDMask for BitMask<64, A>

Source§

const ISBITS: bool = true

Whether or not this mask implementation is a bit mask.
Source§

const LANES: usize = 64

The number of lanes in the bitmask.
Source§

type Arch = A

The architecture type this struct belongs to.
Source§

type Underlying = u64

The type of the underlying intrinsic.
Source§

type BitMask = BitMask<64, A>

The bitmask associated with the logical mask.
Source§

fn arch(self) -> A

Return the architecture object associated with this vector.
Source§

fn to_underlying(self) -> Self::Underlying

Retrieve the underlying type. This will always be an unsigned integer of the minimum width required to contain LANES bits.
Source§

fn from_underlying(arch: A, value: Self::Underlying) -> Self

Construct the mask from the underlying type.
Source§

fn keep_first(arch: A, i: usize) -> Self

Efficiently construct a new mask with the first i bits set and the remainder set to zero. Read more
Source§

fn get_unchecked(&self, i: usize) -> bool

Return true if lane i is set and false otherwise. Read more
Source§

fn first(&self) -> Option<usize>

Return the first set index in the mask or None if no entries are set.
Source§

fn from_fn<F>(arch: A, f: F) -> Self
where F: FnMut(usize) -> bool,

Construct a mask based on the result of invoking f once each element in the range 0..Self::LANES in order. Read more
Source§

fn any(self) -> bool

Return true if any lane in the mask is set. Otherwise, return `false.
Source§

fn all(self) -> bool

Return true if all lanes in the mask are set. Otherwise, return false.
Source§

fn count(self) -> usize

Return the number of lanes that evaluate to true.
Source§

fn bitmask(self) -> Self::BitMask

Return the associated BitMask for this Mask.
Source§

fn get(&self, i: usize) -> Option<bool>

Return true if lane i is set and false otherwise. Returns an empty Option if the index i is out-of-bounds.
Source§

fn none(self) -> bool

Return true if all lanes in the mask are set. Otherwise, return false.
Source§

impl<A: Sealed> SIMDMask for BitMask<8, A>

Source§

const ISBITS: bool = true

Whether or not this mask implementation is a bit mask.
Source§

const LANES: usize = 8

The number of lanes in the bitmask.
Source§

type Arch = A

The architecture type this struct belongs to.
Source§

type Underlying = u8

The type of the underlying intrinsic.
Source§

type BitMask = BitMask<8, A>

The bitmask associated with the logical mask.
Source§

fn arch(self) -> A

Return the architecture object associated with this vector.
Source§

fn to_underlying(self) -> Self::Underlying

Retrieve the underlying type. This will always be an unsigned integer of the minimum width required to contain LANES bits.
Source§

fn from_underlying(arch: A, value: Self::Underlying) -> Self

Construct the mask from the underlying type.
Source§

fn keep_first(arch: A, i: usize) -> Self

Efficiently construct a new mask with the first i bits set and the remainder set to zero. Read more
Source§

fn get_unchecked(&self, i: usize) -> bool

Return true if lane i is set and false otherwise. Read more
Source§

fn first(&self) -> Option<usize>

Return the first set index in the mask or None if no entries are set.
Source§

fn from_fn<F>(arch: A, f: F) -> Self
where F: FnMut(usize) -> bool,

Construct a mask based on the result of invoking f once each element in the range 0..Self::LANES in order. Read more
Source§

fn any(self) -> bool

Return true if any lane in the mask is set. Otherwise, return `false.
Source§

fn all(self) -> bool

Return true if all lanes in the mask are set. Otherwise, return false.
Source§

fn count(self) -> usize

Return the number of lanes that evaluate to true.
Source§

fn bitmask(self) -> Self::BitMask

Return the associated BitMask for this Mask.
Source§

fn get(&self, i: usize) -> Option<bool>

Return true if lane i is set and false otherwise. Returns an empty Option if the index i is out-of-bounds.
Source§

fn none(self) -> bool

Return true if all lanes in the mask are set. Otherwise, return false.
Source§

impl<T, const N: usize, A> SIMDSelect<Emulated<T, N, A>> for BitMask<N, A>
where T: Copy, A: Sealed, Const<N>: SupportedLaneCount, BitMask<N, A>: SIMDMask<Arch = A>, Emulated<T, N, A>: SIMDVector<Mask = BitMask<N, A>>,

Source§

fn select(self, x: Emulated<T, N, A>, y: Emulated<T, N, A>) -> Emulated<T, N, A>

Source§

impl SIMDSelect<f32x16> for BitMask<16, V4>

Source§

fn select(self, x: f32x16, y: f32x16) -> f32x16

Source§

impl SIMDSelect<f32x4> for BitMask<4, V4>

Source§

fn select(self, x: f32x4, y: f32x4) -> f32x4

Source§

impl SIMDSelect<f32x8> for BitMask<8, V4>

Source§

fn select(self, x: f32x8, y: f32x8) -> f32x8

Source§

impl SIMDSelect<i32x16> for BitMask<16, V4>

Source§

fn select(self, x: i32x16, y: i32x16) -> i32x16

Source§

impl SIMDSelect<i32x8> for BitMask<8, V4>

Source§

fn select(self, x: i32x8, y: i32x8) -> i32x8

Source§

impl SIMDSelect<u32x16> for BitMask<16, V4>

Source§

fn select(self, x: u32x16, y: u32x16) -> u32x16

Source§

impl SIMDSelect<u32x4> for BitMask<4, V4>

Source§

fn select(self, x: u32x4, y: u32x4) -> u32x4

Source§

impl SIMDSelect<u32x8> for BitMask<8, V4>

Source§

fn select(self, x: u32x8, y: u32x8) -> u32x8

Source§

impl<A: Sealed> SplitJoin for BitMask<16, A>

Source§

type Halved = BitMask<8, A>

The type of the halved element.
Source§

fn split(self) -> LoHi<Self::Halved>

Split self into two equal halves.
Source§

fn join(lohi: LoHi<Self::Halved>) -> Self

Create self by joining the two halves.
Source§

impl<A: Sealed> SplitJoin for BitMask<2, A>

Source§

type Halved = BitMask<1, A>

The type of the halved element.
Source§

fn split(self) -> LoHi<Self::Halved>

Split self into two equal halves.
Source§

fn join(lohi: LoHi<Self::Halved>) -> Self

Create self by joining the two halves.
Source§

impl<A: Sealed> SplitJoin for BitMask<32, A>

Source§

type Halved = BitMask<16, A>

The type of the halved element.
Source§

fn split(self) -> LoHi<Self::Halved>

Split self into two equal halves.
Source§

fn join(lohi: LoHi<Self::Halved>) -> Self

Create self by joining the two halves.
Source§

impl<A: Sealed> SplitJoin for BitMask<4, A>

Source§

type Halved = BitMask<2, A>

The type of the halved element.
Source§

fn split(self) -> LoHi<Self::Halved>

Split self into two equal halves.
Source§

fn join(lohi: LoHi<Self::Halved>) -> Self

Create self by joining the two halves.
Source§

impl<A: Sealed> SplitJoin for BitMask<64, A>

Source§

type Halved = BitMask<32, A>

The type of the halved element.
Source§

fn split(self) -> LoHi<Self::Halved>

Split self into two equal halves.
Source§

fn join(lohi: LoHi<Self::Halved>) -> Self

Create self by joining the two halves.
Source§

impl<A: Sealed> SplitJoin for BitMask<8, A>

Source§

type Halved = BitMask<4, A>

The type of the halved element.
Source§

fn split(self) -> LoHi<Self::Halved>

Split self into two equal halves.
Source§

fn join(lohi: LoHi<Self::Halved>) -> Self

Create self by joining the two halves.
Source§

impl<const N: usize, A: Copy + Sealed> Copy for BitMask<N, A>

Source§

impl<const N: usize, A: Eq + Sealed> Eq for BitMask<N, A>

Source§

impl<const N: usize, A: Sealed> StructuralPartialEq for BitMask<N, A>

Auto Trait Implementations§

§

impl<const N: usize, A = Scalar> !Freeze for BitMask<N, A>

§

impl<const N: usize, A = Scalar> !RefUnwindSafe for BitMask<N, A>

§

impl<const N: usize, A = Scalar> !Send for BitMask<N, A>

§

impl<const N: usize, A = Scalar> !Sync for BitMask<N, A>

§

impl<const N: usize, A = Scalar> !Unpin for BitMask<N, A>

§

impl<const N: usize, A = Scalar> !UnwindSafe for BitMask<N, A>

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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for 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.