Struct xpcom::interfaces::nsIRequestObserverProxy
[−]
[src]
#[repr(C)]pub struct nsIRequestObserverProxy { /* fields omitted */ }
interface nsIRequestObserverProxy : nsIRequestObserver
/**
* A request observer proxy is used to ship data over to another thread
* specified by the thread's dispatch target. The "true" request observer's
* methods are invoked on the other thread.
*
* This interface only provides the initialization needed after construction.
* Otherwise, these objects are used simply as nsIRequestObserver's.
*/
Methods
impl nsIRequestObserverProxy
[src]
pub fn coerce<T: nsIRequestObserverProxyCoerce>(&self) -> &T
[src]
Cast this nsIRequestObserverProxy
to one of its base interfaces.
impl nsIRequestObserverProxy
[src]
pub unsafe fn Init(
&self,
observer: *const nsIRequestObserver,
context: *const nsISupports
) -> nsresult
[src]
&self,
observer: *const nsIRequestObserver,
context: *const nsISupports
) -> nsresult
/**
* Initializes an nsIRequestObserverProxy.
*
* @param observer - receives observer notifications on the main thread
* @param context - the context argument that will be passed to OnStopRequest
* and OnStartRequest. This has to be stored permanently on
* initialization because it sometimes can't be
* AddRef/Release'd off-main-thread.
*/
void init (in nsIRequestObserver observer, in nsISupports context);
Methods from Deref<Target = nsIRequestObserver>
pub fn coerce<T: nsIRequestObserverCoerce>(&self) -> &T
[src]
Cast this nsIRequestObserver
to one of its base interfaces.
pub unsafe fn OnStartRequest(
&self,
aRequest: *const nsIRequest,
aContext: *const nsISupports
) -> nsresult
[src]
&self,
aRequest: *const nsIRequest,
aContext: *const nsISupports
) -> nsresult
/**
* Called to signify the beginning of an asynchronous request.
*
* @param aRequest request being observed
* @param aContext user defined context
*
* An exception thrown from onStartRequest has the side-effect of
* causing the request to be canceled.
*/
void onStartRequest (in nsIRequest aRequest, in nsISupports aContext);
pub unsafe fn OnStopRequest(
&self,
aRequest: *const nsIRequest,
aContext: *const nsISupports,
aStatusCode: nsresult
) -> nsresult
[src]
&self,
aRequest: *const nsIRequest,
aContext: *const nsISupports,
aStatusCode: nsresult
) -> nsresult
/**
* Called to signify the end of an asynchronous request. This
* call is always preceded by a call to onStartRequest.
*
* @param aRequest request being observed
* @param aContext user defined context
* @param aStatusCode reason for stopping (NS_OK if completed successfully)
*
* An exception thrown from onStopRequest is generally ignored.
*/
void onStopRequest (in nsIRequest aRequest, in nsISupports aContext, in nsresult aStatusCode);
Trait Implementations
impl XpCom for nsIRequestObserverProxy
[src]
const IID: nsIID
IID: nsIID = nsID(3266339153, 7160, 20207, [174, 169, 21, 50, 241, 47, 90, 16])
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 nsIRequestObserverProxy
[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 nsIRequestObserverProxy
[src]
type Target = nsIRequestObserver
The resulting type after dereferencing.
fn deref(&self) -> &nsIRequestObserver
[src]
Dereferences the value.