Struct xpcom::interfaces::nsIGZFileWriter
[−]
[src]
#[repr(C)]pub struct nsIGZFileWriter { /* fields omitted */ }
interface nsIGZFileWriter : nsISupports
/**
* A simple interface for writing to a .gz file.
*
* Note that the file that this interface produces has a different format than
* what you'd get if you compressed your data as a gzip stream and dumped the
* result to a file.
*
* The standard gunzip tool cannot decompress a raw gzip stream, but can handle
* the files produced by this interface.
*/
Methods
impl nsIGZFileWriter
[src]
pub fn coerce<T: nsIGZFileWriterCoerce>(&self) -> &T
[src]
Cast this nsIGZFileWriter
to one of its base interfaces.
impl nsIGZFileWriter
[src]
pub unsafe fn Init(&self, file: *const nsIFile) -> nsresult
[src]
/**
* Initialize this object. We'll write our gzip'ed data to the given file,
* overwriting its contents if the file exists.
*
* init() will return an error if called twice. It's an error to call any
* other method on this interface without first calling init().
*/
[must_use] void init (in nsIFile file);
pub unsafe fn Write(&self, str: &nsACString) -> nsresult
[src]
/**
* Write the given string to the file.
*/
[must_use] void write (in AUTF8String str);
pub unsafe fn Finish(&self) -> nsresult
[src]
/**
* Close this nsIGZFileWriter. Classes implementing nsIGZFileWriter will run
* this method when the underlying object is destroyed, so it's not strictly
* necessary to explicitly call it from your code.
*
* It's an error to call this method twice, and it's an error to call write()
* after finish() has been called.
*/
void finish ();
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 nsIGZFileWriter
[src]
const IID: nsIID
IID: nsIID = nsID(1809146924, 7056, 17561, [186, 75, 25, 159, 39, 239, 171, 165])
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 nsIGZFileWriter
[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 nsIGZFileWriter
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.