pub enum NumPyDocstringItem {
Section(NumPySection),
StrayLine(TextRange),
}Expand description
A single item in the body of a NumPy-style docstring (after the summary and optional extended summary).
Preserving both sections and stray lines in a single ordered Vec ensures
the original source order is never lost, which matters for linters that
want to report diagnostics in document order.
Variants§
Section(NumPySection)
A recognised (or unknown-name) section with header + underline + body.
StrayLine(TextRange)
A non-blank line that appeared between sections but was neither blank nor recognised as a section header (i.e. not followed by an underline).
Typical causes include misplaced prose, a section name whose underline was accidentally omitted, or text that belongs to a previous section.
Trait Implementations§
Source§impl Clone for NumPyDocstringItem
impl Clone for NumPyDocstringItem
Source§fn clone(&self) -> NumPyDocstringItem
fn clone(&self) -> NumPyDocstringItem
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 NumPyDocstringItem
impl Debug for NumPyDocstringItem
Source§impl PartialEq for NumPyDocstringItem
impl PartialEq for NumPyDocstringItem
impl StructuralPartialEq for NumPyDocstringItem
Auto Trait Implementations§
impl Freeze for NumPyDocstringItem
impl RefUnwindSafe for NumPyDocstringItem
impl Send for NumPyDocstringItem
impl Sync for NumPyDocstringItem
impl Unpin for NumPyDocstringItem
impl UnsafeUnpin for NumPyDocstringItem
impl UnwindSafe for NumPyDocstringItem
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