Struct xpcom::interfaces::nsIInputChannelThrottleQueue
[−]
[src]
#[repr(C)]pub struct nsIInputChannelThrottleQueue { /* fields omitted */ }
interface nsIInputChannelThrottleQueue : nsISupports
/**
* An instance of this interface can be used to throttle the uploads
* of a group of associated channels.
*/
Methods
impl nsIInputChannelThrottleQueue
[src]
pub fn coerce<T: nsIInputChannelThrottleQueueCoerce>(&self) -> &T
[src]
Cast this nsIInputChannelThrottleQueue
to one of its base interfaces.
impl nsIInputChannelThrottleQueue
[src]
pub unsafe fn Init(
&self,
aMeanBytesPerSecond: uint32_t,
aMaxBytesPerSecond: uint32_t
) -> nsresult
[src]
&self,
aMeanBytesPerSecond: uint32_t,
aMaxBytesPerSecond: uint32_t
) -> nsresult
/**
* Initialize this object with the mean and maximum bytes per
* second that will be allowed. Neither value may be zero, and
* the maximum must not be less than the mean.
*
* @param aMeanBytesPerSecond
* Mean number of bytes per second.
* @param aMaxBytesPerSecond
* Maximum number of bytes per second.
*/
void init (in unsigned long aMeanBytesPerSecond, in unsigned long aMaxBytesPerSecond);
pub unsafe fn Available(
&self,
aRemaining: uint32_t,
_retval: *mut uint32_t
) -> nsresult
[src]
&self,
aRemaining: uint32_t,
_retval: *mut uint32_t
) -> nsresult
/**
* Return the number of bytes that are available to the caller in
* this time slice.
*
* @param aRemaining
* The number of bytes available to be processed
* @return the number of bytes allowed to be processed during this
* time slice; this will never be greater than aRemaining.
*/
unsigned long available (in unsigned long aRemaining);
pub unsafe fn RecordRead(&self, aBytesRead: uint32_t) -> nsresult
[src]
/**
* Record a successful read.
*
* @param aBytesRead
* The number of bytes actually read.
*/
void recordRead (in unsigned long aBytesRead);
pub unsafe fn BytesProcessed(&self, _retval: *mut uint64_t) -> nsresult
[src]
/**
* Return the number of bytes allowed through this queue. This is
* the sum of all the values passed to recordRead. This method is
* primarily useful for testing.
*/
unsigned long long bytesProcessed ();
pub unsafe fn WrapStream(
&self,
aInputStream: *const nsIInputStream,
_retval: *mut *const nsIAsyncInputStream
) -> nsresult
[src]
&self,
aInputStream: *const nsIInputStream,
_retval: *mut *const nsIAsyncInputStream
) -> nsresult
/**
* Wrap the given input stream in a new input stream which
* throttles the incoming data.
*
* @param aInputStream the input stream to wrap
* @return a new input stream that throttles the data.
*/
nsIAsyncInputStream wrapStream (in nsIInputStream aInputStream);
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 nsIInputChannelThrottleQueue
[src]
const IID: nsIID
IID: nsIID = nsID(1800115966, 15463, 17799, [175, 123, 88, 182, 177, 125, 164, 17])
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 nsIInputChannelThrottleQueue
[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 nsIInputChannelThrottleQueue
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.