Trait proc_bitfield::WithBit

source ·
pub trait WithBit {
    // Required method
    fn with_bit<const BIT: usize>(self, value: bool) -> Self;
}
Expand description

Return a value with a single bit modified.

Required Methods§

source

fn with_bit<const BIT: usize>(self, value: bool) -> Self

Returns self with the the specified bit set to 1 if value is true, and 0 otherwise.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl WithBit for i8

source§

fn with_bit<const BIT: usize>(self, value: bool) -> Self

source§

impl WithBit for i16

source§

fn with_bit<const BIT: usize>(self, value: bool) -> Self

source§

impl WithBit for i32

source§

fn with_bit<const BIT: usize>(self, value: bool) -> Self

source§

impl WithBit for i64

source§

fn with_bit<const BIT: usize>(self, value: bool) -> Self

source§

impl WithBit for i128

source§

fn with_bit<const BIT: usize>(self, value: bool) -> Self

source§

impl WithBit for isize

source§

fn with_bit<const BIT: usize>(self, value: bool) -> Self

source§

impl WithBit for u8

source§

fn with_bit<const BIT: usize>(self, value: bool) -> Self

source§

impl WithBit for u16

source§

fn with_bit<const BIT: usize>(self, value: bool) -> Self

source§

impl WithBit for u32

source§

fn with_bit<const BIT: usize>(self, value: bool) -> Self

source§

impl WithBit for u64

source§

fn with_bit<const BIT: usize>(self, value: bool) -> Self

source§

impl WithBit for u128

source§

fn with_bit<const BIT: usize>(self, value: bool) -> Self

source§

impl WithBit for usize

source§

fn with_bit<const BIT: usize>(self, value: bool) -> Self

source§

impl<const N: usize> WithBit for [i8; N]

source§

fn with_bit<const BIT: usize>(self, value: bool) -> Self

source§

impl<const N: usize> WithBit for [i16; N]

source§

fn with_bit<const BIT: usize>(self, value: bool) -> Self

source§

impl<const N: usize> WithBit for [i32; N]

source§

fn with_bit<const BIT: usize>(self, value: bool) -> Self

source§

impl<const N: usize> WithBit for [i64; N]

source§

fn with_bit<const BIT: usize>(self, value: bool) -> Self

source§

impl<const N: usize> WithBit for [i128; N]

source§

fn with_bit<const BIT: usize>(self, value: bool) -> Self

source§

impl<const N: usize> WithBit for [isize; N]

source§

fn with_bit<const BIT: usize>(self, value: bool) -> Self

source§

impl<const N: usize> WithBit for [u8; N]

source§

fn with_bit<const BIT: usize>(self, value: bool) -> Self

source§

impl<const N: usize> WithBit for [u16; N]

source§

fn with_bit<const BIT: usize>(self, value: bool) -> Self

source§

impl<const N: usize> WithBit for [u32; N]

source§

fn with_bit<const BIT: usize>(self, value: bool) -> Self

source§

impl<const N: usize> WithBit for [u64; N]

source§

fn with_bit<const BIT: usize>(self, value: bool) -> Self

source§

impl<const N: usize> WithBit for [u128; N]

source§

fn with_bit<const BIT: usize>(self, value: bool) -> Self

source§

impl<const N: usize> WithBit for [usize; N]

source§

fn with_bit<const BIT: usize>(self, value: bool) -> Self

Implementors§