Enum jaded::Value [−][src]
pub enum Value { Null, Object(ObjectData), JavaString(String), Enum(String, String), Primitive(PrimitiveType), Array(Vec<Value>), PrimitiveArray(Vec<PrimitiveType>), Class(String), Loop(i32), }
The possible values written by Java’s serialization
Variants
A Java null reference
Object(ObjectData)
A ‘normal’ Java Object
JavaString(String)
A String. These are treated differently to normal objects.
An instance of an Enum. Only the class name and variant name are available
Primitive(PrimitiveType)
A Java primitive - int, long, double etc
An array of Java Objects
PrimitiveArray(Vec<PrimitiveType>)
An array of Java Primitives
Class(String)
A class object eg java.lang.String. Only the name is recorded
Loop(i32)
A recursive reference to something containing this value The contained value is the number of steps out to read the target
Implementations
impl Value
[src]
impl Value
[src]pub fn primitive(&self) -> &PrimitiveType
[src]
pub fn array(&self) -> &[Value]
[src]
Get the array of values this Value represents
Panics
If this value is not an array. Note, this method expects an array of objects and a primitive array will also panic. See primitive_array()
pub fn primitive_array(&self) -> &[PrimitiveType]
[src]
pub fn is_null(&self) -> bool
[src]
Check if this value is a null reference
pub fn string(&self) -> &str
[src]
Get the string value the value represents. This is only used to get the string from a deserialised Java String and will not convert other types into strings.
Panics
If this value is not a JavaString
pub fn object_data(&self) -> &ObjectData
[src]
Get the object data of the object this value represents.
Panics
If this value is not an instance of an object
pub fn enum_data(&self) -> (&str, &str)
[src]
Get the class name and variant name of the enum this value represents
Panics
If this value is not an enum
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Value
impl RefUnwindSafe for Value
impl UnwindSafe for Value
impl UnwindSafe for Value