pub struct DocParser<'a> {
pub ast_parser: &'a dyn SourceParser,
pub graph: ModuleGraph,
pub private: bool,
}
Fields
ast_parser: &'a dyn SourceParser
graph: ModuleGraph
private: bool
Implementations
sourceimpl<'a> DocParser<'a>
impl<'a> DocParser<'a>
pub fn new(
graph: ModuleGraph,
private: bool,
ast_parser: &'a dyn SourceParser
) -> Self
sourcepub fn parse_module(
&self,
specifier: &ModuleSpecifier,
media_type: MediaType,
source_code: Arc<str>
) -> Result<ModuleDoc, DocError>
pub fn parse_module(
&self,
specifier: &ModuleSpecifier,
media_type: MediaType,
source_code: Arc<str>
) -> Result<ModuleDoc, DocError>
Parses a module into a list of exported items, as well as a list of reexported items which need to be fetched from other modules.
sourcepub fn parse(
&self,
specifier: &ModuleSpecifier
) -> Result<Vec<DocNode>, DocError>
pub fn parse(
&self,
specifier: &ModuleSpecifier
) -> Result<Vec<DocNode>, DocError>
Fetches file_name
and parses it.
sourcepub fn parse_source(
&self,
specifier: &ModuleSpecifier,
media_type: MediaType,
source_code: Arc<str>
) -> Result<Vec<DocNode>, DocError>
pub fn parse_source(
&self,
specifier: &ModuleSpecifier,
media_type: MediaType,
source_code: Arc<str>
) -> Result<Vec<DocNode>, DocError>
Parses a module and returns a list of exported items (no reexports).
sourcepub fn parse_with_reexports(
&self,
specifier: &ModuleSpecifier
) -> Result<Vec<DocNode>, DocError>
pub fn parse_with_reexports(
&self,
specifier: &ModuleSpecifier
) -> Result<Vec<DocNode>, DocError>
Fetches file_name
, parses it, and resolves its reexports.
pub fn get_doc_nodes_for_module_exports(
&self,
parsed_source: &ParsedSource,
module_decl: &ModuleDecl
) -> Vec<DocNode>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn get_doc_node_for_decl(
&self,
parsed_source: &ParsedSource,
decl: &Decl
) -> Option<DocNode>
pub fn get_reexports_for_module_body(
&self,
module_body: &[ModuleItem]
) -> Vec<Reexport>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn get_doc_nodes_for_module_body(
&self,
parsed_source: &ParsedSource,
module_body: Vec<ModuleItem>
) -> Vec<DocNode>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Auto Trait Implementations
impl<'a> !RefUnwindSafe for DocParser<'a>
impl<'a> !Send for DocParser<'a>
impl<'a> !Sync for DocParser<'a>
impl<'a> Unpin for DocParser<'a>
impl<'a> !UnwindSafe for DocParser<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more