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.