pub struct FunctionContract {
pub binding_name: Box<str>,
pub span_start: u32,
pub params: Vec<ParamFact>,
pub returns_value: bool,
pub is_async: bool,
pub incomplete: Option<ContractIncomplete>,
}Expand description
The parameter contract of a function that a module-scope binding holds:
function f() {}, or const f = () => {} and const f = function () {}.
Fields§
§binding_name: Box<str>The module-scope binding name.
span_start: u32Start byte of the binding identifier.
params: Vec<ParamFact>One fact for each formal parameter, in order. A TypeScript this
parameter is not a formal parameter.
returns_value: booltrue when a return of the function has an expression, or the arrow
function has an expression body.
is_async: booltrue for an async function declaration, function expression or
arrow function. A call of an async function always gives a promise.
incomplete: Option<ContractIncomplete>The first reason found that the extractor cannot see each use of the
parameters. None for a closed contract.
Trait Implementations§
Source§impl Clone for FunctionContract
impl Clone for FunctionContract
Source§impl Debug for FunctionContract
impl Debug for FunctionContract
impl<'__de> Decode<'__de> for FunctionContractwhere
'__de:,
impl Encode for FunctionContract
impl Eq for FunctionContract
Source§impl PartialEq for FunctionContract
impl PartialEq for FunctionContract
impl StructuralPartialEq for FunctionContract
Auto Trait Implementations§
impl Forget for FunctionContract
impl Freeze for FunctionContract
impl Move for FunctionContract
impl RefUnwindSafe for FunctionContract
impl Send for FunctionContract
impl Sync for FunctionContract
impl Unpin for FunctionContract
impl UnsafeUnpin for FunctionContract
impl UnwindSafe for FunctionContract
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DecodeOwned for Twhere
T: for<'de> Decode<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.