pub struct FileDescriptor { /* private fields */ }Expand description
A handle to a file descriptor within a DescriptorPool.
Implementations§
Source§impl FileDescriptor
impl FileDescriptor
Sourcepub fn package_name(&self) -> &str
pub fn package_name(&self) -> &str
The protobuf package, e.g. "my.package" (empty if none).
Sourcepub fn dependencies(&self) -> impl Iterator<Item = &str> + '_
pub fn dependencies(&self) -> impl Iterator<Item = &str> + '_
The names of imported (dependency) files.
Sourcepub fn java_package(&self) -> Option<&str>
pub fn java_package(&self) -> Option<&str>
The java_package file option, if set.
Sourcepub fn go_package(&self) -> Option<&str>
pub fn go_package(&self) -> Option<&str>
The go_package file option, if set.
Sourcepub fn java_outer_classname(&self) -> Option<&str>
pub fn java_outer_classname(&self) -> Option<&str>
The java_outer_classname file option, if set.
Sourcepub fn is_deprecated(&self) -> bool
pub fn is_deprecated(&self) -> bool
Returns true if the deprecated file option is set to true.
Sourcepub fn optimize_for(&self) -> i32
pub fn optimize_for(&self) -> i32
The raw optimize_for option value (0 = SPEED, 2 = CODE_SIZE, 3 =
LITE_RUNTIME; 0 is the default when unset).
Trait Implementations§
Source§impl Clone for FileDescriptor
impl Clone for FileDescriptor
Source§fn clone(&self) -> FileDescriptor
fn clone(&self) -> FileDescriptor
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 FileDescriptor
impl Debug for FileDescriptor
Source§impl PartialEq for FileDescriptor
impl PartialEq for FileDescriptor
Auto Trait Implementations§
impl Freeze for FileDescriptor
impl RefUnwindSafe for FileDescriptor
impl Send for FileDescriptor
impl Sync for FileDescriptor
impl Unpin for FileDescriptor
impl UnsafeUnpin for FileDescriptor
impl UnwindSafe for FileDescriptor
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