pub struct PythonModule {
pub path: String,
pub docstring: Option<String>,
pub parsed_doc: Option<ParsedDocstring>,
pub items: Vec<PythonItem>,
pub source_type: SourceType,
pub source: SourceSpan,
}Expand description
A Python module
Fields§
§path: String§docstring: Option<String>§parsed_doc: Option<ParsedDocstring>§items: Vec<PythonItem>§source_type: SourceType§source: SourceSpanImplementations§
Source§impl PythonModule
impl PythonModule
pub fn with_docstring(self, doc: impl Into<String>) -> Self
pub fn with_item(self, item: PythonItem) -> Self
pub fn pyo3_binding(self) -> Self
pub fn with_source(self, source: SourceSpan) -> Self
Trait Implementations§
Source§impl Clone for PythonModule
impl Clone for PythonModule
Source§fn clone(&self) -> PythonModule
fn clone(&self) -> PythonModule
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 PythonModule
impl Debug for PythonModule
Source§impl<'de> Deserialize<'de> for PythonModule
impl<'de> Deserialize<'de> for PythonModule
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 From<PythonModule> for Module
impl From<PythonModule> for Module
Source§fn from(m: PythonModule) -> Self
fn from(m: PythonModule) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PythonModule
impl RefUnwindSafe for PythonModule
impl Send for PythonModule
impl Sync for PythonModule
impl Unpin for PythonModule
impl UnsafeUnpin for PythonModule
impl UnwindSafe for PythonModule
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