Enum liquid_core::ValueCow
source · [−]Expand description
Abstract the lifetime of a Value
.
Variants
Owned(Value)
A boxed Value
Borrowed(&'s dyn ValueView)
A borrowed Value
Implementations
Trait Implementations
sourceimpl<'v> PartialEq<KStringRef<'v>> for ValueCow<'v>
impl<'v> PartialEq<KStringRef<'v>> for ValueCow<'v>
sourceimpl<'v> PartialEq<ValueViewCmp<'v>> for ValueCow<'v>
impl<'v> PartialEq<ValueViewCmp<'v>> for ValueCow<'v>
sourceimpl<'s> ValueView for ValueCow<'s>
impl<'s> ValueView for ValueCow<'s>
sourcefn render(&self) -> DisplayCow<'_>
fn render(&self) -> DisplayCow<'_>
A Display
for a BoxedValue
rendered for the user.
sourcefn source(&self) -> DisplayCow<'_>
fn source(&self) -> DisplayCow<'_>
A Display
for a Value
as source code.
sourcefn query_state(&self, state: State) -> bool
fn query_state(&self, state: State) -> bool
Query the value’s state
sourcefn to_kstr(&self) -> KStringCow<'_>
fn to_kstr(&self) -> KStringCow<'_>
Interpret as a string.
sourcefn as_object(&self) -> Option<&dyn ObjectView>
fn as_object(&self) -> Option<&dyn ObjectView>
Extracts the object value if it is a object.
Auto Trait Implementations
impl<'s> !RefUnwindSafe for ValueCow<'s>
impl<'s> !Send for ValueCow<'s>
impl<'s> !Sync for ValueCow<'s>
impl<'s> Unpin for ValueCow<'s>
impl<'s> !UnwindSafe for ValueCow<'s>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more