pub enum Cow<'a, T: Json + 'a> {
Borrowed(T::Borrowed<'a>),
Owned(T),
}
Expand description
A borrowed or owned JSON value.
This type is used for the return type of JsonPath::query
. It is similar to
std::borrow::Cow
, but is specialized for Json
and JsonRef
.
Variants§
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for Cow<'a, T>
impl<'a, T> RefUnwindSafe for Cow<'a, T>
impl<'a, T> Send for Cow<'a, T>
impl<'a, T> Sync for Cow<'a, T>
impl<'a, T> Unpin for Cow<'a, T>
impl<'a, T> UnwindSafe for Cow<'a, T>
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