Skip to main content

CallbackObject

Struct CallbackObject 

Source
pub struct CallbackObject<D>
where D: DomTypes,
{ callback: Heap<*mut JSObject>, incumbent: Option<Dom<<D as DomTypes>::GlobalScope>>, }
Expand description

A common base class for representing IDL callback function and callback interface types.

Fields§

§callback: Heap<*mut JSObject>§incumbent: Option<Dom<<D as DomTypes>::GlobalScope>>

Implementations§

Source§

impl<D> CallbackObject<D>
where D: DomTypes,

Source

pub fn get(&self) -> *mut JSObject

Trait Implementations§

Source§

impl<'a, D> From<&'a CallbackObject<D>> for BlobCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> BlobCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for CallbackFunction<D>
where D: DomTypes,

Source§

fn from(object: &'a CallbackObject<D>) -> CallbackFunction<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for CallbackInterface<D>
where D: DomTypes,

Source§

fn from(object: &'a CallbackObject<D>) -> CallbackInterface<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for CreateHTMLCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> CreateHTMLCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for CreateScriptCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> CreateScriptCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for CreateScriptURLCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> CreateScriptURLCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for CustomElementConstructor<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> CustomElementConstructor<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for DecodeErrorCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> DecodeErrorCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for DecodeSuccessCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> DecodeSuccessCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for ErrorCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> ErrorCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for EventHandlerNonNull<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> EventHandlerNonNull<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for EventListener<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> EventListener<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for FileCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> FileCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for FileSystemEntriesCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> FileSystemEntriesCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for FileSystemEntryCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> FileSystemEntryCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for FrameRequestCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> FrameRequestCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for Function<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> Function<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for FunctionStringCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> FunctionStringCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for IntersectionObserverCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> IntersectionObserverCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for MediaSessionActionHandler<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> MediaSessionActionHandler<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for MutationCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> MutationCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for NodeFilter<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> NodeFilter<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for NotificationPermissionCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> NotificationPermissionCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for OnBeforeUnloadEventHandlerNonNull<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> OnBeforeUnloadEventHandlerNonNull<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for OnErrorEventHandlerNonNull<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> OnErrorEventHandlerNonNull<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for PerformanceObserverCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> PerformanceObserverCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for PositionCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> PositionCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for PositionErrorCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> PositionErrorCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for QueuingStrategySize<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> QueuingStrategySize<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for ReportingObserverCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> ReportingObserverCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for ResizeObserverCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> ResizeObserverCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for SimpleCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> SimpleCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for TransformerCancelCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> TransformerCancelCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for TransformerFlushCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> TransformerFlushCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for TransformerStartCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> TransformerStartCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for TransformerTransformCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> TransformerTransformCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for UnderlyingSinkAbortCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> UnderlyingSinkAbortCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for UnderlyingSinkCloseCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> UnderlyingSinkCloseCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for UnderlyingSinkStartCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> UnderlyingSinkStartCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for UnderlyingSinkWriteCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> UnderlyingSinkWriteCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for UnderlyingSourceCancelCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> UnderlyingSourceCancelCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for UnderlyingSourcePullCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> UnderlyingSourcePullCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for UnderlyingSourceStartCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> UnderlyingSourceStartCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for VoidFunction<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> VoidFunction<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for XPathNSResolver<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> XPathNSResolver<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for XRFrameRequestCallback<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> XRFrameRequestCallback<D>

Converts to this type from the input type.
Source§

impl<'a, D> From<&'a CallbackObject<D>> for callbackWithOnlyOneOptionalArg<D>
where D: DomTypes,

Source§

fn from(base: &'a CallbackObject<D>) -> callbackWithOnlyOneOptionalArg<D>

Converts to this type from the input type.
Source§

impl<D> MallocSizeOf for CallbackObject<D>

Source§

fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize

Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself.
Source§

impl<D> PartialEq for CallbackObject<D>
where D: DomTypes,

Source§

fn eq(&self, other: &CallbackObject<D>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<D> Traceable for CallbackObject<D>
where D: DomTypes + Traceable,

Source§

unsafe fn trace(&self, tracer: *mut JSTracer)

Trace self.

Auto Trait Implementations§

§

impl<D> !Freeze for CallbackObject<D>

§

impl<D> !RefUnwindSafe for CallbackObject<D>

§

impl<D> !Send for CallbackObject<D>

§

impl<D> !Sync for CallbackObject<D>

§

impl<D> Unpin for CallbackObject<D>

§

impl<D> UnsafeUnpin for CallbackObject<D>

§

impl<D> UnwindSafe for CallbackObject<D>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> MaybeBoxed<Box<T>> for T

Source§

fn maybe_boxed(self) -> Box<T>

Convert
Source§

impl<T> MaybeBoxed<T> for T

Source§

fn maybe_boxed(self) -> T

Convert
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

Source§

fn simd_from(_simd: S, value: T) -> T

Source§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

Source§

fn simd_into(self, simd: S) -> T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,