pub struct IntegerReading<'a> { /* private fields */ }Expand description
An INTEGER’s original contents, numeric view and encoding diagnostic.
The original bytes are never rewritten. value() borrows a minimal suffix
of those bytes so its numeric conversions inspect at most eight significant
octets. A nonminimal source is still malformed BER/DER (X.690 §8.3.2).
Only the diagnostic path owns storage, retaining its account until drop.
Implementations§
Source§impl<'a> IntegerReading<'a>
impl<'a> IntegerReading<'a>
Sourcepub fn as_bytes(&self) -> &'a [u8] ⓘ
pub fn as_bytes(&self) -> &'a [u8] ⓘ
Original two’s-complement contents, including redundant sign octets.
Sourcepub fn value(&self) -> Integer<'a>
pub fn value(&self) -> Integer<'a>
Borrowed minimal numeric view; obtaining it performs no padding scan.
Sourcepub fn fault(&self) -> Option<&Error>
pub fn fault(&self) -> Option<&Error>
Original located minimality violation; None means minimal contents.
Sourcepub fn into_parts(self) -> (Integer<'a>, Option<Error>)
pub fn into_parts(self) -> (Integer<'a>, Option<Error>)
Move the numeric view and diagnostic without copying their storage.
Retain as_bytes() or the original element separately when wire
identity is needed. The minimal view is not a replacement signed value.