[−][src]Struct ralik::Value
Implementations
impl Value
[src]
pub fn new_unit(context: &Context) -> Result<Value, TupleCreationError>
[src]
pub fn new_bool(
context: &Context,
value: impl Into<bool>
) -> Result<Value, BoolCreationError>
[src]
context: &Context,
value: impl Into<bool>
) -> Result<Value, BoolCreationError>
pub fn new_char(
context: &Context,
value: impl Into<char>
) -> Result<Value, CharCreationError>
[src]
context: &Context,
value: impl Into<char>
) -> Result<Value, CharCreationError>
pub fn new_integer(
context: &Context,
value: impl Into<BigInt>
) -> Result<Value, IntegerCreationError>
[src]
context: &Context,
value: impl Into<BigInt>
) -> Result<Value, IntegerCreationError>
pub fn new_string(
context: &Context,
value: impl Into<Box<str>>
) -> Result<Value, StringCreationError>
[src]
context: &Context,
value: impl Into<Box<str>>
) -> Result<Value, StringCreationError>
pub fn new_tuple(
context: &Context,
values: impl Into<Box<[Value]>>
) -> Result<Value, TupleCreationError>
[src]
context: &Context,
values: impl Into<Box<[Value]>>
) -> Result<Value, TupleCreationError>
pub fn new_tuple_struct(
context: &Context,
name: impl AsRef<str>,
values: impl Into<Box<[Value]>>
) -> Result<Value, TupleStructCreationError>
[src]
context: &Context,
name: impl AsRef<str>,
values: impl Into<Box<[Value]>>
) -> Result<Value, TupleStructCreationError>
pub fn new_struct(
context: &Context,
name: impl AsRef<str>,
fields: impl Iterator<Item = (impl AsRef<str>, Value)>
) -> Result<Value, StructCreationError>
[src]
context: &Context,
name: impl AsRef<str>,
fields: impl Iterator<Item = (impl AsRef<str>, Value)>
) -> Result<Value, StructCreationError>
pub fn new_unit_struct(
context: &Context,
name: impl AsRef<str>
) -> Result<Value, UnitStructCreationError>
[src]
context: &Context,
name: impl AsRef<str>
) -> Result<Value, UnitStructCreationError>
pub fn new_array(
context: &Context,
element_type: &TypeHandle,
values: impl Into<Box<[Value]>>
) -> Result<Value, ArrayCreationError>
[src]
context: &Context,
element_type: &TypeHandle,
values: impl Into<Box<[Value]>>
) -> Result<Value, ArrayCreationError>
pub fn new_enum_unit_variant(
context: &Context,
name: impl AsRef<str>,
variant_name: impl AsRef<str>
) -> Result<Value, EnumUnitVariantCreationError>
[src]
context: &Context,
name: impl AsRef<str>,
variant_name: impl AsRef<str>
) -> Result<Value, EnumUnitVariantCreationError>
pub fn new_enum_tuple_variant(
context: &Context,
name: impl AsRef<str>,
variant_name: impl AsRef<str>,
values: impl Into<Box<[Value]>>
) -> Result<Value, EnumTupleVariantCreationError>
[src]
context: &Context,
name: impl AsRef<str>,
variant_name: impl AsRef<str>,
values: impl Into<Box<[Value]>>
) -> Result<Value, EnumTupleVariantCreationError>
pub fn new_enum_struct_variant(
context: &Context,
name: impl AsRef<str>,
variant_name: impl AsRef<str>,
fields: impl Iterator<Item = (impl AsRef<str>, Value)>
) -> Result<Value, EnumStructVariantCreationError>
[src]
context: &Context,
name: impl AsRef<str>,
variant_name: impl AsRef<str>,
fields: impl Iterator<Item = (impl AsRef<str>, Value)>
) -> Result<Value, EnumStructVariantCreationError>
impl Value
[src]
pub fn get_type(&self) -> &TypeHandle
[src]
pub fn has_type(&self, expected_type: &TypeHandle) -> bool
[src]
pub fn as_nothing(&self) -> Option<()>
[src]
pub fn as_bool(&self) -> Option<bool>
[src]
pub fn as_char(&self) -> Option<char>
[src]
pub fn as_integer(&self) -> Option<&BigInt>
[src]
pub fn as_i8(&self) -> Option<i8>
[src]
pub fn as_u8(&self) -> Option<u8>
[src]
pub fn as_i16(&self) -> Option<i16>
[src]
pub fn as_u16(&self) -> Option<u16>
[src]
pub fn as_i32(&self) -> Option<i32>
[src]
pub fn as_u32(&self) -> Option<u32>
[src]
pub fn as_i64(&self) -> Option<i64>
[src]
pub fn as_u64(&self) -> Option<u64>
[src]
pub fn as_i128(&self) -> Option<i128>
[src]
pub fn as_u128(&self) -> Option<u128>
[src]
pub fn as_isize(&self) -> Option<isize>
[src]
pub fn as_usize(&self) -> Option<usize>
[src]
pub fn as_array(&self) -> Option<&[Value]>
[src]
pub fn as_string(&self) -> Option<&str>
[src]
pub fn as_variant_id(&self) -> Option<usize>
[src]
pub fn field(&self, name: &str) -> Option<&Value>
[src]
pub fn tuple_field(&self, index: usize) -> Option<&Value>
[src]
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Value
impl !Send for Value
impl !Sync for Value
impl Unpin for Value
impl !UnwindSafe for Value
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,