Struct xpcom::interfaces::nsIRaceCacheWithNetwork
[−]
[src]
#[repr(C)]pub struct nsIRaceCacheWithNetwork { /* fields omitted */ }
interface nsIRaceCacheWithNetwork : nsISupports
/**
* This holds methods used to race the cache with the network for a specific
* channel. This interface is was designed with nsHttpChannel in mind, and it's
* expected this will be the only class implementing it.
*/
Methods
impl nsIRaceCacheWithNetwork
[src]
pub fn coerce<T: nsIRaceCacheWithNetworkCoerce>(&self) -> &T
[src]
Cast this nsIRaceCacheWithNetwork
to one of its base interfaces.
impl nsIRaceCacheWithNetwork
[src]
pub unsafe fn Test_triggerNetwork(&self, timeout: int32_t) -> nsresult
[src]
/****************************************************************************
* TEST ONLY: The following methods are for testing purposes only. Do not use
* them to do anything important in your code.
****************************************************************************
/**
* Triggers network activity after given timeout. If timeout is 0, network
* activity is triggered immediately. If the cache.asyncOpenURI callbacks
* have already been called, the network activity may have already been triggered
* or the content may have already been delivered from the cache, so this
* operation will have no effect.
*
* @param timeout
* - the delay in milliseconds until the network will be triggered.
*/
void test_triggerNetwork (in long timeout);
pub unsafe fn Test_delayCacheEntryOpeningBy(&self, timeout: int32_t) -> nsresult
[src]
/**
* Normally a HTTP channel would immediately call AsyncOpenURI leading to the
* cache storage to lookup the cache entry and return it. In order to
* simmulate real life conditions where fetching a cache entry takes a long
* time, we set a timer to delay the operation.
* Can only be called on the main thread.
*
* @param timeout
* - the delay in milliseconds until the cache open will be triggered.
*/
void test_delayCacheEntryOpeningBy (in long timeout);
pub unsafe fn Test_triggerDelayedOpenCacheEntry(&self) -> nsresult
[src]
/**
* Immediatelly triggers AsyncOpenURI if the timer hasn't fired.
* Can only be called on the main thread.
* This is only called in tests to reliably trigger the opening of the cache
* entry.
* @throws NS_ERROR_NOT_AVAILABLE if opening the cache wasn't delayed.
*/
void test_triggerDelayedOpenCacheEntry ();
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 nsIRaceCacheWithNetwork
[src]
const IID: nsIID
IID: nsIID = nsID(1301689461, 35606, 19544, [184, 4, 138, 35, 212, 148, 54, 197])
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 nsIRaceCacheWithNetwork
[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 nsIRaceCacheWithNetwork
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.