pub struct PendingInitiator {
pub(crate) state: State,
pub(crate) handshake: HandshakeState,
}Expand description
Request held by the initiator (the app) until the callback arrives.
Fields§
§state: State§handshake: HandshakeStateImplementations§
Source§impl PendingInitiator
impl PendingInitiator
Sourcepub fn start(
connector: Connector,
connector_url: &Url,
request: &[u8],
) -> Result<(Self, State, Url), WebConnectorError>
pub fn start( connector: Connector, connector_url: &Url, request: &[u8], ) -> Result<(Self, State, Url), WebConnectorError>
Starts a request.
Returns the pending request, its State for lookup, and the URL to open
in the browser. request is sent in plaintext, but it is authenticated: if it is modified,
decrypting the response fails.
Sourcepub fn decrypt_response(
&mut self,
callback: &Url,
) -> Result<Vec<u8>, WebConnectorError>
pub fn decrypt_response( &mut self, callback: &Url, ) -> Result<Vec<u8>, WebConnectorError>
Decrypts the response from the callback URL.
A failure leaves the request pending, so a forged callback can’t cancel it. A request can only be completed once; drop it on success, or when it expires.
Auto Trait Implementations§
impl !RefUnwindSafe for PendingInitiator
impl !UnwindSafe for PendingInitiator
impl Freeze for PendingInitiator
impl Send for PendingInitiator
impl Sync for PendingInitiator
impl Unpin for PendingInitiator
impl UnsafeUnpin for PendingInitiator
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
Consume a handle, getting back the initial
Arc<> Read more