pub struct AnnotationParser { /* private fields */ }Implementations§
Source§impl AnnotationParser
impl AnnotationParser
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new annotation parser.
§Panics
Panics if the internal regex pattern fails to compile (should never happen).
Sourcepub fn parse_annotations(
&self,
source: &str,
) -> Result<TranspilationAnnotations, AnnotationError>
pub fn parse_annotations( &self, source: &str, ) -> Result<TranspilationAnnotations, AnnotationError>
Sourcepub fn parse_function_annotations(
&self,
function_source: &str,
) -> Result<TranspilationAnnotations, AnnotationError>
pub fn parse_function_annotations( &self, function_source: &str, ) -> Result<TranspilationAnnotations, AnnotationError>
Parses annotations from function-specific source code.
§Errors
Returns AnnotationError if parsing fails.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AnnotationParser
impl RefUnwindSafe for AnnotationParser
impl Send for AnnotationParser
impl Sync for AnnotationParser
impl Unpin for AnnotationParser
impl UnwindSafe for AnnotationParser
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