Struct sourceview5::Encoding [−][src]
Implementations
impl Encoding
[src]
pub fn get_charset(&self) -> Option<GString>
[src]
Gets the character set of the Encoding
, such as “UTF-8” or
“ISO-8859-1”.
Returns
the character set of the Encoding
.
pub fn get_name(&self) -> Option<GString>
[src]
pub fn to_str(&self) -> GString
[src]
pub fn get_all() -> Vec<Encoding>
[src]
pub fn get_current() -> Option<Encoding>
[src]
Gets the Encoding
for the current locale. See also g_get_charset
.
Returns
the current locale encoding.
pub fn get_default_candidates() -> Vec<Encoding>
[src]
Gets the list of default candidate encodings to try when loading a file. See
FileLoader::set_candidate_encodings
.
This function returns a different list depending on the current locale (i.e. language, country and default encoding). The UTF-8 encoding and the current locale encoding are guaranteed to be present in the returned list.
Returns
the list of
default candidate encodings. Free with glib::SList::free
.
pub fn get_from_charset(charset: &str) -> Option<Encoding>
[src]
Gets a Encoding
from a character set such as “UTF-8” or
“ISO-8859-1”.
charset
a character set.
Returns
the corresponding Encoding
, or None
if not found.
pub fn get_utf8() -> Option<Encoding>
[src]
Returns
the UTF-8 encoding.
Trait Implementations
impl Clone for Encoding
[src]
impl Debug for Encoding
[src]
impl Display for Encoding
[src]
impl Eq for Encoding
[src]
impl Hash for Encoding
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Encoding
[src]
fn cmp(&self, other: &Encoding) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Encoding> for Encoding
[src]
impl PartialOrd<Encoding> for Encoding
[src]
fn partial_cmp(&self, other: &Encoding) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StaticType for Encoding
[src]
fn static_type() -> Type
[src]
impl StructuralEq for Encoding
[src]
impl StructuralPartialEq for Encoding
[src]
Auto Trait Implementations
impl RefUnwindSafe for Encoding
impl !Send for Encoding
impl !Sync for Encoding
impl Unpin for Encoding
impl UnwindSafe for Encoding
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> ToValue for T where
T: SetValue + ?Sized,
T: SetValue + ?Sized,
pub fn to_value(&self) -> Value
pub fn to_value_type(&self) -> Type
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,