A spec that only matches the given value.
(value: Datum<'a>)
| 214 | |
| 215 | /// A spec that only matches the given value. |
| 216 | pub fn value(value: Datum<'a>) -> ResultSpec<'a> { |
| 217 | match value { |
| 218 | Datum::Null => Self::null(), |
| 219 | nonnull => ResultSpec { |
| 220 | values: Values::just(nonnull), |
| 221 | ..Self::nothing() |
| 222 | }, |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | /// A spec that matches values between the given (non-null) min and max. |
| 227 | pub fn value_between(min: Datum<'a>, max: Datum<'a>) -> ResultSpec<'a> { |
no outgoing calls