Struct xpcom::interfaces::nsIUnicharStreamLoader
[−]
[src]
#[repr(C)]pub struct nsIUnicharStreamLoader { /* fields omitted */ }
interface nsIUnicharStreamLoader : nsIStreamListener
Methods
impl nsIUnicharStreamLoader
[src]
pub fn coerce<T: nsIUnicharStreamLoaderCoerce>(&self) -> &T
[src]
Cast this nsIUnicharStreamLoader
to one of its base interfaces.
impl nsIUnicharStreamLoader
[src]
pub unsafe fn Init(
&self,
aObserver: *const nsIUnicharStreamLoaderObserver
) -> nsresult
[src]
&self,
aObserver: *const nsIUnicharStreamLoaderObserver
) -> nsresult
/**
* Asynchronously load a channel, converting the data to UTF-16.
*
* To use this interface, first call init() with a
* nsIUnicharStreamLoaderObserver that will be notified when the data has been
* loaded. Then call asyncOpen() on the channel with the nsIUnicharStreamLoader
* as the listener. The context argument in the asyncOpen() call will be
* passed to the onStreamComplete() callback.
*/
/**
* Initializes the unichar stream loader
*
* @param aObserver the observer to notify when a charset is needed and when
* the load is complete
*/
void init (in nsIUnicharStreamLoaderObserver aObserver);
pub unsafe fn GetChannel(&self, aChannel: *mut *const nsIChannel) -> nsresult
[src]
/**
* The channel attribute is only valid inside the onDetermineCharset
* and onStreamComplete callbacks. Otherwise it will be null.
*/
readonly attribute nsIChannel channel;
pub unsafe fn GetCharset(&self, aCharset: &mut nsACString) -> nsresult
[src]
/**
* The charset that onDetermineCharset returned, if that's been
* called.
*/
readonly attribute ACString charset;
pub unsafe fn GetRawBuffer(&self, aRawBuffer: &mut nsACString) -> nsresult
[src]
/**
* Get the raw bytes as seen on the wire prior to character converstion.
* Used by Subresource Integrity checker to generate the correct hash.
*/
readonly attribute ACString rawBuffer;
Methods from Deref<Target = nsIStreamListener>
pub fn coerce<T: nsIStreamListenerCoerce>(&self) -> &T
[src]
Cast this nsIStreamListener
to one of its base interfaces.
pub unsafe fn OnDataAvailable(
&self,
aRequest: *const nsIRequest,
aContext: *const nsISupports,
aInputStream: *const nsIInputStream,
aOffset: uint64_t,
aCount: uint32_t
) -> nsresult
[src]
&self,
aRequest: *const nsIRequest,
aContext: *const nsISupports,
aInputStream: *const nsIInputStream,
aOffset: uint64_t,
aCount: uint32_t
) -> nsresult
/**
* Called when the next chunk of data (corresponding to the request) may
* be read without blocking the calling thread. The onDataAvailable impl
* must read exactly |aCount| bytes of data before returning.
*
* @param aRequest request corresponding to the source of the data
* @param aContext user defined context
* @param aInputStream input stream containing the data chunk
* @param aOffset
* Number of bytes that were sent in previous onDataAvailable calls
* for this request. In other words, the sum of all previous count
* parameters.
* @param aCount number of bytes available in the stream
*
* NOTE: The aInputStream parameter must implement readSegments.
*
* An exception thrown from onDataAvailable has the side-effect of
* causing the request to be canceled.
*/
void onDataAvailable (in nsIRequest aRequest, in nsISupports aContext, in nsIInputStream aInputStream, in unsigned long long aOffset, in unsigned long aCount);
Trait Implementations
impl XpCom for nsIUnicharStreamLoader
[src]
const IID: nsIID
IID: nsIID = nsID(2947948640, 14279, 18195, [138, 132, 74, 12, 17, 153, 186, 92])
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 nsIUnicharStreamLoader
[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 nsIUnicharStreamLoader
[src]
type Target = nsIStreamListener
The resulting type after dereferencing.
fn deref(&self) -> &nsIStreamListener
[src]
Dereferences the value.