pub enum ValueType {
String,
Number,
List,
Entity,
Any,
}Expand description
A linguistic type that a template slot or pipe can carry.
Mirrors the variants of prosaic_core::Value plus Any as an
escape hatch for pipes that accept heterogeneous inputs (such as
capitalize, verb, refer, possessive).
Variants§
String
Number
List
Entity
Any
Accepts any slot type. During type unification a concrete type
always wins over Any (e.g. Number ∩ Any → Number), so marking
a pipe’s input Any never widens an already-inferred concrete
type.
Trait Implementations§
impl Copy for ValueType
impl Eq for ValueType
impl StructuralPartialEq for ValueType
Auto Trait Implementations§
impl Freeze for ValueType
impl RefUnwindSafe for ValueType
impl Send for ValueType
impl Sync for ValueType
impl Unpin for ValueType
impl UnsafeUnpin for ValueType
impl UnwindSafe for ValueType
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