Struct php_codegen::parameter::Parameter
source ยท pub struct Parameter {
pub attributes: Vec<AttributeGroup>,
pub name: String,
pub data_type: Option<DataType>,
pub default: Option<Value>,
pub modifiers: Vec<Modifier>,
pub visibility: Option<VisibilityModifier>,
pub variadic: bool,
}
Fieldsยง
ยงattributes: Vec<AttributeGroup>
ยงname: String
ยงdata_type: Option<DataType>
ยงdefault: Option<Value>
ยงmodifiers: Vec<Modifier>
ยงvisibility: Option<VisibilityModifier>
ยงvariadic: bool
Implementationsยง
sourceยงimpl Parameter
impl Parameter
pub fn new<T: ToString>(name: T) -> Self
pub fn attributes(self, attributes: AttributeGroup) -> Self
pub fn typed(self, data_type: DataType) -> Self
pub fn variadic(self) -> Self
pub fn default<T: Into<Value>>(self, default: T) -> Self
pub fn modifier(self, modifier: Modifier) -> Self
pub fn public(self) -> Self
pub fn protected(self) -> Self
pub fn private(self) -> Self
pub fn visibility(self, visibility: VisibilityModifier) -> Self
Trait Implementationsยง
Auto Trait Implementationsยง
impl Freeze for Parameter
impl RefUnwindSafe for Parameter
impl Send for Parameter
impl Sync for Parameter
impl Unpin for Parameter
impl UnwindSafe for Parameter
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