pub struct RustdocJsonParser;Expand description
Parser for rustdoc JSON output.
Implementations§
Source§impl RustdocJsonParser
impl RustdocJsonParser
Sourcepub fn parse(
json: &str,
options: &RustdocParseOptions,
) -> Result<RustdocParseOutput, RustdocParseError>
pub fn parse( json: &str, options: &RustdocParseOptions, ) -> Result<RustdocParseOutput, RustdocParseError>
Parses rustdoc JSON into symbols and doc blocks.
§Errors
Returns RustdocParseError if the JSON is invalid or cannot be parsed.
Sourcepub async fn parse_async(
json: String,
options: RustdocParseOptions,
) -> Result<RustdocParseOutput, RustdocParseError>
pub async fn parse_async( json: String, options: RustdocParseOptions, ) -> Result<RustdocParseOutput, RustdocParseError>
Parses rustdoc JSON asynchronously using a blocking task.
§Errors
Returns RustdocParseError if parsing fails or the task panics.
Sourcepub async fn parse_file(
path: impl AsRef<Path>,
options: RustdocParseOptions,
) -> Result<RustdocParseOutput, RustdocParseError>
pub async fn parse_file( path: impl AsRef<Path>, options: RustdocParseOptions, ) -> Result<RustdocParseOutput, RustdocParseError>
Parses rustdoc JSON from a file path asynchronously.
§Errors
Returns RustdocParseError if the file cannot be read or the JSON cannot be parsed.
Auto Trait Implementations§
impl Freeze for RustdocJsonParser
impl RefUnwindSafe for RustdocJsonParser
impl Send for RustdocJsonParser
impl Sync for RustdocJsonParser
impl Unpin for RustdocJsonParser
impl UnwindSafe for RustdocJsonParser
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more