pub enum GenerateInitPy {
All(bool),
Modules(Vec<String>),
}Expand description
Configuration for __init__.py generation.
This can be:
falseor unset: Disable generation (default)true: Generate for all modules with re-exports["pkg", "pkg.submod"]: Generate for specific modules only
Variants§
All(bool)
Enable/disable for all modules with re-exports
Modules(Vec<String>)
Generate for specific modules only
Implementations§
Source§impl GenerateInitPy
impl GenerateInitPy
Sourcepub fn is_enabled_for(&self, module_name: &str) -> bool
pub fn is_enabled_for(&self, module_name: &str) -> bool
Check if generation is enabled for a given module name.
All(true): Returnstruefor any moduleAll(false): Returnsfalsefor any moduleModules(list): Returnstrueif the module is in the list
Module names are normalized (dashes to underscores) before comparison to match Python’s module name requirements.
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if any generation is enabled.
Trait Implementations§
Source§impl Clone for GenerateInitPy
impl Clone for GenerateInitPy
Source§fn clone(&self) -> GenerateInitPy
fn clone(&self) -> GenerateInitPy
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 GenerateInitPy
impl Debug for GenerateInitPy
Source§impl Default for GenerateInitPy
impl Default for GenerateInitPy
Source§impl<'de> Deserialize<'de> for GenerateInitPy
impl<'de> Deserialize<'de> for GenerateInitPy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for GenerateInitPy
impl PartialEq for GenerateInitPy
Source§impl Serialize for GenerateInitPy
impl Serialize for GenerateInitPy
impl Eq for GenerateInitPy
impl StructuralPartialEq for GenerateInitPy
Auto Trait Implementations§
impl Freeze for GenerateInitPy
impl RefUnwindSafe for GenerateInitPy
impl Send for GenerateInitPy
impl Sync for GenerateInitPy
impl Unpin for GenerateInitPy
impl UnwindSafe for GenerateInitPy
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§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