Struct sciter::value::Value [] [src]

pub struct Value { /* fields omitted */ }

sciter::value wrapper.

See the module-level documentation.

Methods

impl Value
[src]

[src]

Return a new Sciter value object (undefined).

[src]

Make an explicit array value with the given length.

[src]

Make an explicit map value.

[src]

Make an explicit json null value.

[src]

Make Sciter symbol value.

[src]

Make Sciter error value.

[src]

Make Sciter color value, in 0xAABBGGRR form.

[src]

Make Sciter duration value, in seconds.

[src]

Make Sciter angle value, in radians.

[src]

Parse a json string into value. Returns the number of chars left unparsed in case of error.

[src]

Parse a json string into value. Returns the number of chars left unparsed in case of error.

[src]

Get the inner type of the value.

[src]

Get the inner type and its subtype (e.g. units) of the value.

[src]

Convert T_OBJECT value type to JSON T_MAP or T_ARRAY types.

Also must be used to pass values between different threads.

[src]

Clear the value. It deallocates all assosiated structures that are not used anywhere else.

[src]

Return the number of items in the T_ARRAY, T_MAP, T_FUNCTION and T_OBJECT value types.

[src]

Append another value to the end of T_ARRAY value.

[src]

Insert or set value at the given index of T_ARRAY, T_MAP, T_FUNCTION and T_OBJECT value.

[src]

Retreive value of sub-element at index.

  • T_ARRAY - nth element of the array;
  • T_MAP - value of the nth key/value pair in the map;
  • T_FUNCTION - value of the nth argument of the function.

[src]

Insert or set value of the sub-element by key.

  • T_MAP - sets named value in the map;
  • T_OBJECT - sets value of property of the object;
  • T_FUNCTION - sets named argument of the function;
  • otherwise it converts self to the map type and adds the key/value to it.

[src]

Retrieve the value of a sub-element by key.

[src]

Retrieve the key of a sub-element by index.

Important traits for KeyIterator<'a>
[src]

An iterator visiting all keys of key/value pairs in the map.

  • T_MAP - keys of key/value pairs in the map;
  • T_OBJECT - names of key/value properties in the object;
  • T_FUNCTION - names of arguments of the function (if any).

Important traits for SeqIterator<'a>
[src]

An iterator visiting all values in arbitrary order.

  • T_ARRAY - elements of the array;
  • T_MAP - values of key/value pairs in the map;
  • T_OBJECT - values of key/value properties in the object;
  • T_FUNCTION - values of arguments of the function.

[src]

An iterator visiting all key-value pairs in arbitrary order.

The iterator element type is (Value, Value). The Value must has a key-value type (map, object, function).

[src]

Value to integer.

[src]

Value to bool.

[src]

Value to float.

[src]

Value to color.

[src]

Value to duration.

[src]

Value to angle.

[src]

Value as string for T_STRING type.

[src]

Value to json string (converted in-place). Subject to change.

[src]

Value as a byte slice for T_BYTES type.

[src]

Value to byte vector for T_BYTES type.

[src]

Function invocation for T_OBJECT with UT_OBJECT_FUNCTION value type.

Calls the tiscript function or method holded at Value with context of this object that will be known as this inside that function (it is optional for global functions).

The name here is an url or a name of the script - used for error reporting in script.

You can use the make_args!(args...) macro which helps you to construct script arguments from Rust types.

[src]

Returns true is self is undefined or has zero elements.

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

Trait Implementations

impl Display for Value
[src]

Print Value as json string

[src]

Formats the value using the given formatter. Read more

impl Debug for Value
[src]

Print Value as json string with explicit type showed.

[src]

Formats the value using the given formatter. Read more

impl Drop for Value
[src]

Destroy pointed value.

[src]

Executes the destructor for this type. Read more

impl Default for Value
[src]

Return default value (undefined).

[src]

Returns the "default value" for a type. Read more

impl Clone for Value
[src]

Copies value.

All allocated objects are reference counted so copying is just a matter of increasing reference counts.

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for Value
[src]

Compare two values.

[src]

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

1.0.0
[src]

This method tests for !=.

impl Index<usize> for Value
[src]

Get item by index for array type.

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl Index<Value> for Value
[src]

Get item by key for map type.

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl Index<&'static str> for Value
[src]

Get item by string key for map type.

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl From<i32> for Value
[src]

Value from integer.

[src]

Performs the conversion.

impl From<f64> for Value
[src]

Value from float.

[src]

Performs the conversion.

impl From<bool> for Value
[src]

Value from bool.

[src]

Performs the conversion.

impl<'a> From<&'a str> for Value
[src]

Value from string.

[src]

Performs the conversion.

impl From<String> for Value
[src]

Value from string.

[src]

Performs the conversion.

impl FromStr for Value
[src]

Value from json string.

The associated error which can be returned from parsing.

[src]

Parses a string s to return a value of this type. Read more

impl<'a> From<&'a [u8]> for Value
[src]

Value from binary array (sequence of bytes).

[src]

Performs the conversion.

impl FromIterator<i32> for Value
[src]

Value from sequence of i32.

[src]

Creates a value from an iterator. Read more

impl FromIterator<f64> for Value
[src]

Value from sequence of f64.

[src]

Creates a value from an iterator. Read more

impl<'a> FromIterator<&'a str> for Value
[src]

Value from sequence of &str.

[src]

Creates a value from an iterator. Read more

impl FromIterator<String> for Value
[src]

Value from sequence of String.

[src]

Creates a value from an iterator. Read more

impl<F> From<F> for Value where
    F: Fn(&[Value]) -> Value
[src]

Value from function.

[src]

Performs the conversion.

impl FromValue for Value
[src]

[src]

Converts value to specified type.

impl<'a> IntoIterator for &'a Value
[src]

Conversion into an Iterator.

Adds the for loop syntax support: for subitem in &value {].

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

[src]

Creates an iterator from a value. Read more

Auto Trait Implementations

impl !Send for Value

impl !Sync for Value