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) -> Result<&RawValue, SpannedError>
pub fn from_ron(ron: &str) -> Result<&RawValue, SpannedError>
Helper function to validate a RON string and turn it into a
RawValue.
Sourcepub fn from_boxed_ron(ron: Box<str>) -> Result<Box<RawValue>, SpannedError>
pub fn from_boxed_ron(ron: Box<str>) -> Result<Box<RawValue>, SpannedError>
Helper function to validate a RON string and turn it into a
RawValue.
Sourcepub fn into_rust<'de, T>(&'de self) -> Result<T, SpannedError>where
T: Deserialize<'de>,
pub fn into_rust<'de, T>(&'de self) -> Result<T, SpannedError>where
T: Deserialize<'de>,
Helper function to deserialize the inner RON string into T.
Trait Implementations§
Source§impl<'de, 'a> Deserialize<'de> for &'a RawValuewhere
'de: 'a,
impl<'de, 'a> Deserialize<'de> for &'a RawValuewhere
'de: 'a,
Source§fn deserialize<D>(
deserializer: D,
) -> Result<&'a RawValue, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<&'a RawValue, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
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: D,
) -> Result<Box<RawValue>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Box<RawValue>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialOrd for RawValue
impl PartialOrd for RawValue
Source§impl Serialize for RawValue
impl Serialize for RawValue
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
Source§impl ToOwned for RawValue
impl ToOwned for RawValue
impl Eq for RawValue
impl StructuralPartialEq for RawValue
Auto Trait Implementations§
impl Freeze for RawValue
impl RefUnwindSafe for RawValue
impl Send for RawValue
impl !Sized for RawValue
impl Sync for RawValue
impl Unpin for RawValue
impl UnwindSafe for RawValue
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
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self, then passes self.deref() into the pipe function.