pub fn kp_arc<'a, T>() -> Kp<Arc<T>, T, &'a Arc<T>, &'a T, &'a mut Arc<T>, &'a mut T, for<'b> fn(&'b Arc<T>) -> Option<&'b T>, for<'b> fn(&'b mut Arc<T>) -> Option<&'b mut T>>Expand description
Create a keypath for unwrapping Arc
ยงExample
use std::sync::Arc;
use rust_key_paths::kp_arc;
let arc = Arc::new("value".to_string());
let kp = kp_arc();
assert_eq!(kp.get(&arc), Some(&"value".to_string()));