pub struct Ref<'a, 'd> { /* private fields */ }Expand description
One value inside a Document.
Implementations§
Trait Implementations§
impl<'a, 'd> Copy for Ref<'a, 'd>
Source§impl Input for Ref<'_, '_>
impl Input for Ref<'_, '_>
Source§type Child<'x> = Ref<'_, '_>
where
Self: 'x
type Child<'x> = Ref<'_, '_> where Self: 'x
An element of an array, or the value at a key.
Implementations should make this converge, usually to themselves or to a
reference to themselves. A type whose child is a strictly new type on
every level would make the validator recurse forever at compile time.
fn kind(&self) -> Kind
fn as_bool(&self) -> Option<bool>
fn as_int(&self) -> Option<Int>
fn as_f64(&self) -> Option<f64>
fn as_str(&self) -> Option<Cow<'_, str>>
fn item(&self, index: usize) -> Option<Self::Child<'_>>
Source§fn slot(&self, key: &str) -> Slot<Self::Child<'_>>
fn slot(&self, key: &str) -> Slot<Self::Child<'_>>
Reads a key without collapsing absence into null.
Source§fn each_key(&self, f: &mut dyn FnMut(&str))
fn each_key(&self, f: &mut dyn FnMut(&str))
Visits every key of an object, for the unknown-field check.
fn is_empty(&self) -> bool
Auto Trait Implementations§
impl<'a, 'd> Freeze for Ref<'a, 'd>
impl<'a, 'd> RefUnwindSafe for Ref<'a, 'd>
impl<'a, 'd> Send for Ref<'a, 'd>
impl<'a, 'd> Sync for Ref<'a, 'd>
impl<'a, 'd> Unpin for Ref<'a, 'd>
impl<'a, 'd> UnsafeUnpin for Ref<'a, 'd>
impl<'a, 'd> UnwindSafe for Ref<'a, 'd>
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