Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #[derive(Debug)]
- struct BlockReference {
- multi_hash: String,
- }
- impl BlockReference {
- fn from_str(s: &str) -> BlockReference {
- BlockReference { multi_hash: s.to_string() }
- }
- }
- fn main() {
- let block_reference: BlockReference = "QmWATWQ7fVPP2EFGu71UkfnqhYXDYH566qy47CnJDgvs8u".parse();
- println!("{:?}", block_reference);
- }
Add Comment
Please, Sign In to add comment