Struct php_codegen::method::Method
source ยท pub struct Method {
pub documentation: Option<Document>,
pub attributes: Vec<AttributeGroup>,
pub name: String,
pub parameters: Vec<Parameter>,
pub return_type: Option<DataType>,
pub body: Body,
pub modifiers: Vec<Modifier>,
pub visibility: Option<VisibilityModifier>,
}
Fieldsยง
ยงdocumentation: Option<Document>
ยงattributes: Vec<AttributeGroup>
ยงname: String
ยงparameters: Vec<Parameter>
ยงreturn_type: Option<DataType>
ยงbody: Body
ยงmodifiers: Vec<Modifier>
ยงvisibility: Option<VisibilityModifier>
Implementationsยง
sourceยงimpl Method
impl Method
pub fn new<T: ToString>(name: T) -> Self
pub fn document(self, documentation: Document) -> Self
pub fn attributes(self, attributes: AttributeGroup) -> Self
pub fn public(self) -> Self
pub fn protected(self) -> Self
pub fn private(self) -> Self
pub fn visibility(self, visibility: VisibilityModifier) -> Self
pub fn modifier(self, modifier: Modifier) -> Self
pub fn parameter(self, parameter: Parameter) -> Self
pub fn returns(self, return_type: DataType) -> Self
pub fn body<T: Into<Body>>(self, body: T) -> Self
Trait Implementationsยง
Auto Trait Implementationsยง
impl Freeze for Method
impl !RefUnwindSafe for Method
impl !Send for Method
impl !Sync for Method
impl Unpin for Method
impl !UnwindSafe for Method
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