#TryFromVal
2 messages · Page 1 of 1 (latest)
Add this attribute onto the struct:
#[soroban_sdk::contracttype]
struct User {
...
2 messages · Page 1 of 1 (latest)
Can anyone point me on how to implement this trait for a structure ?
Lets say I have the following structure and I need to implement this so that I can return it in a function :
struct User {
active: bool,
username: Symbol,
email: Symbol,
sign_in_count: u32,
}
Add this attribute onto the struct:
#[soroban_sdk::contracttype]
struct User {
...