Skip to main content

PyTypeFlags

Struct PyTypeFlags 

Source
pub struct PyTypeFlags(/* private fields */);

Implementations§

Source§

impl PyTypeFlags

Source

pub const INLINE_VALUES: u8 = 2

Source

pub const MANAGED_WEAKREF: u8 = 3

Source

pub const MANAGED_DICT: u8 = 4

Source

pub const SEQUENCE: u8 = 5

Source

pub const MAPPING: u8 = 6

Source

pub const DISALLOW_INSTANTIATION: u8 = 7

Source

pub const IMMUTABLETYPE: u8 = 8

Source

pub const HEAPTYPE: u8 = 9

Source

pub const BASETYPE: u8 = 10

Source

pub const METHOD_DESCRIPTOR: u8 = 17

Source

pub const IS_ABSTRACT: u8 = 20

Source

pub const _MATCH_SELF: u8 = 22

Source

pub const HAS_DICT: u8 = 40

Source

pub const HAS_WEAKREF: u8 = 41

Source

pub const _CREATED_WITH_FLAGS: u8 = 63

Source

pub const fn new() -> Self

Source

pub const fn empty() -> Self

Source

pub const fn all() -> Self

Source

pub const fn bits(&self) -> u64

Source

pub const fn as_bits(&self) -> &u64

Source

pub const fn from_element(pos: u8) -> Self

Source

pub const fn from_slice(positions: &[u8]) -> Self

Source

pub const fn from_bits(bits: u64) -> Option<Self>

Source

pub const fn from_bits_retain(bits: u64) -> Self

Source

pub const unsafe fn from_bits_unchecked(bits: u64) -> Self

Source

pub const fn from_bits_truncate(bits: u64) -> Self

Source

pub const fn len(&self) -> usize

Source

pub const fn is_empty(&self) -> bool

Source

pub const fn is_all(&self) -> bool

Source

pub const fn contains(&self, pos: &u8) -> bool

Source

pub fn set(&mut self, pos: u8, value: bool)

Source

pub fn insert(&mut self, pos: u8) -> bool

Source

pub fn remove(&mut self, pos: u8) -> bool

Source

pub fn toggle(&mut self, pos: u8)

Source

pub fn clear(&mut self)

Source

pub const fn is_subset(&self, other: &Self) -> bool

Source

pub const fn is_superset(&self, other: &Self) -> bool

Source

pub const fn is_disjoint(&self, other: &Self) -> bool

Source

pub const fn complement(self) -> Self

Source

pub fn iter(&self) -> PrimBitSetIter<u64, u8> ⓘ

Source

pub fn first(&self) -> Option<u8>

Source

pub fn last(&self) -> Option<u8>

Source

pub fn pop_first(&mut self) -> Option<u8>

Source

pub fn pop_last(&mut self) -> Option<u8>

Source

pub fn retain(&mut self, f: impl FnMut(u8) -> bool)

Source

pub fn iter_names(&self) -> impl Iterator<Item = (&'static str, u8)>

Source

pub fn from_name(name: &str) -> Option<Self>

Source§

impl PyTypeFlags

Source

pub const HEAP_TYPE: Self

Source

pub const HEAP_TYPE_WITH_DICT: Self

Source

pub const HEAP_TYPE_DICT_IMMUTABLE: Self

Source

pub const COLLECTION: Self

Trait Implementations§

Source§

impl Binary for PyTypeFlags

Source§

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

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

impl BitAnd for PyTypeFlags

Source§

type Output = PyTypeFlags

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: PyTypeFlags) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAndAssign for PyTypeFlags

Source§

fn bitand_assign(&mut self, rhs: PyTypeFlags)

Performs the &= operation. Read more
Source§

impl BitFlagSet<u8, u64> for PyTypeFlags

Source§

const BITS: u8

Source§

fn empty() -> Self

Source§

fn from_bits_retain(raw: u64) -> Self

Source§

fn from_element(element: u8) -> Self

Source§

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

Source§

fn last(&self) -> Option<u8>

Source§

fn pop_first(&mut self) -> Option<u8>

Source§

