pub struct DescriptorError { /* private fields */ }Expand description
An error that may occur while creating a DescriptorPool.
Implementations§
Source§impl DescriptorError
impl DescriptorError
Sourcepub fn line(&self) -> Option<usize>
pub fn line(&self) -> Option<usize>
The 0-based line number at which this error occurred, if available.
This field may be None if the error is not associated with a particular source location, or the
source_code_info field was not populated for the input file.
Sourcepub fn column(&self) -> Option<usize>
pub fn column(&self) -> Option<usize>
The 0-based column number at which this error occurred, if available.
This field may be None if the error is not associated with a particular source location, or the
source_code_info field was not populated for the input file.
Sourcepub fn path(&self) -> Option<&[i32]>
pub fn path(&self) -> Option<&[i32]>
Gets the path where this error occurred in the FileDescriptorProto, if available.
See path for more details on the structure of the path.
Sourcepub fn with_source_code(self, source: &str) -> Self
Available on crate feature miette only.
pub fn with_source_code(self, source: &str) -> Self
miette only.Provide source code information for this error.
The source should correspond to the contents of file().
Trait Implementations§
Source§impl Debug for DescriptorError
impl Debug for DescriptorError
Source§impl Diagnostic for DescriptorError
Available on crate feature miette only.
impl Diagnostic for DescriptorError
miette only.Source§fn code<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
fn code<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
Diagnostic. Ideally also globally unique, and documented
in the toplevel crate’s documentation for easy searching. Rust path
format (foo::bar::baz) is recommended, but more classic codes like
E0123 or enums will work just fine.Source§fn severity(&self) -> Option<Severity>
fn severity(&self) -> Option<Severity>
ReportHandlers to change the display format
of this diagnostic. Read moreSource§fn help<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
fn help<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
Diagnostic. Do you have any
advice for the poor soul who’s just run into this issue?Source§fn url<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
fn url<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
Diagnostic.Source§fn source_code(&self) -> Option<&dyn SourceCode>
fn source_code(&self) -> Option<&dyn SourceCode>
Diagnostic’s Diagnostic::labels to.Source§fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>
fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>
Diagnostic’s Diagnostic::source_codeDiagnostics.Source§fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
Source§impl Display for DescriptorError
impl Display for DescriptorError
Source§impl Error for DescriptorError
impl Error for DescriptorError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()