Trait rgb::contract::nodes::Node[][src]

pub trait Node: AsAny {
Show methods fn node_type(&self) -> NodeType;
fn node_id(&self) -> NodeId;
fn contract_id(&self) -> Option<ContractId>;
fn transition_type(&self) -> Option<TransitionType>;
fn extension_type(&self) -> Option<ExtensionType>;
fn metadata(&self) -> &Metadata;
fn parent_owned_rights(&self) -> &ParentOwnedRights;
fn parent_public_rights(&self) -> &ParentPublicRights;
fn owned_rights(&self) -> &OwnedRights;
fn owned_rights_mut(&mut self) -> &mut OwnedRights;
fn public_rights(&self) -> &PublicRights;
fn public_rights_mut(&mut self) -> &mut PublicRights;
fn script(&self) -> &SimplicityScript; fn field_types(&self) -> Vec<FieldType> { ... }
fn owned_right_types(&self) -> BTreeSet<OwnedRightType> { ... }
fn owned_rights_by_type(&self, t: OwnedRightType) -> Option<&Assignments> { ... }
fn all_seal_definitions(&self) -> Vec<Confidential> { ... }
fn known_seal_definitions(&self) -> Vec<Revealed> { ... }
fn known_seal_definitions_by_type(
        &self,
        assignment_type: OwnedRightType
    ) -> Vec<Revealed> { ... }
}
Expand description

Trait which is implemented by all node types (see NodeType)

Required methods

fn node_type(&self) -> NodeType[src]

Expand description

Returns type of the node (see NodeType). Unfortunately, this can’t be just a const, since it will break our ability to convert concrete Node types into &dyn Node (entities implementing traits with const definitions can’t be made into objects)

fn node_id(&self) -> NodeId[src]

Expand description

Returns NodeId, which is a hash of this node commitment serialization

fn contract_id(&self) -> Option<ContractId>[src]

Expand description

Returns Option::Some(ContractId), which is a hash of genesis.

  • For genesis node, this hash is byte-equal to NodeId (however displayed in a reverse manner, to introduce semantical distinction)
  • For extension node function returns id of the genesis, to which this node commits to
  • For state transition function returns Option::None, since they do not keep this information; it must be deduced through state transition graph

fn transition_type(&self) -> Option<TransitionType>[src]

Expand description

Returns Option::Some(TransitionType) for transitions or Option::None for genesis and extension node types

fn extension_type(&self) -> Option<ExtensionType>[src]

Expand description

Returns Option::Some(ExtensionType) for extension nodes or Option::None for genesis and trate transitions

fn metadata(&self) -> &Metadata[src]

fn parent_owned_rights(&self) -> &ParentOwnedRights[src]

fn parent_public_rights(&self) -> &ParentPublicRights[src]

fn owned_rights(&self) -> &OwnedRights[src]

fn owned_rights_mut(&mut self) -> &mut OwnedRights[src]

fn public_rights(&self) -> &PublicRights[src]

fn public_rights_mut(&mut self) -> &mut PublicRights[src]

fn script(&self) -> &SimplicityScript[src]

Loading content...

Provided methods

Loading content...

Implementors

impl Node for Extension[src]

impl Node for Genesis[src]

impl Node for Transition[src]

Loading content...