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]
pub fn coerce<T: nsIConverterOutputStreamCoerce>(&self) -> &T
[src]
Cast this nsIConverterOutputStream
to one of its base interfaces.
impl nsIConverterOutputStream
[src]
pub unsafe fn Init(
&self,
aOutStream: *const nsIOutputStream,
aCharset: *const c_char
) -> nsresult
[src]
&self,
aOutStream: *const nsIOutputStream,
aCharset: *const c_char
) -> nsresult
/**
* 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>
pub fn coerce<T: nsIUnicharOutputStreamCoerce>(&self) -> &T
[src]
Cast this nsIUnicharOutputStream
to one of its base interfaces.
pub unsafe fn Write(
&self,
aCount: uint32_t,
c: *const char16_t,
_retval: *mut bool
) -> nsresult
[src]
&self,
aCount: uint32_t,
c: *const char16_t,
_retval: *mut bool
) -> nsresult
/**
* 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);
pub unsafe fn WriteString(
&self,
str: &nsAString,
_retval: *mut bool
) -> nsresult
[src]
&self,
str: &nsAString,
_retval: *mut bool
) -> nsresult
/**
* 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);
pub unsafe fn Flush(&self) -> nsresult
[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 ();
pub unsafe fn Close(&self) -> nsresult
[src]
/**
* Close the stream and free associated resources. This also closes the
* underlying stream.
*/
void close ();
Trait Implementations
impl XpCom for nsIConverterOutputStream
[src]
const IID: nsIID
IID: nsIID = nsID(1265701178, 51981, 18335, [142, 213, 1, 218, 235, 162, 232, 212])
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 nsIConverterOutputStream
[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 nsIConverterOutputStream
[src]
type Target = nsIUnicharOutputStream
The resulting type after dereferencing.
fn deref(&self) -> &nsIUnicharOutputStream
[src]
Dereferences the value.