fn pop_last(&mut self) -> Option<u8>

Source§

fn len(&self) -> usize

Source§

fn is_empty(&self) -> bool

Source§

fn contains(&self, value: &u8) -> bool

Source§

fn retain(&mut self, f: impl FnMut(u8) -> bool)

Source§

fn insert(&mut self, value: u8) -> bool

Source§

fn remove(&mut self, value: u8) -> bool

Source§

fn is_subset(&self, other: &Self) -> bool

Source§

fn is_superset(&self, other: &Self) -> bool

Source§

fn is_disjoint(&self, other: &Self) -> bool

Source§

fn iter(&self) -> PrimBitSetIter<u64, u8> ⓘ

Source§

fn to_vec(&self) -> Vec<T>

Source§

impl BitOr for PyTypeFlags

Source§

type Output = PyTypeFlags

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: PyTypeFlags) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOrAssign for PyTypeFlags

Source§

fn bitor_assign(&mut self, rhs: PyTypeFlags)

Performs the |= operation. Read more
Source§

impl BitOrAssign<PyTypeFlags> for AtomicPyTypeFlags

Source§

fn bitor_assign(&mut self, rhs: PyTypeFlags)

Performs the |= operation. Read more
Source§

impl BitXor for PyTypeFlags

Source§

type Output = PyTypeFlags

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: PyTypeFlags) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXorAssign for PyTypeFlags

Source§

fn bitxor_assign(&mut self, rhs: PyTypeFlags)

Performs the ^= operation. Read more
Source§

impl Clone for PyTypeFlags

Source§

fn clone(&self) -> Self

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 Copy for PyTypeFlags

Source§

impl Debug for PyTypeFlags

Source§

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

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

impl Default for PyTypeFlags

Source§

fn default() -> Self

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

impl Display for PyTypeFlags

Source§

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

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

impl Eq for PyTypeFlags

Source§

impl Extend<PyTypeFlags> for PyTypeFlags

Source§

fn extend<I: IntoIterator<Item = PyTypeFlags>>(&mut self, iter: I)

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

fn extend_one(&mut self, item: T)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl Extend<u8> for PyTypeFlags

Source§

fn extend<I: IntoIterator<Item = u8>>(&mut self, iter: I)

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

fn extend_one(&mut self, item: T)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl From<&AtomicPyTypeFlags> for PyTypeFlags

Source§

fn from(value: &AtomicPyTypeFlags) -> Self

Converts to this type from the input type.
Source§

impl From<AtomicPyTypeFlags> for PyTypeFlags

Source§

fn from(value: AtomicPyTypeFlags) -> Self

Converts to this type from the input type.
Source§

impl From<PyTypeFlags> for AtomicPyTypeFlags

Source§

fn from(value: PyTypeFlags) -> Self

Converts to this type from the input type.
Source§

impl FromIterator<PyTypeFlags> for PyTypeFlags

Source§

fn from_iter<I: IntoIterator<Item = PyTypeFlags>>(iter: I) -> Self

Creates a value from an iterator. Read more
Source§

impl FromIterator<u8> for PyTypeFlags

Source§

fn from_iter<I: IntoIterator<Item = u8>>(iter: I) -> Self

Creates a value from an iterator. Read more
Source§

impl Index<<PyTypeFlags as IntoIterator>::Item> for AtomicPyTypeFlags

Source§

type Output = bool

The returned type after indexing.
Source§

fn index(&self, value: <PyTypeFlags as IntoIterator>::Item) -> &bool

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

impl Index<u8> for PyTypeFlags

Source§

type Output = bool

The returned type after indexing.
Source§

fn index(&self, pos: u8) -> &bool

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

impl IntoIterator for PyTypeFlags

Source§

type Item = u8

The type of the elements being iterated over.
Source§

type IntoIter = PrimBitSetIter<u64, u8>

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 LowerHex for PyTypeFlags

Source§

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

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

impl NamedFlags for PyTypeFlags

Source§

type Element = u8

Source§

