pub trait OptionTypeExt: Sized {
// Required methods
fn xch(amount: u64) -> Result<Self>;
fn cat(asset_id: Bytes32, amount: u64) -> Result<Self>;
fn revocable_cat(
asset_id: Bytes32,
hidden_puzzle_hash: Bytes32,
amount: u64,
) -> Result<Self>;
fn nft(
launcher_id: Bytes32,
settlement_puzzle_hash: Bytes32,
amount: u64,
) -> Result<Self>;
fn to_xch(&self) -> Result<Option<OptionTypeXch>>;
fn to_cat(&self) -> Result<Option<OptionTypeCat>>;
fn to_revocable_cat(&self) -> Result<Option<OptionTypeRevocableCat>>;
fn to_nft(&self) -> Result<Option<OptionTypeNft>>;
}Required Methods§
fn xch(amount: u64) -> Result<Self>
fn cat(asset_id: Bytes32, amount: u64) -> Result<Self>
fn revocable_cat( asset_id: Bytes32, hidden_puzzle_hash: Bytes32, amount: u64, ) -> Result<Self>
fn nft( launcher_id: Bytes32, settlement_puzzle_hash: Bytes32, amount: u64, ) -> Result<Self>
fn to_xch(&self) -> Result<Option<OptionTypeXch>>
fn to_cat(&self) -> Result<Option<OptionTypeCat>>
fn to_revocable_cat(&self) -> Result<Option<OptionTypeRevocableCat>>
fn to_nft(&self) -> Result<Option<OptionTypeNft>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.