@@ -405,14 +405,15 @@ impl Context {
405405 ///
406406 /// # Arguments
407407 ///
408- /// - `impl AsRef<str>` - The key for the data.
408+ /// - `AsRef<str>` - The key for the data.
409409 ///
410410 /// # Returns
411411 ///
412412 /// - `Option<V>` - The data value if found and successfully downcasted, otherwise `None`.
413- pub async fn try_get_data < V > ( & self , key : impl AsRef < str > ) -> Option < V >
413+ pub async fn try_get_data < V , K > ( & self , key : K ) -> Option < V >
414414 where
415415 V : Any + Send + Sync + Clone ,
416+ K : AsRef < str > ,
416417 {
417418 self . read ( )
418419 . await
@@ -426,7 +427,7 @@ impl Context {
426427 ///
427428 /// # Arguments
428429 ///
429- /// - `impl AsRef<str>` - The key for the data.
430+ /// - `AsRef<str>` - The key for the data.
430431 ///
431432 /// # Returns
432433 ///
@@ -435,9 +436,10 @@ impl Context {
435436 /// # Panics
436437 ///
437438 /// Panics if the data is not found or cannot be downcasted.
438- pub async fn get_data_value < V > ( & self , key : impl AsRef < str > ) -> V
439+ pub async fn get_data_value < V , K > ( & self , key : K ) -> V
439440 where
440441 V : Any + Send + Sync + Clone ,
442+ K : AsRef < str > ,
441443 {
442444 self . try_get_data ( key) . await . unwrap ( )
443445 }
@@ -446,7 +448,7 @@ impl Context {
446448 ///
447449 /// # Arguments
448450 ///
449- /// - `impl AsRef<str>` - The key of the data to remove.
451+ /// - `AsRef<str>` - The key of the data to remove.
450452 ///
451453 /// # Returns
452454 ///
0 commit comments