riker-rs / riker

Easily build efficient, highly concurrent and resilient applications. An Actor Framework for Rust.
https://riker.rs
MIT License
1.02k stars 69 forks source link

Wrap or re-export Uuid. #117

Open Superhepper opened 4 years ago

Superhepper commented 4 years ago

Currently the schedule functions returns an Uuid when created. And as long as this is only stored locally i.e:

let id = ctx.schedule(delay,
            interv,
            actor,
            None,
            "a scheduled msg".into());

ctx.cancel_schedule(id);

Everything is fine.

But if you wish to store that variable in a struct then a problem arises. Because that type is not available from riker. So what I would wish for is that either riker re-exports the Uuid type or makes a wrapper around it and make that type available ofr library users.

leenozara commented 4 years ago

+1 Agreed. This should be wrapped as something like a ScheduleId. Thank you for the suggestion.