[−][src]Enum insta::internals::Content
Represents variable typed content.
This is used internally for the serialization system to represent values before the actual snapshots are written.
Variants
Bool(bool)
U8(u8)
U16(u16)
U32(u32)
U64(u64)
I8(i8)
I16(i16)
I32(i32)
I64(i64)
F32(f32)
F64(f64)
Char(char)
String(String)
Methods
impl Content
[src]
pub fn as_str(&self) -> Option<&str>
[src]
Returns the value as string
pub fn as_u64(&self) -> Option<u64>
[src]
Returns the value as u64
pub fn walk<F: FnMut(&mut Content) -> bool>(&mut self, visit: &mut F)
[src]
Recursively walks the content structure mutably.
The callback is invoked for every content in the tree.
Trait Implementations
impl Clone for Content
[src]
impl Debug for Content
[src]
impl<'a> From<&'a [u8]> for Content
[src]
impl<'a> From<&'a str> for Content
[src]
impl From<()> for Content
[src]
impl From<String> for Content
[src]
impl From<Vec<u8>> for Content
[src]
impl From<bool> for Content
[src]
impl From<char> for Content
[src]
impl From<f32> for Content
[src]
impl From<f64> for Content
[src]
impl From<i16> for Content
[src]
impl From<i32> for Content
[src]
impl From<i64> for Content
[src]
impl From<i8> for Content
[src]
impl From<u16> for Content
[src]
impl From<u32> for Content
[src]
impl From<u64> for Content
[src]
impl From<u8> for Content
[src]
impl Serialize for Content
[src]
Auto Trait Implementations
impl RefUnwindSafe for Content
impl Send for Content
impl Sync for Content
impl Unpin for Content
impl UnwindSafe for Content
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,