Struct xpcom::interfaces::nsIThreadRetargetableRequest [] [src]

#[repr(C)]
pub struct nsIThreadRetargetableRequest { /* fields omitted */ }

interface nsIThreadRetargetableRequest : nsISupports

/**
 * nsIThreadRetargetableRequest
 *
 * Should be implemented by requests that support retargeting delivery of
 * data off the main thread.
 */

Methods

impl nsIThreadRetargetableRequest
[src]

[src]

Cast this nsIThreadRetargetableRequest to one of its base interfaces.

impl nsIThreadRetargetableRequest
[src]

[src]

/**
   * Called to retarget delivery of OnDataAvailable to another thread. Should
   * only be called before AsyncOpen for nsIWebsocketChannels, or during
   * OnStartRequest for nsIChannels.
   * Note: For nsIChannels, OnStartRequest and OnStopRequest will still be
   * delivered on the main thread.
   *
   * @param aNewTarget New event target, e.g. thread or threadpool.
   *
   * Note: no return value is given. If the retargeting cannot be handled,
   * normal delivery to the main thread will continue. As such, listeners
   * should be ready to deal with OnDataAvailable on either the main thread or
   * the new target thread.
   */

void retargetDeliveryTo (in nsIEventTarget aNewTarget);

[src]

/**
   * Returns the event target where OnDataAvailable events will be dispatched.
   *
   * This is only valid after OnStartRequest has been called. Any time before
   * that point, the value may be changed by `retargetDeliveryTo` calls.
   */

readonly attribute nsIEventTarget deliveryTarget;

Methods from Deref<Target = nsISupports>

[src]

Cast this nsISupports to one of its base interfaces.

[src]

void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);

[src]

[noscript,notxpcom] nsrefcnt AddRef ();

[src]

[noscript,notxpcom] nsrefcnt Release ();

Trait Implementations

impl XpCom for nsIThreadRetargetableRequest
[src]

IID: nsIID = nsID(666389576, 23155, 19364, [168, 164, 139, 94, 100, 154, 20, 94])

[src]

Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more

impl RefCounted for nsIThreadRetargetableRequest
[src]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIThreadRetargetableRequest
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.