pub struct ProtoOptions {
pub java_package: Option<String>,
pub java_multiple_files: bool,
pub go_package: Option<String>,
pub csharp_namespace: Option<String>,
pub php_namespace: Option<String>,
pub ruby_package: Option<String>,
pub swift_prefix: Option<String>,
pub objc_class_prefix: Option<String>,
pub optimize_for: Option<String>,
pub deprecated: bool,
pub custom_options: Vec<ProtoCustomOption>,
}Expand description
File-level Protobuf options.
Fields§
§java_package: Option<String>Java package for generated code
java_multiple_files: boolGenerate separate files for each message in Java
go_package: Option<String>Go package path
csharp_namespace: Option<String>C# namespace
php_namespace: Option<String>PHP namespace
ruby_package: Option<String>Ruby package
swift_prefix: Option<String>Swift prefix
objc_class_prefix: Option<String>Objective-C class prefix
optimize_for: Option<String>Optimize for: SPEED, CODE_SIZE, or LITE_RUNTIME
deprecated: boolMark all messages as deprecated
custom_options: Vec<ProtoCustomOption>Custom options (user-defined or extension options)
Implementations§
Source§impl ProtoOptions
impl ProtoOptions
Sourcepub fn set_option(&mut self, name: &str, value: ProtoOptionValue)
pub fn set_option(&mut self, name: &str, value: ProtoOptionValue)
Set a standard option by name.
Trait Implementations§
Source§impl Clone for ProtoOptions
impl Clone for ProtoOptions
Source§impl Debug for ProtoOptions
impl Debug for ProtoOptions
Source§impl Default for ProtoOptions
impl Default for ProtoOptions
Source§impl<'de> Deserialize<'de> for ProtoOptions
impl<'de> Deserialize<'de> for ProtoOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for ProtoOptions
impl Freeze for ProtoOptions
impl Move for ProtoOptions
impl RefUnwindSafe for ProtoOptions
impl Send for ProtoOptionswhere
RawVecInner: Send,
impl Sync for ProtoOptionswhere
RawVecInner: Sync,
impl Unpin for ProtoOptions
impl UnsafeUnpin for ProtoOptionswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<ProtoCustomOption>: UnsafeUnpin,
impl UnwindSafe for ProtoOptionswhere
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