Struct xpcom::interfaces::nsIUTF8ConverterService
[−]
[src]
#[repr(C)]pub struct nsIUTF8ConverterService { /* fields omitted */ }
interface nsIUTF8ConverterService : nsISupports
Methods
impl nsIUTF8ConverterService
[src]
pub fn coerce<T: nsIUTF8ConverterServiceCoerce>(&self) -> &T
[src]
Cast this nsIUTF8ConverterService
to one of its base interfaces.
impl nsIUTF8ConverterService
[src]
pub unsafe fn ConvertURISpecToUTF8(
&self,
aSpec: &nsACString,
aCharset: *const c_char,
_retval: &mut nsACString
) -> nsresult
[src]
&self,
aSpec: &nsACString,
aCharset: *const c_char,
_retval: &mut nsACString
) -> nsresult
/**
* 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>
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 nsIUTF8ConverterService
[src]
const IID: nsIID
IID: nsIID = nsID(614421155, 9625, 19200, [186, 64, 4, 129, 54, 72, 49, 162])
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 nsIUTF8ConverterService
[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 nsIUTF8ConverterService
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.