Struct xpcom::interfaces::nsIUnicharStreamLoaderObserver
[−]
[src]
#[repr(C)]pub struct nsIUnicharStreamLoaderObserver { /* fields omitted */ }
interface nsIUnicharStreamLoaderObserver : nsISupports
Methods
impl nsIUnicharStreamLoaderObserver
[src]
pub fn coerce<T: nsIUnicharStreamLoaderObserverCoerce>(&self) -> &T
[src]
Cast this nsIUnicharStreamLoaderObserver
to one of its base interfaces.
impl nsIUnicharStreamLoaderObserver
[src]
pub unsafe fn OnDetermineCharset(
&self,
aLoader: *const nsIUnicharStreamLoader,
aContext: *const nsISupports,
aSegment: &nsACString,
_retval: &mut nsACString
) -> nsresult
[src]
&self,
aLoader: *const nsIUnicharStreamLoader,
aContext: *const nsISupports,
aSegment: &nsACString,
_retval: &mut nsACString
) -> nsresult
/**
* Called as soon as at least 512 octets of data have arrived.
* If the stream receives fewer than 512 octets of data in total,
* called upon stream completion but before calling OnStreamComplete.
* Will not be called if the stream receives no data at all.
*
* @param aLoader the unichar stream loader
* @param aContext the context parameter of the underlying channel
* @param aSegment up to 512 octets of raw data from the stream
*
* @return the name of the character set to be used to decode this stream
*/
ACString onDetermineCharset (in nsIUnicharStreamLoader aLoader, in nsISupports aContext, in ACString aSegment);
pub unsafe fn OnStreamComplete(
&self,
aLoader: *const nsIUnicharStreamLoader,
aContext: *const nsISupports,
aStatus: nsresult,
aBuffer: &nsAString
) -> nsresult
[src]
&self,
aLoader: *const nsIUnicharStreamLoader,
aContext: *const nsISupports,
aStatus: nsresult,
aBuffer: &nsAString
) -> nsresult
/**
* Called when the entire stream has been loaded and decoded.
*
* @param aLoader the unichar stream loader
* @param aContext the context parameter of the underlying channel
* @param aStatus the status of the underlying channel
* @param aBuffer the contents of the stream, decoded to UTF-16.
*
* This method will always be called asynchronously by the
* nsUnicharIStreamLoader involved, on the thread that called the
* loader's init() method. If onDetermineCharset fails,
* onStreamComplete will still be called, but aStatus will be an
* error code.
*/
void onStreamComplete (in nsIUnicharStreamLoader aLoader, in nsISupports aContext, in nsresult aStatus, in AString 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 nsIUnicharStreamLoaderObserver
[src]
const IID: nsIID
IID: nsIID = nsID(3264752441, 11848, 17054, [146, 183, 153, 52, 138, 22, 51, 197])
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 nsIUnicharStreamLoaderObserver
[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 nsIUnicharStreamLoaderObserver
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.