pub trait SnowflakeGeneratorAsyncSmolExt<ID, T>{
// Required method
fn try_next_id_async(&self) -> impl Future<Output = Result<ID>>;
}Expand description
Extension trait for asynchronously generating Snowflake IDs using the
smol async runtime.
This trait provides a convenience method for using a SleepProvider
backed by the smol runtime, allowing you to call .try_next_id_async()
without needing to specify the sleep strategy manually.
Required Methods§
Sourcefn try_next_id_async(&self) -> impl Future<Output = Result<ID>>
fn try_next_id_async(&self) -> impl Future<Output = Result<ID>>
Returns a future that resolves to the next available Snowflake ID using
the SmolSleep provider.
Internally delegates to
SnowflakeGeneratorAsyncExt::try_next_id_async method with
SmolSleep as the sleep strategy.
§Errors
This future may return an error if the underlying generator does.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.