Enum oneline_template::function_executor::Value [−][src]
pub enum Value { String(String), Bool(bool), Bytes(Vec<u8>), Char(char), Option(Option<Box<Value>>), UInt(u128), Int(i128), Float(f64), }
The value used for templating.
Automatic convertation into string
string
->string
char
->string
uint
->string
using decimal base.int
->string
using decimal base with sign.bytes
-> utf-8 encoded string or errorbool
-> error. For convertation boolean type usebool:to_string
option
-> error. For convertation option usestring:unwrap_or
,uint:unwrap_or
or others.float
-> error. For convertation option usefloat:to_string
.
Variants
String(String)
Value that contains string type.
Bool(bool)
Value that contains boolean type.
Value that contains array of bytes.
Char(char)
Value that contains char.
Value that may contain other value.
UInt(u128)
Value that contains unsigned 128-bit integer.
Int(i128)
Value that contains signed 128-bit integer.
Float(f64)
Value that contains float value.
Implementations
impl Value
[src]
impl Value
[src]pub fn as_string(&self) -> Result<&String, FunctionError>
[src]
Trying to cast value as string.
pub fn as_mut_string(&mut self) -> Result<&mut String, FunctionError>
[src]
Trying to cast value as mutable string.
pub fn into_string(self) -> Result<String, FunctionError>
[src]
Trying to cast value as string.
pub fn as_bool(&self) -> Result<&bool, FunctionError>
[src]
Trying to cast value as bool.
pub fn as_mut_bool(&mut self) -> Result<&mut bool, FunctionError>
[src]
Trying to cast value as mutable bool.
pub fn into_bool(self) -> Result<bool, FunctionError>
[src]
Trying to cast value as bool.
pub fn as_bytes(&self) -> Result<&Vec<u8>, FunctionError>
[src]
Trying to cast value as bytes.
pub fn as_mut_bytes(&mut self) -> Result<&mut Vec<u8>, FunctionError>
[src]
Trying to cast value as mutable bytes.
pub fn into_bytes(self) -> Result<Vec<u8>, FunctionError>
[src]
Trying to cast value as bytes.
pub fn as_char(&self) -> Result<&char, FunctionError>
[src]
Trying to cast value as char.
pub fn as_mut_char(&mut self) -> Result<&mut char, FunctionError>
[src]
Trying to cast value as mutable char.
pub fn as_option(&self) -> Result<Option<&Value>, FunctionError>
[src]
Trying to cast value as option.
pub fn as_mut_option(&mut self) -> Result<Option<&mut Value>, FunctionError>
[src]
Trying to cast value as mutable option.
pub fn into_option(self) -> Result<Option<Value>, FunctionError>
[src]
Trying to cast value as option.
pub fn as_uint(&self) -> Result<&u128, FunctionError>
[src]
Trying to cast value as uint.
pub fn as_mut_uint(&mut self) -> Result<&mut u128, FunctionError>
[src]
Trying to cast value as mutable uint.
pub fn into_uint(self) -> Result<u128, FunctionError>
[src]
Trying to cast value as uint.
pub fn as_int(&self) -> Result<&i128, FunctionError>
[src]
Trying to cast value as int.
pub fn as_mut_int(&mut self) -> Result<&mut i128, FunctionError>
[src]
Trying to cast value as mutable int.
pub fn into_int(self) -> Result<i128, FunctionError>
[src]
Trying to cast value as int.
pub fn as_float(&self) -> Result<&f64, FunctionError>
[src]
Trying to cast value as float.
pub fn as_mut_float(&mut self) -> Result<&mut f64, FunctionError>
[src]
Trying to cast value as mutable float.
pub fn floato_float(self) -> Result<f64, FunctionError>
[src]
Trying to cast value as float.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Value
impl RefUnwindSafe for Value
impl UnwindSafe for Value
impl UnwindSafe for Value