|
@@ -37,6 +37,12 @@ impl<T: Send + Sync + 'static> Clone for State<'_, T> {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+impl<'r, T: Send + Sync + std::fmt::Debug> std::fmt::Debug for State<'r, T> {
|
|
|
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
|
+ f.debug_tuple("State").field(&self.0).finish()
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
impl<'r, 'de: 'r, T: Send + Sync + 'static, R: Runtime> CommandArg<'de, R> for State<'r, T> {
|
|
|
/// Grabs the [`State`] from the [`CommandItem`]. This will never fail.
|
|
|
fn from_command(command: CommandItem<'de, R>) -> Result<Self, InvokeError> {
|