Struct xpcom::interfaces::nsIEnvironment
[−]
[src]
#[repr(C)]pub struct nsIEnvironment { /* fields omitted */ }
interface nsIEnvironment : nsISupports
/**
* Scriptable access to the current process environment.
*
*/
Methods
impl nsIEnvironment
[src]
pub fn coerce<T: nsIEnvironmentCoerce>(&self) -> &T
[src]
Cast this nsIEnvironment
to one of its base interfaces.
impl nsIEnvironment
[src]
pub unsafe fn Set(&self, aName: &nsAString, aValue: &nsAString) -> nsresult
[src]
/**
* Set the value of an environment variable.
*
* @param aName the variable name to set.
* @param aValue the value to set.
*/
void set (in AString aName, in AString aValue);
pub unsafe fn Get(&self, aName: &nsAString, _retval: &mut nsAString) -> nsresult
[src]
/**
* Get the value of an environment variable.
*
* @param aName the variable name to retrieve.
* @return returns the value of the env variable. An empty string
* will be returned when the env variable does not exist or
* when the value itself is an empty string - please use
* |exists()| to probe whether the env variable exists
* or not.
*/
AString get (in AString aName);
pub unsafe fn Exists(&self, aName: &nsAString, _retval: *mut bool) -> nsresult
[src]
/**
* Check the existence of an environment variable.
* This method checks whether an environment variable is present in
* the environment or not.
*
* - For Unix/Linux platforms we follow the Unix definition:
* An environment variable exists when |getenv()| returns a non-NULL value.
* An environment variable does not exist when |getenv()| returns NULL.
* - For non-Unix/Linux platforms we have to fall back to a
* "portable" definition (which is incorrect for Unix/Linux!!!!)
* which simply checks whether the string returned by |Get()| is empty
* or not.
*
* @param aName the variable name to probe.
* @return if the variable has been set, the value returned is
* PR_TRUE. If the variable was not defined in the
* environment PR_FALSE will be returned.
*/
boolean exists (in AString aName);
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 nsIEnvironment
[src]
const IID: nsIID
IID: nsIID = nsID(270358849, 55328, 20101, [162, 102, 154, 52, 105, 148, 8, 7])
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 nsIEnvironment
[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 nsIEnvironment
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.