pub trait LengthResolver: Debug {
// Required method
fn resolve_length(&self, id: ObjectId) -> Result<usize>;
}Expand description
Resolves a /Length that is an indirect object.
The parser cannot follow references on its own — that needs the object
table — so crate::Document supplies this when it parses a stream whose
/Length is n g R. Without a resolver the payload is delimited by
scanning for endstream instead.
Required Methods§
Sourcefn resolve_length(&self, id: ObjectId) -> Result<usize>
fn resolve_length(&self, id: ObjectId) -> Result<usize>
The byte length of the object id points at.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".