pub struct FunctionSignature { /* private fields */ }
Implementations§
Source§impl FunctionSignature
impl FunctionSignature
pub fn new( name: Identifier, parameters: Vec<FunctionParameter>, target_type: FunctionType, ) -> Self
pub fn named(name: Identifier, target_type: FunctionType) -> Self
pub fn with_parameters<I>(self, parameters: I) -> Selfwhere
I: IntoIterator<Item = FunctionParameter>,
pub fn has_parameters(&self) -> bool
pub fn parameters_len(&self) -> usize
pub fn parameters(&self) -> impl Iterator<Item = &FunctionParameter>
pub fn parameters_mut(&mut self) -> impl Iterator<Item = &mut FunctionParameter>
pub fn add_to_parameters<I>(&mut self, value: I)where
I: Into<FunctionParameter>,
pub fn extend_parameters<I>(&mut self, extension: I)where
I: IntoIterator<Item = FunctionParameter>,
pub const fn target_type(&self) -> &FunctionType
pub fn set_target_type(&mut self, target_type: FunctionType)
Trait Implementations§
Source§impl Clone for FunctionSignature
impl Clone for FunctionSignature
Source§fn clone(&self) -> FunctionSignature
fn clone(&self) -> FunctionSignature
Returns a duplicate of the value. Read more
1.0.0 · 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 FunctionSignature
impl Debug for FunctionSignature
Source§impl<'de> Deserialize<'de> for FunctionSignature
impl<'de> Deserialize<'de> for FunctionSignature
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 HasName for FunctionSignature
impl HasName for FunctionSignature
Source§fn name(&self) -> &Identifier
fn name(&self) -> &Identifier
Get the name of the enclosing type.
Source§fn set_name(&mut self, name: Identifier)
fn set_name(&mut self, name: Identifier)
Set the name of the enclosing type.
Source§impl HasSourceSpan for FunctionSignature
impl HasSourceSpan for FunctionSignature
fn with_source_span(self, span: Span) -> Self
fn source_span(&self) -> Option<&Span>
fn set_source_span(&mut self, span: Span)
fn unset_source_span(&mut self)
fn has_source_span(&self) -> bool
Auto Trait Implementations§
impl Freeze for FunctionSignature
impl RefUnwindSafe for FunctionSignature
impl Send for FunctionSignature
impl Sync for FunctionSignature
impl Unpin for FunctionSignature
impl UnwindSafe for FunctionSignature
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