lholden / job_scheduler

A simple cron-like job scheduling library for Rust.
Apache License 2.0
196 stars 34 forks source link

Changed Uuid to an opaque JobHandle. #18

Closed apollo13 closed 1 year ago

apollo13 commented 4 years ago

Since Uuid was part of the public API it should have use pub use uuid::Uuid so consumers of the API can also use it. Since there does not seem to be a requirement to actually know the Uuid I changed it to an opaque JobHandle that is part of this crate. If access to a unique identifier is needed (ie to store the uuid in the database) one could implement a ToString trait. What was the original intention of this?

lholden commented 4 years ago

There was no reason specifically for it to not be opaque. Sorry for the late reply.

I've been wanting to do a cleanup pass of the crate and make the interface nicer and modernize a few things. This PR or something like it will likely end up in the release at that point. For now, I think it may just be better if the Uuid type were made pub.