pub struct RawValue { /* private fields */ }
Implementations§
Source§impl RawValue
impl RawValue
Sourcepub fn get_ron(&self) -> &str
pub fn get_ron(&self) -> &str
Get the inner raw RON string, which is guaranteed to contain valid RON.
Sourcepub fn from_ron(ron: &str) -> SpannedResult<&Self>
pub fn from_ron(ron: &str) -> SpannedResult<&Self>
Helper function to validate a RON string and turn it into a
RawValue
.
Sourcepub fn from_boxed_ron(ron: Box<str>) -> SpannedResult<Box<Self>>
pub fn from_boxed_ron(ron: Box<str>) -> SpannedResult<Box<Self>>
Helper function to validate a RON string and turn it into a
RawValue
.
Sourcepub fn into_rust<'de, T: Deserialize<'de>>(&'de self) -> SpannedResult<T>
pub fn into_rust<'de, T: Deserialize<'de>>(&'de self) -> SpannedResult<T>
Helper function to deserialize the inner RON string into T
.
Source§impl RawValue
impl RawValue
Sourcepub fn trim(&self) -> &Self
pub fn trim(&self) -> &Self
Trims any leadning and trailing whitespace off the raw RON string, including whitespace characters and comments.
Sourcepub fn trim_boxed(self: Box<Self>) -> Box<Self>
pub fn trim_boxed(self: Box<Self>) -> Box<Self>
Trims any leadning and trailing whitespace off the boxed raw RON string, including whitespace characters and comments.
Trait Implementations§
Source§impl<'de: 'a, 'a> Deserialize<'de> for &'a RawValue
impl<'de: 'a, 'a> Deserialize<'de> for &'a RawValue
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'de> Deserialize<'de> for Box<RawValue>
impl<'de> Deserialize<'de> for Box<RawValue>
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more