Add protobuf descriptor and compiler plugin support
Implement accessors and builders for FileDescriptorSet, CodeGeneratorRequest, CodeGeneratorResponse, and related types.
This commit is contained in:
+2
-1
@@ -1,3 +1,4 @@
|
||||
pub mod proto_gen;
|
||||
use std::fmt;
|
||||
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
@@ -180,7 +181,7 @@ impl<'a> ProtoAccessor<'a> {
|
||||
}
|
||||
|
||||
/// Returns the value and wire type of the last occurrence of the specified field.
|
||||
pub fn get_value(&self, field_number: u32) -> Result<(&[u8], WireType)> {
|
||||
pub fn get_value(&self, field_number: u32) -> Result<(&'a [u8], WireType)> {
|
||||
let mut last_value = None;
|
||||
for item in self.fields() {
|
||||
let (tag, value) = item?;
|
||||
|
||||
Reference in New Issue
Block a user