Struct protobuf_native::FileDescriptorSet

source ·
pub struct FileDescriptorSet { /* private fields */ }
Expand description

The protocol compiler can output a file descriptor set containing the .proto files it parses.

Implementations§

source§

impl FileDescriptorSet

source

pub fn file_size(&self) -> usize

Returns the number of file descriptors in the file descriptor set.

source

pub fn clear_file(self: Pin<&mut Self>)

Clears the file descriptors.

source

pub fn file(&self, i: usize) -> &FileDescriptorProto

Returns a reference the ith file descriptor.

source

pub fn file_mut(self: Pin<&mut Self>, i: usize) -> Pin<&mut FileDescriptorProto>

Returns a mutable reference to the ith file descriptor.

source

pub fn add_file(self: Pin<&mut Self>) -> Pin<&mut FileDescriptorProto>

Adds a new empty file descriptor and returns a mutable reference to it.

Trait Implementations§

source§

impl Drop for FileDescriptorSet

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl MessageLite for FileDescriptorSet

source§

fn new(&self) -> Pin<Box<dyn MessageLite>>

Constructs a new instance of the same type.
source§

fn clear(self: Pin<&mut Self>)

Clears all fields of the message and set them to their default values. Read more
source§

fn is_initialized(&self) -> bool

Quickly checks if all required fields have been set.
source§

fn merge_from_coded_stream( self: Pin<&mut Self>, input: Pin<&mut CodedInputStream<'_>> ) -> Result<(), OperationFailedError>

Reads a protocol buffer from the stream and merges it into this message. Read more
source§

fn serialize_to_coded_stream( &self, output: Pin<&mut CodedOutputStream<'_>> ) -> Result<(), OperationFailedError>

Writes a protocol buffer of this message to the given output. Read more
source§

fn serialize_to_zero_copy_stream( &self, output: Pin<&mut dyn ZeroCopyOutputStream> ) -> Result<(), OperationFailedError>

Writes the message to the given zero-copy output stream. Read more
source§

fn serialize_to_writer( &self, output: &mut dyn Write ) -> Result<(), OperationFailedError>

Writes the message to the given Write implementor. Read more
source§

fn serialize(&self) -> Result<Vec<u8>, OperationFailedError>

Serializes the message to a byte vector. Read more
source§

fn byte_size(&self) -> usize

Computes the serialized size of the message. Read more
source§

impl Message for FileDescriptorSet

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.