#[non_exhaustive]pub enum SignPayload<'a> {
Empty,
Bytes(&'a [u8]),
Sha256 {
bytes: &'a [u8],
sha256: [u8; 32],
},
Streamed,
}Expand description
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Empty
No body: a GET or a DELETE.
Bytes(&'a [u8])
The whole body of a POST or a PUT that UploadBody::bytes gives.
An empty body is also this variant.
The signer gets the whole body on each attempt, and it runs on the task
that sends the request. So the time to hash the body on that task grows
with the size of the body. For a large body,
UploadBody::bytes_with_sha256 gives the signer the SHA-256 of the
body as Sha256.
Sha256
The whole body of a POST or a PUT that
UploadBody::bytes_with_sha256 gives, with the SHA-256 of the body
that the caller computed.
The fetcher does not check the digest. A wrong digest signs other bytes than the bytes that the request sends, and the server refuses the request.
Streamed
The body of a POST or a PUT that streams from an UploadWriter.
Its bytes are not known when the fetcher calls the signer.
Trait Implementations§
Source§impl<'a> Clone for SignPayload<'a>
impl<'a> Clone for SignPayload<'a>
impl<'a> Copy for SignPayload<'a>
Source§impl Debug for SignPayload<'_>
impl Debug for SignPayload<'_>
impl<'a> Eq for SignPayload<'a>
Source§impl<'a> PartialEq for SignPayload<'a>
impl<'a> PartialEq for SignPayload<'a>
impl<'a> StructuralPartialEq for SignPayload<'a>
Auto Trait Implementations§
impl<'a> Forget for SignPayload<'a>
impl<'a> Freeze for SignPayload<'a>
impl<'a> Move for SignPayload<'a>
impl<'a> RefUnwindSafe for SignPayload<'a>
impl<'a> Send for SignPayload<'a>
impl<'a> Sync for SignPayload<'a>
impl<'a> Unpin for SignPayload<'a>
impl<'a> UnsafeUnpin for SignPayload<'a>where
&'a [u8]: UnsafeUnpin,
impl<'a> UnwindSafe for SignPayload<'a>where
&'a [u8]: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.