pub struct LanguageString { /* private fields */ }
Expand description
Corresponds to the grammar rule string
.
Implementations§
Source§impl LanguageString
impl LanguageString
pub fn new(value: &str, language: Option<LanguageTag>) -> Self
pub fn plain(value: &str) -> Self
pub const fn value(&self) -> &String
pub fn set_value(&mut self, value: String)
pub const fn has_language(&self) -> bool
pub const fn language(&self) -> Option<&LanguageTag>
pub fn set_language(&mut self, language: LanguageTag)
pub fn unset_language(&mut self)
pub fn is_plain_literal(&self) -> bool
pub fn eq_with_span(&self, other: &Self) -> bool
Trait Implementations§
Source§impl Clone for LanguageString
impl Clone for LanguageString
Source§fn clone(&self) -> LanguageString
fn clone(&self) -> LanguageString
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 LanguageString
impl Debug for LanguageString
Source§impl<'de> Deserialize<'de> for LanguageString
impl<'de> Deserialize<'de> for LanguageString
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for LanguageString
impl Display for LanguageString
Source§impl From<&LanguageString> for SimpleValue
impl From<&LanguageString> for SimpleValue
Source§fn from(v: &LanguageString) -> Self
fn from(v: &LanguageString) -> Self
Converts to this type from the input type.
Source§impl From<&str> for LanguageString
impl From<&str> for LanguageString
Source§impl From<LanguageString> for SimpleValue
impl From<LanguageString> for SimpleValue
Source§fn from(v: LanguageString) -> Self
fn from(v: LanguageString) -> Self
Converts to this type from the input type.
Source§impl From<String> for LanguageString
impl From<String> for LanguageString
Source§impl HasSourceSpan for LanguageString
impl HasSourceSpan for LanguageString
fn with_source_span(self, span: Span) -> Self
fn source_span(&self) -> Option<&Span>
fn set_source_span(&mut self, span: Span)
fn unset_source_span(&mut self)
fn has_source_span(&self) -> bool
Source§impl PartialEq for LanguageString
impl PartialEq for LanguageString
Source§impl Serialize for LanguageString
impl Serialize for LanguageString
impl Eq for LanguageString
Auto Trait Implementations§
impl Freeze for LanguageString
impl RefUnwindSafe for LanguageString
impl Send for LanguageString
impl Sync for LanguageString
impl Unpin for LanguageString
impl UnwindSafe for LanguageString
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