Struct xpcom::interfaces::nsIUTF8ConverterService [] [src]

#[repr(C)]
pub struct nsIUTF8ConverterService { /* fields omitted */ }

interface nsIUTF8ConverterService : nsISupports

Methods

impl nsIUTF8ConverterService
[src]

[src]

Cast this nsIUTF8ConverterService to one of its base interfaces.

impl nsIUTF8ConverterService
[src]

[src]

/**
   * Ensure that |aSpec| (after URL-unescaping it) is encoded in UTF-8.
   * If not,  convert it to UTF-8, assuming it's encoded in |aCharset|,
   * and return the result.
   *
   * <p>Make sure that all characters outside US-ASCII in your input spec
   * are url-escaped if  your spec is not in UTF-8 (before url-escaping)
   * because the presence of non-ASCII characters is <strong>blindly</strong>
   * regarded as an indication that your input spec is in unescaped UTF-8
   * and it will be returned without further processing. No valid spec
   * going around in Mozilla code would break this assumption.
   *
   * <p>XXX The above may change in the future depending on the usage pattern.
   *
   * @param aSpec an url-escaped URI spec to  ensure its UTF8ness
   * @param aCharset the charset to convert from if |aSpec| is not in UTF-8
   * @return the converted spec in UTF-8.
   * @throws NS_ERROR_UCONV_NOCONV when there is no decoder for aCharset
   *         or NS_ERROR_UDEC_ILLEGALINPUT in case of conversion failure
   */

AUTF8String convertURISpecToUTF8 (in ACString aSpec, in string aCharset);

Methods from Deref<Target = nsISupports>

[src]

Cast this nsISupports to one of its base interfaces.

[src]

void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);

[src]

[noscript,notxpcom] nsrefcnt AddRef ();

[src]

[noscript,notxpcom] nsrefcnt Release ();

Trait Implementations

impl XpCom for nsIUTF8ConverterService
[src]

IID: nsIID = nsID(614421155, 9625, 19200, [186, 64, 4, 129, 54, 72, 49, 162])

[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 nsIUTF8ConverterService
[src]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIUTF8ConverterService
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.