pub struct OpenCC { /* private fields */ }Expand description
OpenCC binding for Rust.
Implementations§
Source§impl OpenCC
impl OpenCC
Sourcepub fn new<P: AsRef<Path>>(config_file_path: P) -> Result<OpenCC, OpenCCError>
pub fn new<P: AsRef<Path>>(config_file_path: P) -> Result<OpenCC, OpenCCError>
Create a new OpenCC instance through a file provided by its path.
Sourcepub fn convert<S: AsRef<str>>(&self, input: S) -> Result<String, OpenCCError>
pub fn convert<S: AsRef<str>>(&self, input: S) -> Result<String, OpenCCError>
Convert a string to another string.
Sourcepub fn convert_to_buffer<S: AsRef<str>>(
&self,
input: S,
output: String,
) -> Result<String, OpenCCError>
pub fn convert_to_buffer<S: AsRef<str>>( &self, input: S, output: String, ) -> Result<String, OpenCCError>
Convert a string to another string and store into a buffer.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OpenCC
impl RefUnwindSafe for OpenCC
impl Unpin for OpenCC
impl UnsafeUnpin for OpenCC
impl UnwindSafe for OpenCC
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more