Struct routing::StructuredData [] [src]

pub struct StructuredData { /* fields omitted */ }

Mutable structured data.

These types may be stored unsigned with previous and current owner keys set to the same keys. Updates require a signature to validate.

Methods

impl StructuredData
[src]

Creates a new StructuredData.

Replaces this data item with the given updated version if the update is valid, otherwise returns an error.

To transfer ownership, the current owner signs over the data and increase version by one.

Returns the name.

Returns DataIdentifier for this data element.

Deletes the data by clearing all its fields, if the other data would be a valid successor.

Check whether the data has been deleted

Verifies that other is a valid update for self; returns an error otherwise.

An update is valid if it doesn't change type tag or identifier (these are immutable), increases the version by 1 and is signed by (more than 50% of) the owners.

Adds a signature with the given keys.1 to the signatures and returns the number of signatures that are still required. If more than 50% of the owners have signed, 0 is returned and validation is complete.

Overwrite any existing signatures with the new signatures provided.

Get the type_tag

Get the serialised data

Get the version

Get the current owner keys

Get previous owner signatures

Return true if the size is valid

Trait Implementations

impl Hash for StructuredData
[src]

Feeds this value into the state given, updating the hasher as necessary.

Feeds a slice of this type into the state provided.

impl Eq for StructuredData
[src]

impl PartialEq for StructuredData
[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 StructuredData
[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

impl Ord for StructuredData
[src]

This method returns an Ordering between self and other. Read more

impl Clone for StructuredData
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Decodable for StructuredData
[src]

Deserialize a value using a Decoder.

impl Encodable for StructuredData
[src]

Serialize a value using an Encoder.

impl Debug for StructuredData
[src]

Formats the value using the given formatter.