Struct xpcom::interfaces::nsIRandomGenerator
[−]
[src]
#[repr(C)]pub struct nsIRandomGenerator { /* fields omitted */ }
interface nsIRandomGenerator : nsISupports
/**
* Interface used to generate random data.
*
* @threadsafe
*/
Methods
impl nsIRandomGenerator
[src]
pub fn coerce<T: nsIRandomGeneratorCoerce>(&self) -> &T
[src]
Cast this nsIRandomGenerator
to one of its base interfaces.
impl nsIRandomGenerator
[src]
pub unsafe fn GenerateRandomBytes(
&self,
aLength: uint32_t,
aBuffer: *mut *mut uint8_t
) -> nsresult
[src]
&self,
aLength: uint32_t,
aBuffer: *mut *mut uint8_t
) -> nsresult
/**
* Generates the specified amount of random bytes.
*
* @param aLength
* The length of the data to generate.
* @param aBuffer
* A buffer that contains random bytes of size aLength.
*/
void generateRandomBytes (in unsigned long aLength, [array, size_is (aLength), retval] out octet aBuffer);
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 nsIRandomGenerator
[src]
const IID: nsIID
IID: nsIID = nsID(593680762, 29818, 17782, [136, 99, 105, 118, 103, 48, 146, 9])
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 nsIRandomGenerator
[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 nsIRandomGenerator
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.