Struct rqjs_cli::modules::events::EventEmitter
source · pub struct EventEmitter<'js> {
pub events: Events<'js>,
}Fields§
§events: Events<'js>Implementations§
source§impl<'js> EventEmitter<'js>
impl<'js> EventEmitter<'js>
Trait Implementations§
source§impl<'js> Clone for EventEmitter<'js>
impl<'js> Clone for EventEmitter<'js>
source§fn clone(&self) -> EventEmitter<'js>
fn clone(&self) -> EventEmitter<'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, EventEmitter<'js>> for ConstructorCreate<EventEmitter<'js>>
impl<'js> ConstructorCreator<'js, EventEmitter<'js>> for ConstructorCreate<EventEmitter<'js>>
fn create_constructor(&self, ctx: &Ctx<'js>) -> Result<Option<Constructor<'js>>>
source§impl<'js> Default for EventEmitter<'js>
impl<'js> Default for EventEmitter<'js>
source§impl<'js> Emitter<'js> for EventEmitter<'js>
impl<'js> Emitter<'js> for EventEmitter<'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 EventEmitter<'js>where
for<'a> CloneWrapper<'a, Self>: CloneTrait<Self>,
impl<'js> FromJs<'js> for EventEmitter<'js>where
for<'a> CloneWrapper<'a, Self>: CloneTrait<Self>,
source§impl<'js> IntoJs<'js> for EventEmitter<'js>
impl<'js> IntoJs<'js> for EventEmitter<'js>
source§impl<'js> JsClass<'js> for EventEmitter<'js>
impl<'js> JsClass<'js> for EventEmitter<'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<EventEmitter<'js>> for MethodImpl<EventEmitter<'js>>
impl<'js> MethodImplementor<EventEmitter<'js>> for MethodImpl<EventEmitter<'js>>
Auto Trait Implementations§
impl<'js> Freeze for EventEmitter<'js>
impl<'js> RefUnwindSafe for EventEmitter<'js>
impl<'js> !Send for EventEmitter<'js>
impl<'js> !Sync for EventEmitter<'js>
impl<'js> Unpin for EventEmitter<'js>
impl<'js> UnwindSafe for EventEmitter<'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