pub struct ProtoFile {Show 13 fields
pub source_path: String,
pub syntax: ProtoSyntax,
pub syntax_line: Option<u32>,
pub package: Option<String>,
pub package_line: Option<u32>,
pub imports: Vec<String>,
pub public_imports: Vec<String>,
pub weak_imports: Vec<String>,
pub import_lines: BTreeMap<String, u32>,
pub options: BTreeMap<String, String>,
pub messages: Vec<ProtoMessage>,
pub enums: Vec<ProtoEnum>,
pub services: Vec<ProtoService>,
}Expand description
Fully owned protobuf file contract.
Fields§
§source_path: StringRepository-relative source path supplied by the caller.
syntax: ProtoSyntaxDeclared syntax, with absent syntax represented by the proto2 default.
syntax_line: Option<u32>One-based syntax or edition declaration line.
package: Option<String>Declared package name.
package_line: Option<u32>One-based package declaration line.
imports: Vec<String>All imported protobuf paths.
public_imports: Vec<String>Imports declared with the public qualifier.
weak_imports: Vec<String>Imports declared with the weak qualifier.
import_lines: BTreeMap<String, u32>First one-based line for each imported path.
options: BTreeMap<String, String>Generator-relevant file options.
messages: Vec<ProtoMessage>Top-level messages sorted by fully qualified name.
enums: Vec<ProtoEnum>Top-level enums sorted by fully qualified name.
services: Vec<ProtoService>Services sorted by fully qualified name.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ProtoFile
impl<'de> Deserialize<'de> for ProtoFile
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
impl Eq for ProtoFile
impl StructuralPartialEq for ProtoFile
Auto Trait Implementations§
impl Freeze for ProtoFile
impl RefUnwindSafe for ProtoFile
impl Send for ProtoFile
impl Sync for ProtoFile
impl Unpin for ProtoFile
impl UnsafeUnpin for ProtoFile
impl UnwindSafe for ProtoFile
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.