Enum amf::amf3::Value [] [src]

pub enum Value {
    Undefined,
    Null,
    Boolean(bool),
    Integer(i32),
    Double(f64),
    String(String),
    XmlDocument(String),
    Date {
        unix_time: Duration,
    },
    Array {
        assoc_entries: Vec<Pair<String, Value>>,
        dense_entries: Vec<Value>,
    },
    Object {
        class_name: Option<String>,
        sealed_count: usize,
        entries: Vec<Pair<String, Value>>,
    },
    Xml(String),
    ByteArray(Vec<u8>),
    IntVector {
        is_fixed: bool,
        entries: Vec<i32>,
    },
    UintVector {
        is_fixed: bool,
        entries: Vec<u32>,
    },
    DoubleVector {
        is_fixed: bool,
        entries: Vec<f64>,
    },
    ObjectVector {
        class_name: Option<String>,
        is_fixed: bool,
        entries: Vec<Value>,
    },
    Dictionary {
        is_weak: bool,
        entries: Vec<Pair<Value, Value>>,
    },
}

AMF3 value.

Examples

use amf::amf3::Value;

// Encodes a AMF3's integer
let integer = Value::from(Value::Integer(123));
let mut buf = Vec::new();
integer.write_to(&mut buf).unwrap();

// Decodes above integer
let decoded = Value::read_from(&mut &buf[..]).unwrap();
assert_eq!(integer, decoded);

Variants

Fields

Unix timestamp with milliseconds precision.

Fields

Entries of the associative part of the array.

Entries of the dense part of the array.

Fields

The class name of the object. None means it is an anonymous object.

Sealed member count of the object.

Sealed members are located in front of the entries.

Members of the object.

Fields

If true, this is a fixed-length vector.

The entries of the vector.

Fields

If true, this is a fixed-length vector.

The entries of the vector.

Fields

If true, this is a fixed-length vector.

The entries of the vector.

Fields

The base type name of entries in the vector. None means it is the ANY type.

If true, this is a fixed-length vector.

The entries of the vector.

Fields

If true, the keys of entries are weakly referenced.

The entries of the dictionary.

Methods

impl Value
[src]

Reads an AMF3 encoded Value from reader.

Note that reference objects are copied in the decoding phase for the sake of simplicity of the resulting value representation. And circular reference are unsupported (i.e., those are treated as errors).

Writes the AMF3 encoded bytes of this value to writer.

Trait Implementations

impl Debug for Value
[src]

Formats the value using the given formatter.

impl Clone for Value
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Value
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl PartialOrd for Value
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more