pub struct AbortController { /* private fields */ }
Expand description
An interface that allows you to abort in-flight Fetch requests.
Implementations§
Source§impl AbortController
impl AbortController
Sourcepub fn signal(&self) -> AbortSignal
pub fn signal(&self) -> AbortSignal
Gets a AbortSignal which can be passed to a cancellable operation.
Sourcepub fn abort(self)
pub fn abort(self)
Aborts any operation using a AbortSignal created from this controller.
Sourcepub fn abort_with_reason(self, reason: impl Into<JsValue>)
pub fn abort_with_reason(self, reason: impl Into<JsValue>)
Aborts any operation using a AbortSignal created from this controller with the provided reason.
Trait Implementations§
Source§impl Debug for AbortController
impl Debug for AbortController
Auto Trait Implementations§
impl Freeze for AbortController
impl RefUnwindSafe for AbortController
impl !Send for AbortController
impl !Sync for AbortController
impl Unpin for AbortController
impl UnwindSafe for AbortController
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