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]
pub fn coerce<T: nsIThreadRetargetableRequestCoerce>(&self) -> &T
[src]
Cast this nsIThreadRetargetableRequest
to one of its base interfaces.
impl nsIThreadRetargetableRequest
[src]
pub unsafe fn RetargetDeliveryTo(
&self,
aNewTarget: *const nsIEventTarget
) -> nsresult
[src]
&self,
aNewTarget: *const nsIEventTarget
) -> nsresult
/**
* 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);
pub unsafe fn GetDeliveryTarget(
&self,
aDeliveryTarget: *mut *const nsIEventTarget
) -> nsresult
[src]
&self,
aDeliveryTarget: *mut *const nsIEventTarget
) -> nsresult
/**
* 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>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsIThreadRetargetableRequest
[src]
const IID: nsIID
IID: nsIID = nsID(666389576, 23155, 19364, [168, 164, 139, 94, 100, 154, 20, 94])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[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]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsIThreadRetargetableRequest
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.