Skip to main content

RustCode

Struct RustCode 

Source
pub struct RustCode { /* private fields */ }

Trait Implementations§

Source§

impl Abc for RustCode

Source§

fn compute(_node: &Node<'_>, _stats: &mut Stats)

Source§

impl Alterator for RustCode

Source§

fn alterate( node: &Node<'_>, code: &[u8], span: bool, children: Vec<AstNode>, ) -> AstNode

Creates a new AST node containing the code associated to the node, its span, and its children. Read more
Source§

fn get_text_span( node: &Node<'_>, code: &[u8], span: bool, text: bool, ) -> (String, Span)

Gets the code as text and the span associated to a node.
Source§

fn get_default( node: &Node<'_>, code: &[u8], span: bool, children: Vec<AstNode>, ) -> AstNode

Gets a default AST node containing the code associated to the node, its span, and its children.
Source§

fn get_ast_node( node: &Node<'_>, code: &[u8], children: Vec<AstNode>, span: bool, comment: bool, ) -> Option<AstNode>

Gets a new AST node if and only if the code is not a comment, otherwise None is returned.
Source§

impl Cognitive for RustCode

Source§

fn compute( node: &Node<'_>, stats: &mut Stats, nesting_map: &mut HashMap<usize, (usize, usize, usize)>, )

Source§

impl Cyclomatic for RustCode

Source§

fn compute(node: &Node<'_>, stats: &mut Stats)

Source§

impl Exit for RustCode

Source§

fn compute(node: &Node<'_>, stats: &mut Stats)

Source§

impl Halstead for RustCode

Source§

fn compute<'a>( node: &Node<'a>, code: &'a [u8], halstead_maps: &mut HalsteadMaps<'a>, )

Source§

impl LanguageInfo for RustCode

Source§

impl Loc for RustCode

Source§

fn compute( node: &Node<'_>, stats: &mut Stats, is_func_space: bool, is_unit: bool, )

Source§

impl Mi for RustCode

Source§

fn compute(loc: &Stats, cyclomatic: &Stats, halstead: &Stats, stats: &mut Stats)

Source§

impl NArgs for RustCode

Source§

fn compute(node: &Node<'_>, stats: &mut Stats)

Source§

impl Nom for RustCode

Source§

fn compute(node: &Node<'_>, stats: &mut Stats)

Source§

impl Npa for RustCode

Source§

fn compute(_node: &Node<'_>, _stats: &mut Stats)

Source§

impl Npm for RustCode

Source§

fn compute(_node: &Node<'_>, _stats: &mut Stats)

Source§

impl Wmc for RustCode

Source§

fn compute(_space_kind: SpaceKind, _cyclomatic: &Stats, _stats: &mut Stats)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.