pub trait DataContractV1Getters: DataContractV0Getters {
Show 18 methods
// Required methods
fn groups(&self) -> &BTreeMap<GroupContractPosition, Group>;
fn groups_mut(
&mut self,
) -> Option<&mut BTreeMap<GroupContractPosition, Group>>;
fn expected_group(
&self,
position: GroupContractPosition,
) -> Result<&Group, ProtocolError>;
fn tokens(&self) -> &BTreeMap<TokenContractPosition, TokenConfiguration>;
fn tokens_mut(
&mut self,
) -> Option<&mut BTreeMap<TokenContractPosition, TokenConfiguration>>;
fn expected_token_configuration(
&self,
position: TokenContractPosition,
) -> Result<&TokenConfiguration, ProtocolError>;
fn token_configuration_mut(
&mut self,
position: TokenContractPosition,
) -> Option<&mut TokenConfiguration>;
fn token_id(&self, position: TokenContractPosition) -> Option<Identifier>;
fn created_at(&self) -> Option<TimestampMillis>;
fn updated_at(&self) -> Option<TimestampMillis>;
fn created_at_block_height(&self) -> Option<BlockHeight>;
fn updated_at_block_height(&self) -> Option<BlockHeight>;
fn created_at_epoch(&self) -> Option<EpochIndex>;
fn updated_at_epoch(&self) -> Option<EpochIndex>;
fn keywords(&self) -> &Vec<String>;
fn keywords_mut(&mut self) -> Option<&mut Vec<String>>;
fn description(&self) -> Option<&String>;
fn description_mut(&mut self) -> Option<&mut String>;
}Required Methods§
Sourcefn groups(&self) -> &BTreeMap<GroupContractPosition, Group>
fn groups(&self) -> &BTreeMap<GroupContractPosition, Group>
Returns a reference to the groups map.
Sourcefn groups_mut(&mut self) -> Option<&mut BTreeMap<GroupContractPosition, Group>>
fn groups_mut(&mut self) -> Option<&mut BTreeMap<GroupContractPosition, Group>>
Returns a mutable reference to the groups map.
Sourcefn expected_group(
&self,
position: GroupContractPosition,
) -> Result<&Group, ProtocolError>
fn expected_group( &self, position: GroupContractPosition, ) -> Result<&Group, ProtocolError>
Returns a reference to a group or an error. Returns an error for V0 since it doesn’t have groups.
Sourcefn tokens(&self) -> &BTreeMap<TokenContractPosition, TokenConfiguration>
fn tokens(&self) -> &BTreeMap<TokenContractPosition, TokenConfiguration>
Returns a reference to the tokens map.
Sourcefn tokens_mut(
&mut self,
) -> Option<&mut BTreeMap<TokenContractPosition, TokenConfiguration>>
fn tokens_mut( &mut self, ) -> Option<&mut BTreeMap<TokenContractPosition, TokenConfiguration>>
Returns a mutable reference to the tokens map.
Sourcefn expected_token_configuration(
&self,
position: TokenContractPosition,
) -> Result<&TokenConfiguration, ProtocolError>
fn expected_token_configuration( &self, position: TokenContractPosition, ) -> Result<&TokenConfiguration, ProtocolError>
Returns a mutable reference to a token configuration or an error. Returns an error for V0 since it doesn’t have tokens.
Sourcefn token_configuration_mut(
&mut self,
position: TokenContractPosition,
) -> Option<&mut TokenConfiguration>
fn token_configuration_mut( &mut self, position: TokenContractPosition, ) -> Option<&mut TokenConfiguration>
Returns a mutable reference to a token configuration.
Returns None for V0 since it doesn’t have tokens.
Sourcefn token_id(&self, position: TokenContractPosition) -> Option<Identifier>
fn token_id(&self, position: TokenContractPosition) -> Option<Identifier>
Returns the token id at a certain position.
Sourcefn created_at(&self) -> Option<TimestampMillis>
fn created_at(&self) -> Option<TimestampMillis>
Returns the timestamp in milliseconds when the contract was created.
Sourcefn updated_at(&self) -> Option<TimestampMillis>
fn updated_at(&self) -> Option<TimestampMillis>
Returns the timestamp in milliseconds when the contract was last updated.
Sourcefn created_at_block_height(&self) -> Option<BlockHeight>
fn created_at_block_height(&self) -> Option<BlockHeight>
Returns the block height at which the contract was created.
Sourcefn updated_at_block_height(&self) -> Option<BlockHeight>
fn updated_at_block_height(&self) -> Option<BlockHeight>
Returns the block height at which the contract was last updated.
Sourcefn created_at_epoch(&self) -> Option<EpochIndex>
fn created_at_epoch(&self) -> Option<EpochIndex>
Returns the epoch at which the contract was created.
Sourcefn updated_at_epoch(&self) -> Option<EpochIndex>
fn updated_at_epoch(&self) -> Option<EpochIndex>
Returns the epoch at which the contract was last updated.
Sourcefn keywords_mut(&mut self) -> Option<&mut Vec<String>>
fn keywords_mut(&mut self) -> Option<&mut Vec<String>>
Returns a mutable reference to the keywords for the contract.
Sourcefn description(&self) -> Option<&String>
fn description(&self) -> Option<&String>
Returns the description for the contract.
Sourcefn description_mut(&mut self) -> Option<&mut String>
fn description_mut(&mut self) -> Option<&mut String>
Returns a mutable reference to the description for the contract.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl DataContractV1Getters for DataContract
Implementing DataContractV1Getters for DataContract