Struct xpcom::interfaces::nsIScriptableInputStream [] [src]

#[repr(C)]
pub struct nsIScriptableInputStream { /* fields omitted */ }

interface nsIScriptableInputStream : nsISupports

/**
 * nsIScriptableInputStream provides scriptable access to an nsIInputStream
 * instance.
 */

Methods

impl nsIScriptableInputStream
[src]

[src]

Cast this nsIScriptableInputStream to one of its base interfaces.

impl nsIScriptableInputStream
[src]

[src]

/**
     * Closes the stream.
     */

void close ();

[src]

/**
     * Wrap the given nsIInputStream with this nsIScriptableInputStream.
     *
     * @param aInputStream parameter providing the stream to wrap
     */

void init (in nsIInputStream aInputStream);

[src]

/**
     * Return the number of bytes currently available in the stream
     *
     * @return the number of bytes
     *
     * @throws NS_BASE_STREAM_CLOSED if called after the stream has been closed
     */

unsigned long long available ();

[src]

/**
     * Read data from the stream.
     *
     * WARNING: If the data contains a null byte, then this method will return
     * a truncated string.
     *
     * @param aCount the maximum number of bytes to read
     *
     * @return the data, which will be an empty string if the stream is at EOF.
     *
     * @throws NS_BASE_STREAM_CLOSED if called after the stream has been closed
     * @throws NS_ERROR_NOT_INITIALIZED if init was not called
     */

string read (in unsigned long aCount);

[src]

/**
     * Read data from the stream, including NULL bytes.
     *
     * @param aCount the maximum number of bytes to read.
     *
     * @return the data from the stream, which will be an empty string if EOF
     *         has been reached.
     *
     * @throws NS_BASE_STREAM_WOULD_BLOCK if reading from the input stream
     *         would block the calling thread (non-blocking mode only).
     * @throws NS_ERROR_FAILURE if there are not enough bytes available to read
     *         aCount amount of data.
     */

ACString readBytes (in unsigned long aCount);

Methods from Deref<Target = nsISupports>

[src]

Cast this nsISupports to one of its base interfaces.

[src]

void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);

[src]

[noscript,notxpcom] nsrefcnt AddRef ();

[src]

[noscript,notxpcom] nsrefcnt Release ();

Trait Implementations

impl XpCom for nsIScriptableInputStream
[src]

IID: nsIID = nsID(1070501909, 18218, 16512, [172, 62, 205, 135, 93, 190, 54, 30])

[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 nsIScriptableInputStream
[src]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIScriptableInputStream
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.