Skip to main content

CanonicalSigningInput

Struct CanonicalSigningInput 

Source
pub struct CanonicalSigningInput<'storage, 'request> { /* private fields */ }
Expand description

Cleanup-owning canonical input that retains the exact hashed request.

Implementations§

Source§

impl<'storage, 'request> CanonicalSigningInput<'storage, 'request>

Source

pub fn new_hashed<H: RequestBodyHasher + ?Sized>( request: TransportRequest<'request>, context: SigningContext<'request>, selected_headers: SigningHeaders<'_>, freshness: SigningFreshness<'_>, hasher: &H, digest_storage: &mut [u8], output: &'storage mut [u8], ) -> Result<Self, SigningBuildError<H::Error>>

Hashes the exact request body and builds a security-domain-bound input.

Source

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

Returns the exact bytes to hash or sign.

Source

pub const fn request(&self) -> TransportRequest<'request>

Returns the exact request retained by the canonical snapshot.

Source

pub const fn context(&self) -> SigningContext<'request>

Returns the exact security domain retained by the canonical snapshot.

Source

pub fn sign_into<'signature, S: RequestSigner>( self, signer: &S, output: &'signature mut [u8], ) -> Result<SignedRequest<'signature, 'request>, SigningOutputError<S::Error>>

Signs and returns the exact request with cleanup-owning bounded output.

Trait Implementations§

Source§

impl Debug for CanonicalSigningInput<'_, '_>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Drop for CanonicalSigningInput<'_, '_>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

§

impl<'storage, 'request> !UnwindSafe for CanonicalSigningInput<'storage, 'request>

§

impl<'storage, 'request> Freeze for CanonicalSigningInput<'storage, 'request>

§

impl<'storage, 'request> RefUnwindSafe for CanonicalSigningInput<'storage, 'request>

§

impl<'storage, 'request> Send for CanonicalSigningInput<'storage, 'request>

§

impl<'storage, 'request> Sync for CanonicalSigningInput<'storage, 'request>

§

impl<'storage, 'request> Unpin for CanonicalSigningInput<'storage, 'request>

§

impl<'storage, 'request> UnsafeUnpin for CanonicalSigningInput<'storage, 'request>

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.