Skip to main content

DataContractV1Getters

Trait DataContractV1Getters 

Source
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§

Source

fn groups(&self) -> &BTreeMap<GroupContractPosition, Group>

Returns a reference to the groups map.

Source

fn groups_mut(&mut self) -> Option<&mut BTreeMap<GroupContractPosition, Group>>

Returns a mutable reference to the groups map.

Source

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.

Source

fn tokens(&self) -> &BTreeMap<TokenContractPosition, TokenConfiguration>

Returns a reference to the tokens map.

Source

fn tokens_mut( &mut self, ) -> Option<&mut BTreeMap<TokenContractPosition, TokenConfiguration>>

Returns a mutable reference to the tokens map.

Source

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.

Source

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.

Source

fn token_id(&self, position: TokenContractPosition) -> Option<Identifier>

Returns the token id at a certain position.

Source

fn created_at(&self) -> Option<TimestampMillis>

Returns the timestamp in milliseconds when the contract was created.

Source

fn updated_at(&self) -> Option<TimestampMillis>

Returns the timestamp in milliseconds when the contract was last updated.

Source

fn created_at_block_height(&self) -> Option<BlockHeight>

Returns the block height at which the contract was created.

Source

fn updated_at_block_height(&self) -> Option<BlockHeight>

Returns the block height at which the contract was last updated.

Source

fn created_at_epoch(&self) -> Option<EpochIndex>

Returns the epoch at which the contract was created.

Source

fn updated_at_epoch(&self) -> Option<EpochIndex>

Returns the epoch at which the contract was last updated.

Source

fn keywords(&self) -> &Vec<String>

Returns the keywords for the contract.

Source

fn keywords_mut(&mut self) -> Option<&mut Vec<String>>

Returns a mutable reference to the keywords for the contract.

Source

fn description(&self) -> Option<&String>

Returns the description for the contract.

Source

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§

Source§

impl DataContractV1Getters for DataContract

Implementing DataContractV1Getters for DataContract

Source§

impl DataContractV1Getters for DataContractV1