pub struct LanguageProto {Show 13 fields
pub id: Option<String>,
pub language: Option<String>,
pub script: Option<String>,
pub name: Option<String>,
pub preferred_name: Option<String>,
pub autonym: Option<String>,
pub population: Option<i32>,
pub region: Vec<String>,
pub exemplar_chars: Option<ExemplarCharsProto>,
pub sample_text: Option<SampleTextProto>,
pub historical: Option<bool>,
pub source: Vec<String>,
pub note: Option<String>,
}Fields§
§id: Option<String>Either ${lang} or ${lang}_${script}
language: Option<String>BCP 47
script: Option<String>§name: Option<String>§preferred_name: Option<String>§autonym: Option<String>Name of language as written in that language
population: Option<i32>§region: Vec<String>§exemplar_chars: Option<ExemplarCharsProto>§sample_text: Option<SampleTextProto>§historical: Option<bool>§source: Vec<String>§note: Option<String>Implementations§
Source§impl LanguageProto
impl LanguageProto
Sourcepub fn language(&self) -> &str
pub fn language(&self) -> &str
Returns the value of language, or the default value if language is unset.
Sourcepub fn script(&self) -> &str
pub fn script(&self) -> &str
Returns the value of script, or the default value if script is unset.
Sourcepub fn preferred_name(&self) -> &str
pub fn preferred_name(&self) -> &str
Returns the value of preferred_name, or the default value if preferred_name is unset.
Sourcepub fn autonym(&self) -> &str
pub fn autonym(&self) -> &str
Returns the value of autonym, or the default value if autonym is unset.
Sourcepub fn population(&self) -> i32
pub fn population(&self) -> i32
Returns the value of population, or the default value if population is unset.
Sourcepub fn historical(&self) -> bool
pub fn historical(&self) -> bool
Returns the value of historical, or the default value if historical is unset.
Trait Implementations§
Source§impl Clone for LanguageProto
impl Clone for LanguageProto
Source§fn clone(&self) -> LanguageProto
fn clone(&self) -> LanguageProto
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LanguageProto
impl Debug for LanguageProto
Source§impl Default for LanguageProto
impl Default for LanguageProto
Source§fn default() -> LanguageProto
fn default() -> LanguageProto
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LanguageProto
impl<'de> Deserialize<'de> for LanguageProto
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LanguageProto, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LanguageProto, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Message for LanguageProto
impl Message for LanguageProto
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for LanguageProto
impl PartialEq for LanguageProto
Source§impl Serialize for LanguageProto
impl Serialize for LanguageProto
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for LanguageProto
Auto Trait Implementations§
impl Freeze for LanguageProto
impl RefUnwindSafe for LanguageProto
impl Send for LanguageProto
impl Sync for LanguageProto
impl Unpin for LanguageProto
impl UnwindSafe for LanguageProto
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