pub enum ValueRef<'a> {
Null,
Bool(bool),
Int(i64),
Float(f64),
Str(&'a str),
List(&'a [ValueRef<'a>]),
Map(MapRef<'a>),
Ref {
kind: KindName,
id: &'a str,
},
Bytes(&'a [u8]),
}Expand description
A borrowed Value: the same cases, strings &'a str, lists and maps slices.
Variants§
Null
Nothing.
Bool(bool)
true or false.
Int(i64)
An integer.
Float(f64)
A number with a fraction or an exponent.
Str(&'a str)
A string, as spelled.
List(&'a [ValueRef<'a>])
A list, in the arena.
Map(MapRef<'a>)
A map, in the arena.
Ref
@file:images/logo.png: its kind checked, its id as written
(checked where it was read).
Bytes(&'a [u8])
Bytes as they are.
Implementations§
Trait Implementations§
impl<'a> Copy for ValueRef<'a>
impl<'a> StructuralPartialEq for ValueRef<'a>
Auto Trait Implementations§
impl<'a> Freeze for ValueRef<'a>
impl<'a> RefUnwindSafe for ValueRef<'a>
impl<'a> Send for ValueRef<'a>
impl<'a> Sync for ValueRef<'a>
impl<'a> Unpin for ValueRef<'a>
impl<'a> UnsafeUnpin for ValueRef<'a>
impl<'a> UnwindSafe for ValueRef<'a>
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