pub struct PythonPatterns;Expand description
Common Python patterns
Implementations§
Source§impl PythonPatterns
impl PythonPatterns
Sourcepub fn is_private(name: &str) -> bool
pub fn is_private(name: &str) -> bool
Check if this is a private function/class
Sourcepub fn is_dataclass(decorators: &[String]) -> bool
pub fn is_dataclass(decorators: &[String]) -> bool
Check if this is a dataclass
Sourcepub fn extract_decorators(source: &str) -> Vec<String>
pub fn extract_decorators(source: &str) -> Vec<String>
Extract decorator names
Auto Trait Implementations§
impl Freeze for PythonPatterns
impl RefUnwindSafe for PythonPatterns
impl Send for PythonPatterns
impl Sync for PythonPatterns
impl Unpin for PythonPatterns
impl UnwindSafe for PythonPatterns
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