Struct opencc::OpenCC [] [src]

pub struct OpenCC {
    pub config: String,
    // some fields omitted
}

Fields

Configuration file

Methods

impl OpenCC
[src]

[src]

Constructs a new OpenCC

Examples

let cc = opencc::OpenCC::new("t2s.json");

[src]

Convert a text

Examples

let cc = opencc::OpenCC::new("t2s.json");
cc.convert("乾坤一擲");
cc.convert("開放中文轉換");

[src]

Returns the last error message

Safety

Note that this function is the only one which is NOT thread-safe.

Trait Implementations

impl Drop for OpenCC
[src]

[src]

Close the underlying libopencc when it been droped

impl Send for OpenCC
[src]

impl Sync for OpenCC
[src]