Struct xpcom::interfaces::nsIObjectOutputStream
[−]
[src]
#[repr(C)]pub struct nsIObjectOutputStream { /* fields omitted */ }
interface nsIObjectOutputStream : nsIBinaryOutputStream
/**
* @See nsIObjectInputStream
* @See nsIBinaryOutputStream
*/
Methods
impl nsIObjectOutputStream
[src]
pub fn coerce<T: nsIObjectOutputStreamCoerce>(&self) -> &T
[src]
Cast this nsIObjectOutputStream
to one of its base interfaces.
impl nsIObjectOutputStream
[src]
pub unsafe fn WriteObject(
&self,
aObject: *const nsISupports,
aIsStrongRef: bool
) -> nsresult
[src]
&self,
aObject: *const nsISupports,
aIsStrongRef: bool
) -> nsresult
/**
* Write the object whose "root" or XPCOM-identity nsISupports is aObject.
* The cause for writing this object is a strong or weak reference, so the
* aIsStrongRef argument must tell which kind of pointer is being followed
* here during serialization.
*
* If the object has only one strong reference in the serialization and no
* weak refs, use writeSingleRefObject. This is a valuable optimization:
* it saves space in the stream, and cycles on both ends of the process.
*
* If the reference being serialized is a pointer to an interface not on
* the primary inheritance chain ending in the root nsISupports, you must
* call writeCompoundObject instead of this method.
*/
void writeObject (in nsISupports aObject, in boolean aIsStrongRef);
pub unsafe fn WriteSingleRefObject(
&self,
aObject: *const nsISupports
) -> nsresult
[src]
&self,
aObject: *const nsISupports
) -> nsresult
/**
* Write an object referenced singly and strongly via its root nsISupports
* or a subclass of its root nsISupports. There must not be other refs to
* aObject in memory, or in the serialization.
*/
void writeSingleRefObject (in nsISupports aObject);
pub unsafe fn WriteCompoundObject(
&self,
aObject: *const nsISupports,
aIID: &nsIID,
aIsStrongRef: bool
) -> nsresult
[src]
&self,
aObject: *const nsISupports,
aIID: &nsIID,
aIsStrongRef: bool
) -> nsresult
/**
* Write the object referenced by an interface pointer at aObject that
* inherits from a non-primary nsISupports, i.e., a reference to one of
* the multiply inherited interfaces derived from an nsISupports other
* than the root or XPCOM-identity nsISupports; or a reference to an
* inner object in the case of true XPCOM aggregation. aIID identifies
* this interface.
*/
void writeCompoundObject (in nsISupports aObject, in nsIIDRef aIID, in boolean aIsStrongRef);
pub unsafe fn WriteID(&self, aID: &nsID) -> nsresult
[src]
void writeID (in nsIDRef aID);
pub unsafe fn GetBuffer(
&self,
aLength: uint32_t,
aAlignMask: uint32_t
) -> *mut u8
[src]
&self,
aLength: uint32_t,
aAlignMask: uint32_t
) -> *mut u8
/**
* Optimized serialization support -- see nsIStreamBufferAccess.idl.
*/
[notxpcom] charPtr getBuffer (in uint32_t aLength, in uint32_t aAlignMask);
pub unsafe fn PutBuffer(&self, aBuffer: *mut u8, aLength: uint32_t) -> c_void
[src]
[notxpcom] void putBuffer (in charPtr aBuffer, in uint32_t aLength);
Methods from Deref<Target = nsIBinaryOutputStream>
pub fn coerce<T: nsIBinaryOutputStreamCoerce>(&self) -> &T
[src]
Cast this nsIBinaryOutputStream
to one of its base interfaces.
pub unsafe fn SetOutputStream(
&self,
aOutputStream: *const nsIOutputStream
) -> nsresult
[src]
&self,
aOutputStream: *const nsIOutputStream
) -> nsresult
void setOutputStream (in nsIOutputStream aOutputStream);
pub unsafe fn WriteBoolean(&self, aBoolean: bool) -> nsresult
[src]
/**
* Write a boolean as an 8-bit char to the stream.
*/
void writeBoolean (in boolean aBoolean);
pub unsafe fn Write8(&self, aByte: uint8_t) -> nsresult
[src]
void write8 (in uint8_t aByte);
pub unsafe fn Write16(&self, a16: uint16_t) -> nsresult
[src]
void write16 (in uint16_t a16);
pub unsafe fn Write32(&self, a32: uint32_t) -> nsresult
[src]
void write32 (in uint32_t a32);
pub unsafe fn Write64(&self, a64: uint64_t) -> nsresult
[src]
void write64 (in uint64_t a64);
pub unsafe fn WriteFloat(&self, aFloat: c_float) -> nsresult
[src]
void writeFloat (in float aFloat);
pub unsafe fn WriteDouble(&self, aDouble: c_double) -> nsresult
[src]
void writeDouble (in double aDouble);
pub unsafe fn WriteStringZ(&self, aString: *const c_char) -> nsresult
[src]
/**
* Write an 8-bit pascal style string to the stream.
* 32-bit length field, followed by length 8-bit chars.
*/
void writeStringZ (in string aString);
pub unsafe fn WriteWStringZ(&self, aString: *const int16_t) -> nsresult
[src]
/**
* Write a 16-bit pascal style string to the stream.
* 32-bit length field, followed by length PRUnichars.
*/
void writeWStringZ (in wstring aString);
pub unsafe fn WriteUtf8Z(&self, aString: *const int16_t) -> nsresult
[src]
/**
* Write an 8-bit pascal style string (UTF8-encoded) to the stream.
* 32-bit length field, followed by length 8-bit chars.
*/
void writeUtf8Z (in wstring aString);
pub unsafe fn WriteBytes(
&self,
aString: *const c_char,
aLength: uint32_t
) -> nsresult
[src]
&self,
aString: *const c_char,
aLength: uint32_t
) -> nsresult
/**
* Write an opaque byte array to the stream.
*/
void writeBytes ([size_is (aLength)] in string aString, in uint32_t aLength);
pub unsafe fn WriteByteArray(
&self,
aBytes: *mut uint8_t,
aLength: uint32_t
) -> nsresult
[src]
&self,
aBytes: *mut uint8_t,
aLength: uint32_t
) -> nsresult
/**
* Write an opaque byte array to the stream.
*/
void writeByteArray ([array, size_is (aLength)] in uint8_t aBytes, in uint32_t aLength);
Trait Implementations
impl XpCom for nsIObjectOutputStream
[src]
const IID: nsIID
IID: nsIID = nsID(2462619820, 24542, 19353, [135, 179, 93, 72, 100, 34, 9, 75])
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 nsIObjectOutputStream
[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 nsIObjectOutputStream
[src]
type Target = nsIBinaryOutputStream
The resulting type after dereferencing.
fn deref(&self) -> &nsIBinaryOutputStream
[src]
Dereferences the value.