gear-tech / sails

Framework for ultimate experience of writing programs powered by Gear protocol
Apache License 2.0
17 stars 4 forks source link

feat(sails): Allows to return value with reply from a service #522

Closed vobradovich closed 2 weeks ago

vobradovich commented 3 weeks ago

Resolves #475 .

Introduces special case for handling a CommandReply<T> as a result type and extracting a value

vobradovich commented 2 weeks ago

Awaiting review. Don't merge!

breathx commented 2 weeks ago

Current impl doesn't prevent returning CommandResult from queries

pub fn query(&self) -> CommandResult<u128> {
    (123, 100_500).into()
}

Is it necessary to forbid?