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]
pub fn coerce<T: nsIScriptableInputStreamCoerce>(&self) -> &T
[src]
Cast this nsIScriptableInputStream
to one of its base interfaces.
impl nsIScriptableInputStream
[src]
pub unsafe fn Close(&self) -> nsresult
[src]
/**
* Closes the stream.
*/
void close ();
pub unsafe fn Init(&self, aInputStream: *const nsIInputStream) -> nsresult
[src]
/**
* Wrap the given nsIInputStream with this nsIScriptableInputStream.
*
* @param aInputStream parameter providing the stream to wrap
*/
void init (in nsIInputStream aInputStream);
pub unsafe fn Available(&self, _retval: *mut uint64_t) -> nsresult
[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 ();
pub unsafe fn Read(
&self,
aCount: uint32_t,
_retval: *mut *const c_char
) -> nsresult
[src]
&self,
aCount: uint32_t,
_retval: *mut *const c_char
) -> nsresult
/**
* 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);
pub unsafe fn ReadBytes(
&self,
aCount: uint32_t,
_retval: &mut nsACString
) -> nsresult
[src]
&self,
aCount: uint32_t,
_retval: &mut nsACString
) -> nsresult
/**
* 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>
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 nsIScriptableInputStream
[src]
const IID: nsIID
IID: nsIID = nsID(1070501909, 18218, 16512, [172, 62, 205, 135, 93, 190, 54, 30])
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 nsIScriptableInputStream
[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 nsIScriptableInputStream
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.