Enum gapi_grpc::google::cloud::language::v1beta2::EncodingType [−][src]
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
If EncodingType
is not specified, encoding-dependent information (such as
begin_offset
) will be set at -1
.
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.
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.
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
impl RefUnwindSafe for EncodingType
impl Send for EncodingType
impl Sync for EncodingType
impl Unpin for EncodingType
impl UnwindSafe for EncodingType
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src][+]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
impl<T> From<T> for T
[src][+]
impl<T> Instrument for T
[src][+]
impl<T> Instrument for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> IntoRequest<T> for T
[src][+]
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src][+]
V: MultiLane<T>,