pub struct RepresentableExtensionValue { /* private fields */ }Expand description
Object container for extension values
An extension value must be representable by a RestrictedExpr
Specifically, it will be a function call func on args
Note that func may not be the constructor. A counterexample is that a
datetime is represented by an offset method call.
Nevertheless, an invariant is that eval(<func>(<args>)) == value
Implementations§
Source§impl RepresentableExtensionValue
impl RepresentableExtensionValue
Sourcepub fn new(
value: Arc<dyn InternalExtensionValue + Send + Sync>,
func: Name,
args: Vec<RestrictedExpr>,
) -> Self
pub fn new( value: Arc<dyn InternalExtensionValue + Send + Sync>, func: Name, args: Vec<RestrictedExpr>, ) -> Self
Create a new RepresentableExtensionValue
Sourcepub fn value(&self) -> &dyn InternalExtensionValue
pub fn value(&self) -> &dyn InternalExtensionValue
Get the internal value
Trait Implementations§
Source§impl Clone for RepresentableExtensionValue
impl Clone for RepresentableExtensionValue
Source§fn clone(&self) -> RepresentableExtensionValue
fn clone(&self) -> RepresentableExtensionValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RepresentableExtensionValue
impl Debug for RepresentableExtensionValue
Source§impl From<RepresentableExtensionValue> for RestrictedExpr
impl From<RepresentableExtensionValue> for RestrictedExpr
Source§fn from(val: RepresentableExtensionValue) -> Self
fn from(val: RepresentableExtensionValue) -> Self
Converts to this type from the input type.
Source§impl Ord for RepresentableExtensionValue
impl Ord for RepresentableExtensionValue
Source§impl PartialOrd for RepresentableExtensionValue
impl PartialOrd for RepresentableExtensionValue
impl Eq for RepresentableExtensionValue
Auto Trait Implementations§
impl Freeze for RepresentableExtensionValue
impl RefUnwindSafe for RepresentableExtensionValue
impl Send for RepresentableExtensionValue
impl Sync for RepresentableExtensionValue
impl Unpin for RepresentableExtensionValue
impl UnwindSafe for RepresentableExtensionValue
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more