Struct rqjs_cli::modules::events::AbortSignal
source · pub struct AbortSignal<'js> {
pub sender: Sender<Value<'js>>,
/* private fields */
}Fields§
§sender: Sender<Value<'js>>Implementations§
source§impl<'js> AbortSignal<'js>
impl<'js> AbortSignal<'js>
pub const js_throw_if_aborted: __impl_throw_if_aborted = __impl_throw_if_aborted
pub const js_any: __impl_any = __impl_any
pub const js_abort: __impl_abort = __impl_abort
pub const js_timeout: __impl_timeout = __impl_timeout
source§impl<'js> AbortSignal<'js>
impl<'js> AbortSignal<'js>
pub fn throw_if_aborted(&self, ctx: Ctx<'js>) -> Result<()>
pub fn any(ctx: Ctx<'js>, signals: Array<'js>) -> Result<Class<'js, Self>>
pub fn send_aborted(this: This<Class<'js, Self>>, ctx: Ctx<'js>) -> Result<()>
pub fn abort(ctx: Ctx<'js>, reason: Opt<Value<'js>>) -> Result<Class<'js, Self>>
pub fn timeout(ctx: Ctx<'js>, milliseconds: u64) -> Result<Class<'js, Self>>
pub fn get_on_abort(&self) -> Option<Function<'js>>
pub fn set_on_abort( this: This<Class<'js, Self>>, ctx: Ctx<'js>, listener: Function<'js>, ) -> Result<()>
pub fn aborted(&self) -> bool
pub fn reason(&self) -> Option<Value<'js>>
pub fn set_reason(&mut self, reason: Opt<Value<'js>>)
pub fn new() -> Self
Trait Implementations§
source§impl<'js> Clone for AbortSignal<'js>
impl<'js> Clone for AbortSignal<'js>
source§fn clone(&self) -> AbortSignal<'js>
fn clone(&self) -> AbortSignal<'js>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<'js> ConstructorCreator<'js, AbortSignal<'js>> for ConstructorCreate<AbortSignal<'js>>
impl<'js> ConstructorCreator<'js, AbortSignal<'js>> for ConstructorCreate<AbortSignal<'js>>
fn create_constructor(&self, ctx: &Ctx<'js>) -> Result<Option<Constructor<'js>>>
source§impl<'js> Default for AbortSignal<'js>
impl<'js> Default for AbortSignal<'js>
source§impl<'js> Emitter<'js> for AbortSignal<'js>
impl<'js> Emitter<'js> for AbortSignal<'js>
fn get_event_list(&self) -> Arc<RwLock<EventList<'js>>>
fn on_event_changed( &mut self, _event: EventKey<'js>, _added: bool, ) -> Result<()>
fn add_event_emitter_prototype(ctx: &Ctx<'js>) -> Result<Object<'js>>
fn trace_event_emitter<'a>(&self, tracer: Tracer<'a, 'js>)
fn remove_event_listener( this: This<Class<'js, Self>>, ctx: Ctx<'js>, event: Value<'js>, listener: Function<'js>, ) -> Result<Class<'js, Self>>
fn add_event_listener_str( this: This<Class<'js, Self>>, ctx: &Ctx<'js>, event: &str, listener: Function<'js>, prepend: bool, once: bool, ) -> Result<Class<'js, Self>>
fn once( this: This<Class<'js, Self>>, ctx: Ctx<'js>, event: Value<'js>, listener: Function<'js>, ) -> Result<Class<'js, Self>>
fn on( this: This<Class<'js, Self>>, ctx: Ctx<'js>, event: Value<'js>, listener: Function<'js>, ) -> Result<Class<'js, Self>>
fn prepend_listener( this: This<Class<'js, Self>>, ctx: Ctx<'js>, event: Value<'js>, listener: Function<'js>, ) -> Result<Class<'js, Self>>
fn prepend_once_listener( this: This<Class<'js, Self>>, ctx: Ctx<'js>, event: Value<'js>, listener: Function<'js>, ) -> Result<Class<'js, Self>>
fn add_event_listener( this: This<Class<'js, Self>>, ctx: Ctx<'js>, event: Value<'js>, listener: Function<'js>, prepend: bool, once: bool, ) -> Result<Class<'js, Self>>
fn has_listener_str(&self, event: &str) -> bool
fn has_listener(&self, ctx: Ctx<'js>, event: Value<'js>) -> Result<bool>
fn get_listeners( &self, ctx: &Ctx<'js>, event: Value<'js>, ) -> Result<Vec<Function<'js>>>
fn get_listeners_str(&self, event: &str) -> Vec<Function<'js>>
fn do_emit( event: Value<'js>, this: This<Class<'js, Self>>, ctx: &Ctx<'js>, args: Rest<Value<'js>>, defer: bool, ) -> Result<()>
fn emit_str( this: This<Class<'js, Self>>, ctx: &Ctx<'js>, event: &str, args: Vec<Value<'js>>, defer: bool, ) -> Result<()>
fn emit( this: This<Class<'js, Self>>, ctx: Ctx<'js>, event: Value<'js>, args: Rest<Value<'js>>, ) -> Result<()>
fn event_names( this: This<OwnedBorrow<'js, Self>>, ctx: Ctx<'js>, ) -> Result<Vec<Value<'js>>>
source§impl<'js> FromJs<'js> for AbortSignal<'js>where
for<'a> CloneWrapper<'a, Self>: CloneTrait<Self>,
impl<'js> FromJs<'js> for AbortSignal<'js>where
for<'a> CloneWrapper<'a, Self>: CloneTrait<Self>,
source§impl<'js> IntoJs<'js> for AbortSignal<'js>
impl<'js> IntoJs<'js> for AbortSignal<'js>
source§impl<'js> JsClass<'js> for AbortSignal<'js>
impl<'js> JsClass<'js> for AbortSignal<'js>
source§fn constructor(ctx: &Ctx<'js>) -> Result<Option<Constructor<'js>>>
fn constructor(ctx: &Ctx<'js>) -> Result<Option<Constructor<'js>>>
Returns a predefined constructor for this specific class type if there is one.
source§impl<'js> MethodImplementor<AbortSignal<'js>> for MethodImpl<AbortSignal<'js>>
impl<'js> MethodImplementor<AbortSignal<'js>> for MethodImpl<AbortSignal<'js>>
Auto Trait Implementations§
impl<'js> Freeze for AbortSignal<'js>
impl<'js> RefUnwindSafe for AbortSignal<'js>
impl<'js> !Send for AbortSignal<'js>
impl<'js> !Sync for AbortSignal<'js>
impl<'js> Unpin for AbortSignal<'js>
impl<'js> !UnwindSafe for AbortSignal<'js>
Blanket Implementations§
source§impl<'js, T> AsProperty<'js, T> for Twhere
T: IntoJs<'js>,
impl<'js, T> AsProperty<'js, T> for Twhere
T: IntoJs<'js>,
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
source§impl<'js, T> FromParam<'js> for Twhere
T: FromJs<'js>,
impl<'js, T> FromParam<'js> for Twhere
T: FromJs<'js>,
source§fn param_requirement() -> ParamRequirement
fn param_requirement() -> ParamRequirement
The parameters requirements this value requires.
source§fn from_param<'a>(params: &mut ParamsAccessor<'a, 'js>) -> Result<T, Error>
fn from_param<'a>(params: &mut ParamsAccessor<'a, 'js>) -> Result<T, Error>
Convert from a parameter value.
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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>
Converts
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>
Converts
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