substrate-stellar-sdk 0.3.0

A Substrate compatible SDK for Stellar
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::lib::String;

/// A trait used to convert any Stellar specific type `T` as a String
/// This also immediately converts the standard Error to a user-defined Error `E`
/// Helpful for functions that will accept:
///  * the Stellar type itself;
///  * encoded &str version of the Stellar type;
///  * a `Vec<u8>` version of th Stellar type
pub trait StellarTypeToString<T, E: From<sp_std::str::Utf8Error>> {
    fn as_encoded_string(&self) -> Result<String, E>;
}