fn flag_names() -> impl Iterator<Item = (&'static str, Self::Element)>

Source§

impl Not for PyTypeFlags

Source§

type Output = PyTypeFlags

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl Octal for PyTypeFlags

Source§

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

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

impl PartialEq for PyTypeFlags

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for PyTypeFlags

Source§

impl Sub for PyTypeFlags

Source§

type Output = PyTypeFlags

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: PyTypeFlags) -> Self::Output

Performs the - operation. Read more
Source§

impl SubAssign for PyTypeFlags

Source§

fn sub_assign(&mut self, rhs: PyTypeFlags)

Performs the -= operation. Read more
Source§

impl UpperHex for PyTypeFlags

Source§

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

Formats the value using the given formatter. Read more

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

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

Checks if this value is equivalent to the given key. Read more
Source§

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

Source§

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

Checks if this value is equivalent to the given key. Read more
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> ErasedDestructor for T
where T: 'static,

Source§

impl<T, U> ExactFrom<T> for U
where U: TryFrom<T>,

Source§

fn exact_from(value: T) -> U

Source§

impl<T, U> ExactInto<U> for T
where U: ExactFrom<T>,

Source§

fn exact_into(self) -> U

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Helper for T

Source§

impl<T, U> ImaginaryInto<U> for T
where U: ImaginaryFrom<T>,

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, U> OverflowingInto<U> for T
where U: OverflowingFrom<T>,

Source§

impl<T> PrimitiveIntRandomBounds for T

Source§

impl<T> PrimitiveSignedRandomBounds for T

Source§

impl<T> PyThreadingConstraint for T

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> RoundingInto<U> for T
where U: RoundingFrom<T>,

Source§

impl<T, U> SaturatingInto<U> for T
where U: SaturatingFrom<T>,

Source§

impl<T> ToBinaryString for T
where T: Binary,

Source§

fn to_binary_string(&self) -> String

Returns the String produced by Ts Binary implementation.

§Examples
use malachite_base::strings::ToBinaryString;

assert_eq!(5u64.to_binary_string(), "101");
assert_eq!((-100i16).to_binary_string(), "1111111110011100");
Source§

impl<T> ToCharString for T
where T: Display,

Source§

fn try_to_char_string(&self) -> Result<CharString, ToCharStringError>

Attempts to convert the value to a CharString. Read more
Source§

fn to_char_string(&self) -> CharString

Converts the value to a CharString. Read more
Source§

impl<T> ToCompactString for T
where T: Display,

Source§

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

Source§

fn to_debug_string(&self) -> String

Returns the String produced by Ts Debug implementation.

§Examples
use malachite_base::strings::ToDebugString;

assert_eq!([1, 2, 3].to_debug_string(), "[1, 2, 3]");
assert_eq!(
    [vec![2, 3], vec![], vec![4]].to_debug_string(),
    "[[2, 3], [], [4]]"
);
assert_eq!(Some(5).to_debug_string(), "Some(5)");
Source§

impl<T> ToLowerHexString for T
where T: LowerHex,

Source§

fn to_lower_hex_string(&self) -> String

Returns the String produced by Ts LowerHex implementation.

§Examples
use malachite_base::strings::ToLowerHexString;

assert_eq!(50u64.to_lower_hex_string(), "32");
assert_eq!((-100i16).to_lower_hex_string(), "ff9c");
Source§

impl<T> ToOctalString for T
where T: Octal,

Source§

fn to_octal_string(&self) -> String

Returns the String produced by Ts Octal implementation.

§Examples
use malachite_base::strings::ToOctalString;

assert_eq!(50u64.to_octal_string(), "62");
assert_eq!((-100i16).to_octal_string(), "177634");
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> ToUpperHexString for T
where T: UpperHex,

Source§

fn to_upper_hex_string(&self) -> String

Returns the String produced by Ts UpperHex implementation.

§Examples
use malachite_base::strings::ToUpperHexString;

assert_eq!(50u64.to_upper_hex_string(), "32");
assert_eq!((-100i16).to_upper_hex_string(), "FF9C");
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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, U> WrappingInto<U> for T
where U: WrappingFrom<T>,

Source§

fn wrapping_into(self) -> U