pub struct FormalParameterList { /* private fields */ }Expand description
A list of FormalParameters that describes the parameters of a function, as defined by the spec.
Implementations§
Source§impl FormalParameterList
impl FormalParameterList
Sourcepub fn from_parameters(parameters: Vec<FormalParameter>) -> Self
pub fn from_parameters(parameters: Vec<FormalParameter>) -> Self
Creates a FormalParameterList from a list of FormalParameters.
Sourcepub const fn length(&self) -> u32
pub const fn length(&self) -> u32
Returns the length of the parameter list. Note that this is not equal to the length of the parameters slice.
Sourcepub const fn flags(&self) -> FormalParameterListFlags
pub const fn flags(&self) -> FormalParameterListFlags
Returns the parameter list flags.
Sourcepub const fn has_duplicates(&self) -> bool
pub const fn has_duplicates(&self) -> bool
Indicates if the parameter list has duplicate parameters.
Sourcepub const fn has_rest_parameter(&self) -> bool
pub const fn has_rest_parameter(&self) -> bool
Indicates if the parameter list has a rest parameter.
Sourcepub const fn has_expressions(&self) -> bool
pub const fn has_expressions(&self) -> bool
Indicates if the parameter list has expressions in it’s parameters.
Sourcepub const fn has_arguments(&self) -> bool
pub const fn has_arguments(&self) -> bool
Indicates if the parameter list has parameters named ‘arguments’.
Trait Implementations§
Source§impl<'a> Arbitrary<'a> for FormalParameterList
Available on crate feature arbitrary only.
impl<'a> Arbitrary<'a> for FormalParameterList
Available on crate feature
arbitrary only.Source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Generate an arbitrary value of
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Generate an arbitrary value of
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreSource§impl AsRef<[FormalParameter]> for FormalParameterList
impl AsRef<[FormalParameter]> for FormalParameterList
Source§fn as_ref(&self) -> &[FormalParameter]
fn as_ref(&self) -> &[FormalParameter]
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for FormalParameterList
impl Clone for FormalParameterList
Source§fn clone(&self) -> FormalParameterList
fn clone(&self) -> FormalParameterList
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FormalParameterList
impl Debug for FormalParameterList
Source§impl Default for FormalParameterList
impl Default for FormalParameterList
Source§fn default() -> FormalParameterList
fn default() -> FormalParameterList
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FormalParameterList
impl<'de> Deserialize<'de> for FormalParameterList
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> From<&'a FormalParameterList> for NodeRef<'a>
impl<'a> From<&'a FormalParameterList> for NodeRef<'a>
Source§fn from(node: &'a FormalParameterList) -> NodeRef<'a>
fn from(node: &'a FormalParameterList) -> NodeRef<'a>
Converts to this type from the input type.
Source§impl<'a> From<&'a mut FormalParameterList> for NodeRefMut<'a>
impl<'a> From<&'a mut FormalParameterList> for NodeRefMut<'a>
Source§fn from(node: &'a mut FormalParameterList) -> NodeRefMut<'a>
fn from(node: &'a mut FormalParameterList) -> NodeRefMut<'a>
Converts to this type from the input type.
Source§impl From<FormalParameter> for FormalParameterList
impl From<FormalParameter> for FormalParameterList
Source§fn from(parameter: FormalParameter) -> Self
fn from(parameter: FormalParameter) -> Self
Converts to this type from the input type.
Source§impl From<Vec<FormalParameter>> for FormalParameterList
impl From<Vec<FormalParameter>> for FormalParameterList
Source§fn from(parameters: Vec<FormalParameter>) -> Self
fn from(parameters: Vec<FormalParameter>) -> Self
Converts to this type from the input type.
Source§impl PartialEq for FormalParameterList
impl PartialEq for FormalParameterList
Source§impl Serialize for FormalParameterList
impl Serialize for FormalParameterList
impl StructuralPartialEq for FormalParameterList
Source§impl VisitWith for FormalParameterList
impl VisitWith for FormalParameterList
Source§fn visit_with<'a, V>(&'a self, visitor: &mut V) -> ControlFlow<V::BreakTy>where
V: Visitor<'a>,
fn visit_with<'a, V>(&'a self, visitor: &mut V) -> ControlFlow<V::BreakTy>where
V: Visitor<'a>,
Visit this node with the provided visitor.
Source§fn visit_with_mut<'a, V>(
&'a mut self,
visitor: &mut V,
) -> ControlFlow<V::BreakTy>where
V: VisitorMut<'a>,
fn visit_with_mut<'a, V>(
&'a mut self,
visitor: &mut V,
) -> ControlFlow<V::BreakTy>where
V: VisitorMut<'a>,
Visit this node with the provided visitor mutably, allowing the visitor to modify private
fields.
Auto Trait Implementations§
impl !RefUnwindSafe for FormalParameterList
impl !Send for FormalParameterList
impl !Sync for FormalParameterList
impl !UnwindSafe for FormalParameterList
impl Freeze for FormalParameterList
impl Unpin for FormalParameterList
impl UnsafeUnpin for FormalParameterList
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