#[non_exhaustive]pub enum ReflectionError {
Decode(DecodeError),
Pool(PoolError),
MalformedFraming {
offset: usize,
},
UnnamedFile {
index: usize,
},
CountMismatch {
framed: usize,
decoded: usize,
},
SharedPool,
}Expand description
Errors from building a Reflector.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Decode(DecodeError)
The bytes did not decode as a FileDescriptorSet.
Pool(PoolError)
The decoded descriptors did not link into a valid pool (dangling type reference, duplicate symbol, malformed map entry, …).
MalformedFraming
The top-level wire structure of the set was malformed (e.g. a truncated length prefix), so per-file byte ranges could not be sliced out.
UnnamedFile
A file in the set has no name field; the reflection protocol
keys every file query by name.
CountMismatch
The framing walk and the message decoder disagreed on how many
files the set contains — the bytes are not a coherent
FileDescriptorSet.
Fields
add_descriptor_set_bytes
was called on a reflector whose pool is shared (adopted via
from_descriptor_pool with
other outstanding references). Merge sets before sharing, or build
the reflector from bytes.
Trait Implementations§
Source§impl Debug for ReflectionError
impl Debug for ReflectionError
Source§impl Display for ReflectionError
impl Display for ReflectionError
Source§impl Error for ReflectionError
impl Error for ReflectionError
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()