[−][src]Enum llhd::value::Value
A value.
Variants
Time(TimeValue)
Int(IntValue)
Array(ArrayValue)
Struct(StructValue)
Methods
impl Value
[src]
pub fn zero(ty: &Type) -> Value
[src]
Create the zero value for a type.
pub fn get_time(&self) -> Option<&TimeValue>
[src]
If this value is a time, access it.
pub fn unwrap_time(&self) -> &TimeValue
[src]
Unwrap this value as a time, or panic.
pub fn get_int(&self) -> Option<&IntValue>
[src]
If this value is an integer, access it.
pub fn unwrap_int(&self) -> &IntValue
[src]
Unwrap this value as an integer, or panic.
pub fn get_array(&self) -> Option<&ArrayValue>
[src]
If this value is an array, access it.
pub fn unwrap_array(&self) -> &ArrayValue
[src]
Unwrap this value as an array, or panic.
pub fn get_struct(&self) -> Option<&StructValue>
[src]
If this value is a struct, access it.
pub fn unwrap_struct(&self) -> &StructValue
[src]
Unwrap this value as a struct, or panic.
pub fn ty(&self) -> Type
[src]
Get the type of the value.
pub fn is_zero(&self) -> bool
[src]
Check if the value is zero.
pub fn is_one(&self) -> bool
[src]
Check if the value is one.
Trait Implementations
impl From<TimeValue> for Value
[src]
impl From<IntValue> for Value
[src]
impl From<ArrayValue> for Value
[src]
fn from(v: ArrayValue) -> Value
[src]
impl From<StructValue> for Value
[src]
fn from(v: StructValue) -> Value
[src]
impl Clone for Value
[src]
impl Eq for Value
[src]
impl PartialEq<Value> for Value
[src]
impl Display for Value
[src]
impl Debug for Value
[src]
impl StructuralPartialEq for Value
[src]
impl StructuralEq for Value
[src]
impl Serialize for Value
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Value
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
impl RefUnwindSafe for Value
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,