pub struct ProtobufSchema {
pub package: Option<String>,
pub messages: HashMap<String, MessageDef>,
pub services: HashMap<String, ServiceDef>,
pub enums: HashMap<String, EnumDef>,
pub imports: Vec<String>,
pub syntax: String,
pub description: Option<String>,
}Expand description
Parsed Protobuf schema representation
Fields§
§package: Option<String>Package name (e.g., “com.example.service”)
messages: HashMap<String, MessageDef>Map of message names to their definitions
services: HashMap<String, ServiceDef>Map of service names to their definitions
enums: HashMap<String, EnumDef>Map of enum names to their definitions
imports: Vec<String>List of imported proto files
syntax: StringProto file syntax version (enforced to be “proto3”)
description: Option<String>Schema description/comments
Trait Implementations§
Source§impl Clone for ProtobufSchema
impl Clone for ProtobufSchema
Source§fn clone(&self) -> ProtobufSchema
fn clone(&self) -> ProtobufSchema
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProtobufSchema
impl Debug for ProtobufSchema
Source§impl<'de> Deserialize<'de> for ProtobufSchema
impl<'de> Deserialize<'de> for ProtobufSchema
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 Freeze for ProtobufSchema
impl RefUnwindSafe for ProtobufSchema
impl Send for ProtobufSchema
impl Sync for ProtobufSchema
impl Unpin for ProtobufSchema
impl UnsafeUnpin for ProtobufSchema
impl UnwindSafe for ProtobufSchema
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