[][src]Trait text_translator::ApiError

pub trait ApiError {
    fn from_error_code(code: u16) -> Self;
fn to_error_code(&self) -> u16; }

Used on enums representing errors that a call to an API returned.

Required methods

fn from_error_code(code: u16) -> Self

Converts an error code to the enum variant.

fn to_error_code(&self) -> u16

Converts an error variant to the matching error code.

Loading content...

Implementors

impl ApiError for YandexError[src]

Loading content...