Struct hotspots_parser::go::GoParser
source · pub struct GoParser { /* private fields */ }
Expand description
This parser can parse any Go files.
Implementations§
Trait Implementations§
source§impl Parser for GoParser
impl Parser for GoParser
source§fn func_repr(&self, v: Vec<Element>) -> (Vec<Element>, usize)
fn func_repr(&self, v: Vec<Element>) -> (Vec<Element>, usize)
Returns a new vector with the representation names for functions. In case of go, we want to remove the receiver from the method name, and inform the caller that we removed one element from the vector.
source§fn ro_container(&self) -> &Container
fn ro_container(&self) -> &Container
Returns a reference to the container.
source§fn add_file(&mut self, f: File) -> Result<(), Error>
fn add_file(&mut self, f: File) -> Result<(), Error>
Will return an error if the file is not compatible with the Parser.
source§fn files(&self) -> Result<&[File], Error>
fn files(&self) -> Result<&[File], Error>
Returns a mutable reference to the given files. It returns and error if the file can’t be
read.
source§fn filter_name(&mut self, s: String)
fn filter_name(&mut self, s: String)
Adds the filter for excluding functions.
source§fn find_functions(&mut self, pb: &ProgressBar) -> Result<Vec<Element>, Error>
fn find_functions(&mut self, pb: &ProgressBar) -> Result<Vec<Element>, Error>
Returns all the functions in all files. It returns and error if the file can’t be read, or
the language parser can’t parse the contents.
Auto Trait Implementations§
impl RefUnwindSafe for GoParser
impl Send for GoParser
impl Sync for GoParser
impl Unpin for GoParser
impl UnwindSafe for GoParser
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