pub struct PythonExtensionModuleVariants { /* private fields */ }
Expand description
Represents a collection of variants for a given Python extension module.
Implementations§
Source§impl PythonExtensionModuleVariants
impl PythonExtensionModuleVariants
pub fn push(&mut self, em: PythonExtensionModule)
pub fn is_empty(&self) -> bool
pub fn iter(&self) -> impl Iterator<Item = &PythonExtensionModule>
Sourcepub fn default_variant(&self) -> &PythonExtensionModule
pub fn default_variant(&self) -> &PythonExtensionModule
Obtains the default / first variant of an extension module.
Sourcepub fn choose_variant<S: BuildHasher>(
&self,
variants: &HashMap<String, String, S>,
) -> &PythonExtensionModule
pub fn choose_variant<S: BuildHasher>( &self, variants: &HashMap<String, String, S>, ) -> &PythonExtensionModule
Choose a variant given preferences.
Trait Implementations§
Source§impl Clone for PythonExtensionModuleVariants
impl Clone for PythonExtensionModuleVariants
Source§fn clone(&self) -> PythonExtensionModuleVariants
fn clone(&self) -> PythonExtensionModuleVariants
Returns a copy 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 Default for PythonExtensionModuleVariants
impl Default for PythonExtensionModuleVariants
Source§fn default() -> PythonExtensionModuleVariants
fn default() -> PythonExtensionModuleVariants
Returns the “default value” for a type. Read more
Source§impl FromIterator<PythonExtensionModule> for PythonExtensionModuleVariants
impl FromIterator<PythonExtensionModule> for PythonExtensionModuleVariants
Source§fn from_iter<I: IntoIterator<Item = PythonExtensionModule>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = PythonExtensionModule>>(iter: I) -> Self
Creates a value from an iterator. Read more
Auto Trait Implementations§
impl Freeze for PythonExtensionModuleVariants
impl RefUnwindSafe for PythonExtensionModuleVariants
impl Send for PythonExtensionModuleVariants
impl Sync for PythonExtensionModuleVariants
impl Unpin for PythonExtensionModuleVariants
impl UnwindSafe for PythonExtensionModuleVariants
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<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