pub struct ModernGenerator { /* private fields */ }Expand description
Modern code generator
Implementations§
Source§impl ModernGenerator
impl ModernGenerator
pub fn new(package_name: &str, service_name: &str, role: GeneratorRole) -> Self
Sourcepub fn generate(&self, methods: &[MethodDescriptorProto]) -> Result<String>
pub fn generate(&self, methods: &[MethodDescriptorProto]) -> Result<String>
Generate complete code
Sourcepub fn generate_with_remotes(
&self,
methods: &[MethodDescriptorProto],
remote_services: &[RemoteServiceInfo],
) -> Result<String>
pub fn generate_with_remotes( &self, methods: &[MethodDescriptorProto], remote_services: &[RemoteServiceInfo], ) -> Result<String>
Generate export-side code with remote forwarding
Auto Trait Implementations§
impl Freeze for ModernGenerator
impl RefUnwindSafe for ModernGenerator
impl Send for ModernGenerator
impl Sync for ModernGenerator
impl Unpin for ModernGenerator
impl UnsafeUnpin 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