pub struct StructBuilder { /* private fields */ }Expand description
Helper to build a struct with attributes.
Implementations§
Source§impl StructBuilder
impl StructBuilder
pub fn new(name: &str) -> Self
pub fn add_attr(&mut self, attr: &str) -> &mut Self
pub fn add_derive(&mut self, derive: &str) -> &mut Self
pub fn add_field( &mut self, name: &str, ty: &str, attrs: Vec<String>, ) -> &mut Self
pub fn add_field_with_doc( &mut self, name: &str, ty: &str, attrs: Vec<String>, doc: &str, ) -> &mut Self
pub fn build(&self) -> String
Auto Trait Implementations§
impl Forget for StructBuilder
impl Freeze for StructBuilder
impl Move for StructBuilder
impl RefUnwindSafe for StructBuilder
impl Send for StructBuilderwhere
RawVecInner: Send,
impl Sync for StructBuilderwhere
RawVecInner: Sync,
impl Unpin for StructBuilder
impl UnsafeUnpin for StructBuilderwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<(String, String, Vec<String>, String)>: UnsafeUnpin,
impl UnwindSafe for StructBuilderwhere
RawVecInner: UnwindSafe,
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