Struct xpcom::interfaces::nsISimpleEnumerator
[−]
[src]
#[repr(C)]pub struct nsISimpleEnumerator { /* fields omitted */ }
interface nsISimpleEnumerator : nsISupports
/**
* Used to enumerate over elements defined by its implementor.
* Although hasMoreElements() can be called independently of getNext(),
* getNext() must be pre-ceeded by a call to hasMoreElements(). There is
* no way to "reset" an enumerator, once you obtain one.
*
* @version 1.0
*/
Methods
impl nsISimpleEnumerator
[src]
pub fn coerce<T: nsISimpleEnumeratorCoerce>(&self) -> &T
[src]
Cast this nsISimpleEnumerator
to one of its base interfaces.
impl nsISimpleEnumerator
[src]
pub unsafe fn HasMoreElements(&self, _retval: *mut bool) -> nsresult
[src]
/**
* Called to determine whether or not the enumerator has
* any elements that can be returned via getNext(). This method
* is generally used to determine whether or not to initiate or
* continue iteration over the enumerator, though it can be
* called without subsequent getNext() calls. Does not affect
* internal state of enumerator.
*
* @see getNext()
* @return true if there are remaining elements in the enumerator.
* false if there are no more elements in the enumerator.
*/
boolean hasMoreElements ();
pub unsafe fn GetNext(&self, _retval: *mut *const nsISupports) -> nsresult
[src]
/**
* Called to retrieve the next element in the enumerator. The "next"
* element is the first element upon the first call. Must be
* pre-ceeded by a call to hasMoreElements() which returns PR_TRUE.
* This method is generally called within a loop to iterate over
* the elements in the enumerator.
*
* @see hasMoreElements()
* @throws NS_ERROR_FAILURE if there are no more elements
* to enumerate.
* @return the next element in the enumeration.
*/
nsISupports getNext ();
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 nsISimpleEnumerator
[src]
const IID: nsIID
IID: nsIID = nsID(3515454016, 63954, 4562, [189, 214, 0, 0, 100, 101, 115, 116])
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 nsISimpleEnumerator
[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 nsISimpleEnumerator
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.