Struct aws_smithy_eventstream::frame::DeferredSigner
source · pub struct DeferredSigner { /* private fields */ }
Expand description
Deferred event stream signer to allow a signer to be wired up later.
HTTP request signing takes place after serialization, and the event stream
message stream body is established during serialization. Since event stream
signing may need context from the initial HTTP signing operation, this
DeferredSigner
is needed to wire up the signer later in the request lifecycle.
This signer basically just establishes a MPSC channel so that the sender can be placed in the request’s config. Then the HTTP signer implementation can retrieve the sender from that config and send an actual signing implementation with all the context needed.
When an event stream implementation needs to sign a message, the first call to sign will acquire a signing implementation off of the channel and cache it for the remainder of the operation.
Implementations§
source§impl DeferredSigner
impl DeferredSigner
pub fn new() -> (Self, DeferredSignerSender)
Trait Implementations§
source§impl Debug for DeferredSigner
impl Debug for DeferredSigner
source§impl SignMessage for DeferredSigner
impl SignMessage for DeferredSigner
fn sign(&mut self, message: Message) -> Result<Message, SignMessageError>
source§fn sign_empty(&mut self) -> Option<Result<Message, SignMessageError>>
fn sign_empty(&mut self) -> Option<Result<Message, SignMessageError>>
Some(_)
to send a signed last empty message, before completing the stream.
Return None
to not send one and terminate the stream immediately.Auto Trait Implementations§
impl !Freeze for DeferredSigner
impl !RefUnwindSafe for DeferredSigner
impl Send for DeferredSigner
impl Sync for DeferredSigner
impl Unpin for DeferredSigner
impl !UnwindSafe for DeferredSigner
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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