Struct php_codegen::enum::Enum
source ยท pub struct Enum {
pub documentation: Option<Document>,
pub attributes: Vec<AttributeGroup>,
pub name: String,
pub backing_type: Option<EnumBackingType>,
pub implements: Vec<String>,
pub usages: Vec<Usage>,
pub constants: Vec<ClassConstant>,
pub cases: Vec<EnumCase>,
pub methods: Vec<Method>,
}Fieldsยง
ยงdocumentation: Option<Document>ยงattributes: Vec<AttributeGroup>ยงname: Stringยงbacking_type: Option<EnumBackingType>ยงimplements: Vec<String>ยงusages: Vec<Usage>ยงconstants: Vec<ClassConstant>ยงcases: Vec<EnumCase>ยงmethods: Vec<Method>Implementationsยง
sourceยงimpl Enum
impl Enum
pub fn new<T: ToString>(name: T) -> Self
pub fn document(self, documentation: Document) -> Self
pub fn attributes(self, attributes: AttributeGroup) -> Self
pub fn implements<T: ToString>(self, implements: T) -> Self
pub fn int_backed(self) -> Self
pub fn string_backed(self) -> Self
pub fn backed(self, backing_type: EnumBackingType) -> Self
pub fn using<T: Into<Usage>>(self, usage: T) -> Self
pub fn constant<T: Into<ClassConstant>>(self, constant: T) -> Self
pub fn case<T: Into<EnumCase>>(self, case: T) -> Self
pub fn method(self, method: Method) -> Self
Trait Implementationsยง
Auto Trait Implementationsยง
impl Freeze for Enum
impl !RefUnwindSafe for Enum
impl !Send for Enum
impl !Sync for Enum
impl Unpin for Enum
impl !UnwindSafe for Enum
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