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]
Provided methods
fn field_types(&self) -> Vec<FieldType>
[src]
fn owned_right_types(&self) -> BTreeSet<OwnedRightType>
[src]
fn owned_rights_by_type(&self, t: OwnedRightType) -> Option<&Assignments>
[src]
fn all_seal_definitions(&self) -> Vec<Confidential>
[src]
fn known_seal_definitions(&self) -> Vec<Revealed>
[src]
fn known_seal_definitions_by_type(
&self,
assignment_type: OwnedRightType
) -> Vec<Revealed>
[src]
&self,
assignment_type: OwnedRightType
) -> Vec<Revealed>
Implementors
impl Node for Extension
[src]
impl Node for Extension
[src]fn node_type(&self) -> NodeType
[src]
fn node_id(&self) -> NodeId
[src]
fn contract_id(&self) -> Option<ContractId>
[src]
fn transition_type(&self) -> Option<TransitionType>
[src]
fn extension_type(&self) -> Option<usize>
[src]
fn parent_owned_rights(&self) -> &ParentOwnedRights
[src]
fn parent_public_rights(&self) -> &ParentPublicRights
[src]
fn metadata(&self) -> &Metadata
[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]
impl Node for Genesis
[src]
impl Node for Genesis
[src]fn node_type(&self) -> NodeType
[src]
fn node_id(&self) -> NodeId
[src]
fn contract_id(&self) -> Option<ContractId>
[src]
fn transition_type(&self) -> Option<TransitionType>
[src]
fn extension_type(&self) -> Option<usize>
[src]
fn parent_owned_rights(&self) -> &ParentOwnedRights
[src]
fn parent_public_rights(&self) -> &ParentPublicRights
[src]
fn metadata(&self) -> &Metadata
[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]
impl Node for Transition
[src]
impl Node for Transition
[src]