Skip to main content

ResponseBytes

Struct ResponseBytes 

Source
pub struct ResponseBytes<'a> { /* private fields */ }
Expand description

Original successful response payload and its producing reader. Keeping the envelope separate avoids allocating a large basic response for protocol failures or unsupported types; decoding moves the existing reader.

Implementations§

Source§

impl<'a> ResponseBytes<'a>

Source

pub fn as_bytes(&self) -> &'a [u8] ⓘ

Whole original successful OCSPResponse DER, including status and responseBytes wrapper. RFC6960 §4.2.1 separates this envelope from the signed BasicOCSPResponse payload. Reference digests must not substitute the payload or a re-encoded envelope for these original bytes. https://www.rfc-editor.org/rfc/rfc6960#section-4.2.1

Source

pub fn kind(&self) -> Oid<'a>

Original response syntax identifier.

Source

pub fn payload(&self) -> &'a [u8] ⓘ

Original encoded response payload.

Source

pub fn span(&self) -> Span

Original payload content location.

Source

pub fn basic_in<'query>( &self, query: &Reader<'query>, ) -> Result<Option<BasicResponse<'query>>>
where 'a: 'query,

Borrows the original basic-response payload under a current operation. The envelope is not consumed or cloned. Its original producing parser, source offsets and actual depth remain active, while the supplied query funds new decoding, catalogue growth and lazy certificate processing. None is only an unsupported response syntax, never a malformed known basic response or a source/current-operation resource refusal.

Source

pub fn into_basic(self, execution: &Memory) -> Result<Option<BasicResponse<'a>>>

Decode the mandatory basic response syntax using current execution. None means unsupported syntax. The producing reader’s cumulative work/depth limits remain active; no extra parser or reader copy is made.

Trait Implementations§

Source§

impl<'a> Debug for ResponseBytes<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> !Freeze for ResponseBytes<'a>

§

impl<'a> !RefUnwindSafe for ResponseBytes<'a>

§

impl<'a> !Send for ResponseBytes<'a>

§

impl<'a> !Sync for ResponseBytes<'a>

§

impl<'a> !UnwindSafe for ResponseBytes<'a>

§

impl<'a> Unpin for ResponseBytes<'a>

§

impl<'a> UnsafeUnpin for ResponseBytes<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.