pub struct DocCodeGetterCollector<P: TokenStreamGetterCollector> { /* private fields */ }Expand description
A generic Getters collector visting documentation.
When parsing Rust code with syn, documentation lines are
passed as Attributes, one line at a time.
The generic DocCodeGetterCollector allows gathering the
documentation code lines together and collecting the
Getters using the provided
TokenStreamGetterCollector.
Implementations§
Source§impl<P: TokenStreamGetterCollector> DocCodeGetterCollector<P>
impl<P: TokenStreamGetterCollector> DocCodeGetterCollector<P>
Sourcepub fn new(
path: &Path,
identification_mode: IdentificationMode,
getter_collection: &P::GetterCollection,
) -> Self
pub fn new( path: &Path, identification_mode: IdentificationMode, getter_collection: &P::GetterCollection, ) -> Self
Builds a DocCodeGetterCollector.
Getters will be added to the provided GetterCollection.
Documentation alias attributes will be discarded.
Sourcepub fn have_attribute(&mut self, node: &Attribute)
pub fn have_attribute(&mut self, node: &Attribute)
Analyses the documentation in the provided Attribute.
Note that documentation code is parsed by syn one line at a time,
this method will take care of parsing any code found in the provided
Attributes and feeding the GetterCollection.
Trait Implementations§
Source§impl<P: Debug + TokenStreamGetterCollector> Debug for DocCodeGetterCollector<P>where
P::GetterCollection: Debug,
impl<P: Debug + TokenStreamGetterCollector> Debug for DocCodeGetterCollector<P>where
P::GetterCollection: Debug,
Auto Trait Implementations§
impl<P> Freeze for DocCodeGetterCollector<P>
impl<P> RefUnwindSafe for DocCodeGetterCollector<P>
impl<P> Send for DocCodeGetterCollector<P>
impl<P> Sync for DocCodeGetterCollector<P>
impl<P> Unpin for DocCodeGetterCollector<P>
impl<P> UnwindSafe for DocCodeGetterCollector<P>
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