Struct xpcom::interfaces::nsIConverterOutputStream [] [src]

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

interface nsIConverterOutputStream : nsIUnicharOutputStream

/**
 * This interface allows writing strings to a stream, doing automatic
 * character encoding conversion.
 */

Methods

impl nsIConverterOutputStream
[src]

[src]

Cast this nsIConverterOutputStream to one of its base interfaces.

impl nsIConverterOutputStream
[src]

[src]

/**
     * Initialize this stream. Must be called before any other method on this
     * interface, or you will crash. The output stream passed to this method
     * must not be null, or you will crash.
     *
     * @param aOutStream
     *        The underlying output stream to which the converted strings will
     *        be written.
     * @param aCharset
     *        The character set to use for encoding the characters. A null
     *        charset will be interpreted as UTF-8.
     */

void init (in nsIOutputStream aOutStream, in string aCharset);

Methods from Deref<Target = nsIUnicharOutputStream>

[src]

Cast this nsIUnicharOutputStream to one of its base interfaces.

[src]

/**
     * Write a single character to the stream. When writing many characters,
     * prefer the string-taking write method.
     *
     * @retval true The character was written successfully
     * @retval false Not all bytes of the character could be written.
     */

boolean write (in unsigned long aCount, [array, size_is (aCount), const] in char16_t c);

[src]

/**
     * Write a string to the stream.
     *
     * @retval true The string was written successfully
     * @retval false Not all bytes of the string could be written.
     */

boolean writeString (in AString str);

[src]

/**
     * Flush the stream. This finishes the conversion and writes any bytes that
     * finish the current byte sequence.
     *
     * It does NOT flush the underlying stream.
     */

void flush ();

[src]

/**
     * Close the stream and free associated resources. This also closes the
     * underlying stream.
     */

void close ();

Trait Implementations

impl XpCom for nsIConverterOutputStream
[src]

IID: nsIID = nsID(1265701178, 51981, 18335, [142, 213, 1, 218, 235, 162, 232, 212])

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

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIConverterOutputStream
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.