pub struct J2kView<'a> { /* private fields */ }Expand description
Borrowed parse result for a JP2 or raw JPEG 2000 / HTJ2K codestream.
Use this when a caller wants to inspect metadata once and build a decoder later without copying compressed tile bytes.
Implementations§
Source§impl<'a> J2kView<'a>
impl<'a> J2kView<'a>
Sourcepub fn parse_with_settings(
input: &'a [u8],
settings: DecodeSettings,
) -> Result<Self, J2kError>
pub fn parse_with_settings( input: &'a [u8], settings: DecodeSettings, ) -> Result<Self, J2kError>
Parse container/codestream metadata with a per-image validation policy.
DecodeSettings::default is strict. Explicit lenient mode is limited
to the JP2/JPH metadata recoveries documented by
DecodeSettings::lenient.
§Errors
Returns J2kError when the input is unsupported or malformed outside
the selected policy’s documented recovery boundary.
Sourcepub fn support_info(&self) -> Option<&J2kSupportInfo>
pub fn support_info(&self) -> Option<&J2kSupportInfo>
Full JPEG 2000 / HTJ2K support metadata when header parsing classified the payload without falling back to backend-only inspection.
Sourcepub fn passthrough_candidate(&self) -> Option<PassthroughCandidate<'a>>
pub fn passthrough_candidate(&self) -> Option<PassthroughCandidate<'a>>
Return a byte-preserving passthrough candidate when the native parser classified the compressed syntax and payload shape.
Auto Trait Implementations§
impl<'a> Freeze for J2kView<'a>
impl<'a> RefUnwindSafe for J2kView<'a>
impl<'a> Send for J2kView<'a>
impl<'a> Sync for J2kView<'a>
impl<'a> Unpin for J2kView<'a>
impl<'a> UnsafeUnpin for J2kView<'a>
impl<'a> UnwindSafe for J2kView<'a>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more