pub struct Docstring {
pub value: String,
pub raw: String,
pub lineno: usize,
pub endlineno: usize,
}Expand description
A comment block next to a declaration.
value is the comment text with the comment markers removed and the common
indentation taken off, as maxx’s docstring extraction does. There is no
section parsing here: raw is the exact source text of the block, and
lineno/endlineno are its span (1-based, inclusive).
Fields§
§value: StringThe comment text, markers removed.
raw: StringThe exact source text of the comment block.
lineno: usizeFirst line of the block (1-based).
endlineno: usizeLast line of the block (1-based, inclusive).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Docstring
impl<'de> Deserialize<'de> for Docstring
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
impl Eq for Docstring
impl StructuralPartialEq for Docstring
Auto Trait Implementations§
impl Forget for Docstring
impl Freeze for Docstring
impl Move for Docstring
impl RefUnwindSafe for Docstring
impl Send for Docstring
impl Sync for Docstring
impl Unpin for Docstring
impl UnsafeUnpin for Docstring
impl UnwindSafe for Docstring
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.