#[repr(C)]pub struct Function {
pub attribute_lists: Sequence<AttributeList>,
pub function: Keyword,
pub ampersand: Option<Span>,
pub name: LocalIdentifier,
pub parameter_list: FunctionLikeParameterList,
pub return_type_hint: Option<FunctionLikeReturnTypeHint>,
pub body: Block,
}Expand description
Represents a function declaration in PHP.
Example:
<?php
function foo(): string {
return 'bar';
}Fields§
§attribute_lists: Sequence<AttributeList>§function: Keyword§ampersand: Option<Span>§name: LocalIdentifier§parameter_list: FunctionLikeParameterList§return_type_hint: Option<FunctionLikeReturnTypeHint>§body: BlockTrait Implementations§
Source§impl<'de> Deserialize<'de> for Function
impl<'de> Deserialize<'de> for Function
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 Ord for Function
impl Ord for Function
Source§impl PartialOrd for Function
impl PartialOrd for Function
impl Eq for Function
impl StructuralPartialEq for Function
Auto Trait Implementations§
impl Freeze for Function
impl RefUnwindSafe for Function
impl Send for Function
impl Sync for Function
impl Unpin for Function
impl UnwindSafe for Function
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