Add two different HostHook impls
Put together this PR based on some ongoing discussion around the host system returned by Temporal::now().
I think this may be the right direction for this API in temporal_rs. But thought I'd at least put it together for further discussion.
I think this is a good idea
I mentioned this on Matrix, but just so that it's visible here.
Thoughts on the actual method names?
For instance, in theory this could also be changed to.
struct Temporal;
impl Temporal {
fn now_with_system_fallback() -> Now<LocalHostSystem> {
todo!()
}
fn now_with_utc_fallback() -> Now<UtcHostSystem> {
todo!()
}
}
This isn't fallback, is it? It's the system Now or the UTC Now?
Hmmmmm, that's true it's more of a host default value.
It's more so that if no TimeZone is provided, then we default / "fall back" to the host time zone. I'm not entirely convinced that that is a fall back, per se. But I think it conveys the behavior of how the Now will do in an explicit manner.
But calling it a fallback, then makes the time_zone method on Now incredibly strange, so we can go with the current names.