Struct xpcom::interfaces::nsINetAddr
[−]
[src]
#[repr(C)]pub struct nsINetAddr { /* fields omitted */ }
interface nsINetAddr : nsISupports
/**
* nsINetAddr
*
* This interface represents a native NetAddr struct in a readonly
* interface.
*/
Methods
impl nsINetAddr
[src]
pub fn coerce<T: nsINetAddrCoerce>(&self) -> &T
[src]
Cast this nsINetAddr
to one of its base interfaces.
impl nsINetAddr
[src]
pub const FAMILY_INET: i64
FAMILY_INET: i64 = 1
/**
* Network address families. These correspond to all the network address
* families supported by the NetAddr struct.
*/
pub const FAMILY_INET6: i64
FAMILY_INET6: i64 = 2
pub const FAMILY_LOCAL: i64
FAMILY_LOCAL: i64 = 3
pub unsafe fn GetFamily(&self, aFamily: *mut uint16_t) -> nsresult
[src]
/**
* @return the address family of the network address, which corresponds to
* one of the FAMILY_ constants.
*/
readonly attribute unsigned short family;
pub unsafe fn GetAddress(&self, aAddress: &mut nsACString) -> nsresult
[src]
/**
* @return Either the IP address (FAMILY_INET, FAMILY_INET6) or the path
* (FAMILY_LOCAL) in string form. IP addresses are in the format produced by
* mozilla::net::NetAddrToString.
*
* Note: Paths for FAMILY_LOCAL may have length limitations which are
* implementation dependent and not documented as part of this interface.
*/
readonly attribute AUTF8String address;
pub unsafe fn GetPort(&self, aPort: *mut uint16_t) -> nsresult
[src]
/**
* @return the port number for a FAMILY_INET or FAMILY_INET6 address.
*
* @throws NS_ERROR_NOT_AVAILABLE if the address family is not FAMILY_INET or
* FAMILY_INET6.
*/
readonly attribute unsigned short port;
pub unsafe fn GetFlow(&self, aFlow: *mut uint32_t) -> nsresult
[src]
/**
* @return the flow label for a FAMILY_INET6 address.
*
* @see http://www.ietf.org/rfc/rfc3697.txt
*
* @throws NS_ERROR_NOT_AVAILABLE if the address family is not FAMILY_INET6
*/
readonly attribute unsigned long flow;
pub unsafe fn GetScope(&self, aScope: *mut uint32_t) -> nsresult
[src]
/**
* @return the address scope of a FAMILY_INET6 address.
*
* @see http://tools.ietf.org/html/rfc4007
*
* @throws NS_ERROR_NOT_AVAILABLE if the address family is not FAMILY_INET6
*/
readonly attribute unsigned long scope;
pub unsafe fn GetIsV4Mapped(&self, aIsV4Mapped: *mut bool) -> nsresult
[src]
/**
* @return whether a FAMILY_INET6 address is mapped from FAMILY_INET.
*
* @throws NS_ERROR_NOT_AVAILABLE if the address family is not FAMILY_INET6
*/
readonly attribute boolean isV4Mapped;
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 nsINetAddr
[src]
const IID: nsIID
IID: nsIID = nsID(1697357509, 53593, 17879, [145, 39, 80, 187, 85, 148, 134, 205])
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 nsINetAddr
[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 nsINetAddr
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.