diff --git a/soroban-sdk/src/token/muxed_ext.rs b/soroban-sdk/src/token/muxed_ext.rs index bf31247c6..305ccbc30 100644 --- a/soroban-sdk/src/token/muxed_ext.rs +++ b/soroban-sdk/src/token/muxed_ext.rs @@ -63,6 +63,30 @@ pub enum Mux { Hash(BytesN<32>), } +impl From<()> for Mux { + fn from(_: ()) -> Self { + Self::None + } +} + +impl From for Mux { + fn from(v: u64) -> Self { + Self::Id(v) + } +} + +impl From for Mux { + fn from(v: String) -> Self { + Self::Text(v) + } +} + +impl From> for Mux { + fn from(v: BytesN<32>) -> Self { + Self::Hash(v) + } +} + impl TryFromVal for Mux { type Error = ConversionError;