Enum loose_liquid_core::model::ValueCow
source · pub enum ValueCow<'s> {
Owned(Value),
Borrowed(&'s dyn ValueView),
}
Expand description
Abstract the lifetime of a Value
.
Variants§
Implementations§
Trait Implementations§
source§impl<'v> PartialEq<&'v str> for ValueCow<'v>
impl<'v> PartialEq<&'v str> for ValueCow<'v>
source§impl<'v> PartialEq<Date> for ValueCow<'v>
impl<'v> PartialEq<Date> for ValueCow<'v>
source§impl<'v> PartialEq<DateTime> for ValueCow<'v>
impl<'v> PartialEq<DateTime> for ValueCow<'v>
source§impl<'v> PartialEq<KStringBase<Box<str, Global>>> for ValueCow<'v>
impl<'v> PartialEq<KStringBase<Box<str, Global>>> for ValueCow<'v>
source§impl<'v> PartialEq<KStringCowBase<'v, Box<str, Global>>> for ValueCow<'v>
impl<'v> PartialEq<KStringCowBase<'v, Box<str, Global>>> for ValueCow<'v>
source§fn eq(&self, other: &KStringCow<'v>) -> bool
fn eq(&self, other: &KStringCow<'v>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'v> PartialEq<KStringRef<'v>> for ValueCow<'v>
impl<'v> PartialEq<KStringRef<'v>> for ValueCow<'v>
source§fn eq(&self, other: &KStringRef<'v>) -> bool
fn eq(&self, other: &KStringRef<'v>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'v> PartialEq<String> for ValueCow<'v>
impl<'v> PartialEq<String> for ValueCow<'v>
source§impl<'v> PartialEq<Value> for ValueCow<'v>
impl<'v> PartialEq<Value> for ValueCow<'v>
source§impl<'v> PartialEq<ValueCow<'v>> for ValueCow<'v>
impl<'v> PartialEq<ValueCow<'v>> for ValueCow<'v>
source§impl<'v> PartialEq<ValueViewCmp<'v>> for ValueCow<'v>
impl<'v> PartialEq<ValueViewCmp<'v>> for ValueCow<'v>
source§fn eq(&self, other: &ValueViewCmp<'v>) -> bool
fn eq(&self, other: &ValueViewCmp<'v>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'v> PartialEq<bool> for ValueCow<'v>
impl<'v> PartialEq<bool> for ValueCow<'v>
source§impl<'s> ValueView for ValueCow<'s>
impl<'s> ValueView for ValueCow<'s>
source§fn render(&self) -> DisplayCow<'_>
fn render(&self) -> DisplayCow<'_>
A
Display
for a BoxedValue
rendered for the user.source§fn source(&self) -> DisplayCow<'_>
fn source(&self) -> DisplayCow<'_>
A
Display
for a Value
as source code.source§fn query_state(&self, state: State) -> bool
fn query_state(&self, state: State) -> bool
Query the value’s state
source§fn to_kstr(&self) -> KStringCow<'_>
fn to_kstr(&self) -> KStringCow<'_>
Interpret as a string.
source§fn 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§
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