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

pub trait Node: AsAny {
    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>

Notable traits for Vec<u8>

impl Write for Vec<u8>
{ ... }
fn owned_right_types(&self) -> BTreeSet<OwnedRightType> { ... }
fn owned_rights_by_type(&self, t: OwnedRightType) -> Option<&Assignments> { ... }
fn all_seal_definitions(&self) -> Vec<Confidential>

Notable traits for Vec<u8>

impl Write for Vec<u8>
{ ... }
fn known_seal_definitions(&self) -> Vec<Revealed>

Notable traits for Vec<u8>

impl Write for Vec<u8>
{ ... }
fn known_seal_definitions_by_type(
        &self,
        assignment_type: OwnedRightType
    ) -> Vec<Revealed>

Notable traits for Vec<u8>

impl Write for Vec<u8>
{ ... } }

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

Required methods

fn node_type(&self) -> NodeType

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

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

fn contract_id(&self) -> Option<ContractId>

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>

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

fn extension_type(&self) -> Option<ExtensionType>

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

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

Loading content...

Provided methods

fn field_types(&self) -> Vec<FieldType>

Notable traits for Vec<u8>

impl Write for Vec<u8>

fn owned_right_types(&self) -> BTreeSet<OwnedRightType>

fn owned_rights_by_type(&self, t: OwnedRightType) -> Option<&Assignments>

fn all_seal_definitions(&self) -> Vec<Confidential>

Notable traits for Vec<u8>

impl Write for Vec<u8>

fn known_seal_definitions(&self) -> Vec<Revealed>

Notable traits for Vec<u8>

impl Write for Vec<u8>

fn known_seal_definitions_by_type(
    &self,
    assignment_type: OwnedRightType
) -> Vec<Revealed>

Notable traits for Vec<u8>

impl Write for Vec<u8>

Loading content...

Implementors

impl Node for Extension[src]

impl Node for Genesis[src]

impl Node for Transition[src]

Loading content...