pub struct ModernGenerator { /* private fields */ }Expand description
现代化代码生成器
Implementations§
Source§impl ModernGenerator
impl ModernGenerator
pub fn new(package_name: &str, service_name: &str, role: GeneratorRole) -> Self
Sourcepub fn set_manufacturer(&mut self, manufacturer: String)
pub fn set_manufacturer(&mut self, manufacturer: String)
Set manufacturer (read from Actr.toml via –actrframework_opt)
Sourcepub fn generate(&self, methods: &[MethodDescriptorProto]) -> Result<String>
pub fn generate(&self, methods: &[MethodDescriptorProto]) -> Result<String>
生成完整代码
Auto Trait Implementations§
impl Freeze for ModernGenerator
impl RefUnwindSafe for ModernGenerator
impl Send for ModernGenerator
impl Sync for ModernGenerator
impl Unpin for ModernGenerator
impl UnwindSafe for ModernGenerator
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