pub struct ProtoCustomOption {
pub name: String,
pub value: ProtoOptionValue,
}Expand description
A custom proto option (user-defined or extension).
Fields§
§name: StringOption name (e.g., “java_package” or “(myopt).field”)
value: ProtoOptionValueOption value
Implementations§
Source§impl ProtoCustomOption
impl ProtoCustomOption
Sourcepub fn new(name: impl Into<String>, value: ProtoOptionValue) -> Self
pub fn new(name: impl Into<String>, value: ProtoOptionValue) -> Self
Create a new custom option.
Sourcepub fn to_proto_string(&self) -> String
pub fn to_proto_string(&self) -> String
Serialize to proto option string.
Trait Implementations§
Source§impl Clone for ProtoCustomOption
impl Clone for ProtoCustomOption
Source§impl Debug for ProtoCustomOption
impl Debug for ProtoCustomOption
Source§impl<'de> Deserialize<'de> for ProtoCustomOption
impl<'de> Deserialize<'de> for ProtoCustomOption
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
Source§impl PartialEq for ProtoCustomOption
impl PartialEq for ProtoCustomOption
Source§impl Serialize for ProtoCustomOption
impl Serialize for ProtoCustomOption
impl StructuralPartialEq for ProtoCustomOption
Auto Trait Implementations§
impl Forget for ProtoCustomOption
impl Freeze for ProtoCustomOption
impl Move for ProtoCustomOption
impl RefUnwindSafe for ProtoCustomOption
impl Send for ProtoCustomOptionwhere
RawVecInner: Send,
impl Sync for ProtoCustomOptionwhere
RawVecInner: Sync,
impl Unpin for ProtoCustomOption
impl UnsafeUnpin for ProtoCustomOption
impl UnwindSafe for ProtoCustomOptionwhere
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