pub struct TrustedDataLoadReservation<'a> { /* private fields */ }Expand description
A one-shot reservation for a trusted native HTML load.
It is issued for one exact WebView and can neither be cloned nor moved
to another view. Consumers register Self::intent with their own
document state before calling Self::load. Dropping it, or a failed
load, revokes the intent before it can become an admission.
Implementations§
Source§impl TrustedDataLoadReservation<'_>
impl TrustedDataLoadReservation<'_>
Sourcepub fn intent(&self) -> TrustedLoadIntent
pub fn intent(&self) -> TrustedLoadIntent
The opaque token to register before initiating the native load.
Sourcepub fn disarm(self) -> TrustedLoadIntent
pub fn disarm(self) -> TrustedLoadIntent
Keep the issued token live without calling load. Used when the HTML is
delivered through a scheme handler for the same navigation.
Sourcepub fn load(
self,
request: LoadDataRequest<'_>,
) -> Result<TrustedLoadIntent, WebViewError>
pub fn load( self, request: LoadDataRequest<'_>, ) -> Result<TrustedLoadIntent, WebViewError>
Consume this reservation and start its one native HTML load.
Trait Implementations§
Source§impl Drop for TrustedDataLoadReservation<'_>
impl Drop for TrustedDataLoadReservation<'_>
Auto Trait Implementations§
impl<'a> Freeze for TrustedDataLoadReservation<'a>
impl<'a> RefUnwindSafe for TrustedDataLoadReservation<'a>
impl<'a> Send for TrustedDataLoadReservation<'a>
impl<'a> Sync for TrustedDataLoadReservation<'a>
impl<'a> Unpin for TrustedDataLoadReservation<'a>
impl<'a> UnsafeUnpin for TrustedDataLoadReservation<'a>
impl<'a> UnwindSafe for TrustedDataLoadReservation<'a>
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