Struct rsfbclient_core::charset::Charset[][src]

pub struct Charset {
    pub on_firebird: &'static str,
    pub on_rust: Option<EncodingRef>,
}

Charset definition. Used to encode/decode the strings.

Fields

on_firebird: &'static str

Charset used in firebird

on_rust: Option<EncodingRef>

Equivalent charset used on rust code

Implementations

impl Charset[src]

pub fn decode<'a, B>(&self, bytes: B) -> Result<String, FbError> where
    B: Into<Cow<'a, [u8]>>, 
[src]

Decode the bytes using the current charset

pub fn encode<'a, S>(&self, s: S) -> Result<Cow<'a, [u8]>, FbError> where
    S: Into<Cow<'a, str>>, 
[src]

Trait Implementations

impl Clone for Charset[src]

impl Debug for Charset[src]

impl FromStr for Charset[src]

type Err = FbError

The associated error which can be returned from parsing.

impl PartialEq<Charset> for Charset[src]

Auto Trait Implementations

impl !RefUnwindSafe for Charset

impl Send for Charset

impl Sync for Charset

impl Unpin for Charset

impl !UnwindSafe for Charset

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.