Struct xpcom::interfaces::nsIHttpRequestHandler
[−]
[src]
#[repr(C)]pub struct nsIHttpRequestHandler { /* fields omitted */ }
interface nsIHttpRequestHandler : nsISupports
Methods
impl nsIHttpRequestHandler
[src]
pub fn coerce<T: nsIHttpRequestHandlerCoerce>(&self) -> &T
[src]
Cast this nsIHttpRequestHandler
to one of its base interfaces.
impl nsIHttpRequestHandler
[src]
pub unsafe fn Handle(
&self,
request: *const nsIHttpRequest,
response: *const nsIHttpResponse
) -> nsresult
[src]
&self,
request: *const nsIHttpRequest,
response: *const nsIHttpResponse
) -> nsresult
/**
* A representation of a handler for HTTP requests. The handler is used by
* calling its .handle method with data for an incoming request; it is the
* handler's job to use that data as it sees fit to make the desired response.
*
* @note
* This interface uses the [function] attribute, so you can pass a
* script-defined function with the functionality of handle() to any
* method which has a nsIHttpRequestHandler parameter, instead of wrapping
* it in an otherwise empty object.
*/
/**
* Processes an HTTP request and initializes the passed-in response to reflect
* the correct HTTP response.
*
* If this method throws an exception, externally observable behavior depends
* upon whether is being processed asynchronously. If such is the case, the
* output is some prefix (perhaps all, perhaps none, perhaps only some) of the
* data which would have been sent if, instead, the response had been finished
* at that point. If no data has been written, the response has not had
* seizePower() called on it, and it is not being asynchronously created, an
* error handler will be invoked (usually 500 unless otherwise specified).
*
* Some uses of nsIHttpRequestHandler may require this method to never throw
* an exception; in the general case, however, this method may throw an
* exception (causing an HTTP 500 response to occur, if the above conditions
* are met).
*
* @param request
* data representing an HTTP request
* @param response
* an initially-empty response which must be modified to reflect the data
* which should be sent as the response to the request described by metadata
*/
void handle (in nsIHttpRequest request, in nsIHttpResponse response);
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 nsIHttpRequestHandler
[src]
const IID: nsIID
IID: nsIID = nsID(733695415, 53893, 17075, [163, 206, 20, 43, 140, 199, 225, 57])
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 nsIHttpRequestHandler
[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 nsIHttpRequestHandler
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.