Guest User

Untitled

a guest
Jun 25th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #[derive(Debug)]
  2. struct BlockReference {
  3. multi_hash: String,
  4. }
  5.  
  6. impl BlockReference {
  7. fn from_str(s: &str) -> BlockReference {
  8. BlockReference { multi_hash: s.to_string() }
  9. }
  10. }
  11.  
  12. fn main() {
  13. let block_reference: BlockReference = "QmWATWQ7fVPP2EFGu71UkfnqhYXDYH566qy47CnJDgvs8u".parse();
  14. println!("{:?}", block_reference);
  15. }
Add Comment
Please, Sign In to add comment