[][src]Enum gcp_client::google::cloud::language::v1::EncodingType

#[repr(i32)]pub enum EncodingType {
    None,
    Utf8,
    Utf16,
    Utf32,
}

Represents the text encoding that the caller uses to process the output. Providing an EncodingType is recommended because the API provides the beginning offsets for various outputs, such as tokens and mentions, and languages that natively use different text encodings may access offsets differently.

Variants

None

If EncodingType is not specified, encoding-dependent information (such as begin_offset) will be set at -1.

Utf8

Encoding-dependent information (such as begin_offset) is calculated based on the UTF-8 encoding of the input. C++ and Go are examples of languages that use this encoding natively.

Utf16

Encoding-dependent information (such as begin_offset) is calculated based on the UTF-16 encoding of the input. Java and JavaScript are examples of languages that use this encoding natively.

Utf32

Encoding-dependent information (such as begin_offset) is calculated based on the UTF-32 encoding of the input. Python is an example of a language that uses this encoding natively.

Implementations

impl EncodingType[src]

pub fn is_valid(value: i32) -> bool[src]

Returns true if value is a variant of EncodingType.

pub fn from_i32(value: i32) -> Option<EncodingType>[src]

Converts an i32 to a EncodingType, or None if value is not a valid variant.

Trait Implementations

impl Clone for EncodingType[src]

impl Copy for EncodingType[src]

impl Debug for EncodingType[src]

impl Default for EncodingType[src]

impl Eq for EncodingType[src]

impl From<EncodingType> for i32[src]

impl Hash for EncodingType[src]

impl Ord for EncodingType[src]

impl PartialEq<EncodingType> for EncodingType[src]

impl PartialOrd<EncodingType> for EncodingType[src]

impl StructuralEq for EncodingType[src]

impl StructuralPartialEq for EncodingType[src]

Auto Trait Implementations

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

impl<T> Instrument for T[src]

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

impl<T> IntoRequest<T> for 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]