#[repr(u8)]pub enum MakeFunctionFlag {
Defaults = 0,
KwOnlyDefaults = 1,
Annotations = 2,
Closure = 3,
Annotate = 4,
TypeParams = 5,
}Expand description
SET_FUNCTION_ATTRIBUTE flags.
Bitmask: Defaults=0x01, KwOnly=0x02, Annotations=0x04,
Closure=0x08, TypeParams=0x10, Annotate=0x20.
Stored as bit position (0-5) by bitflag! macro.
Variants§
Defaults = 0
KwOnlyDefaults = 1
Annotations = 2
Closure = 3
Annotate = 4
PEP 649: annotate function closure (instead of annotations dict)
TypeParams = 5
Trait Implementations§
Source§impl BitFlag for MakeFunctionFlag
impl BitFlag for MakeFunctionFlag
Source§impl BitFlagSet<MakeFunctionFlag, u8> for MakeFunctionFlags
impl BitFlagSet<MakeFunctionFlag, u8> for MakeFunctionFlags
const BITS: u8
fn empty() -> MakeFunctionFlags
fn from_bits_retain(raw: u8) -> MakeFunctionFlags
fn from_element(element: MakeFunctionFlag) -> MakeFunctionFlags
fn first(&self) -> Option<MakeFunctionFlag>
fn last(&self) -> Option<MakeFunctionFlag>
fn pop_first(&mut self) -> Option<MakeFunctionFlag>
fn pop_last(&mut self) -> Option<MakeFunctionFlag>
fn len(&self) -> usize
fn is_empty(&self) -> bool
fn insert(&mut self, value: MakeFunctionFlag) -> bool
fn remove(&mut self, value: MakeFunctionFlag) -> bool
fn is_subset(&self, other: &MakeFunctionFlags) -> bool
fn is_superset(&self, other: &MakeFunctionFlags) -> bool
fn is_disjoint(&self, other: &MakeFunctionFlags) -> bool
fn contains(&self, value: &MakeFunctionFlag) -> bool
fn retain(&mut self, f: impl FnMut(MakeFunctionFlag) -> bool)
fn iter(&self) -> PrimBitSetIter<u8, MakeFunctionFlag>
fn to_vec(&self) -> Vec<T>
Source§impl Clone for MakeFunctionFlag
impl Clone for MakeFunctionFlag
Source§fn clone(&self) -> MakeFunctionFlag
fn clone(&self) -> MakeFunctionFlag
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MakeFunctionFlag
impl Debug for MakeFunctionFlag
Source§impl Extend<MakeFunctionFlag> for MakeFunctionFlags
impl Extend<MakeFunctionFlag> for MakeFunctionFlags
Source§fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = MakeFunctionFlag>,
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = MakeFunctionFlag>,
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
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 FromIterator<MakeFunctionFlag> for MakeFunctionFlags
impl FromIterator<MakeFunctionFlag> for MakeFunctionFlags
Source§fn from_iter<I>(iter: I) -> MakeFunctionFlagswhere
I: IntoIterator<Item = MakeFunctionFlag>,
fn from_iter<I>(iter: I) -> MakeFunctionFlagswhere
I: IntoIterator<Item = MakeFunctionFlag>,
Creates a value from an iterator. Read more
Source§impl Hash for MakeFunctionFlag
impl Hash for MakeFunctionFlag
Source§impl PartialEq for MakeFunctionFlag
impl PartialEq for MakeFunctionFlag
Source§impl TryFrom<u32> for MakeFunctionFlag
impl TryFrom<u32> for MakeFunctionFlag
Source§fn try_from(
value: u32,
) -> Result<MakeFunctionFlag, <MakeFunctionFlag as TryFrom<u32>>::Error>
fn try_from( value: u32, ) -> Result<MakeFunctionFlag, <MakeFunctionFlag as TryFrom<u32>>::Error>
Decode from CPython-compatible power-of-two value
Source§type Error = MarshalError
type Error = MarshalError
The type returned in the event of a conversion error.
Source§impl TryFrom<u8> for MakeFunctionFlag
impl TryFrom<u8> for MakeFunctionFlag
impl Copy for MakeFunctionFlag
impl Eq for MakeFunctionFlag
impl OpArgType for MakeFunctionFlag
impl StructuralPartialEq for MakeFunctionFlag
Auto Trait Implementations§
impl Freeze for MakeFunctionFlag
impl RefUnwindSafe for MakeFunctionFlag
impl Send for MakeFunctionFlag
impl Sync for MakeFunctionFlag
impl Unpin for MakeFunctionFlag
impl UnsafeUnpin for MakeFunctionFlag
impl UnwindSafe for MakeFunctionFlag
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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