Function ::std::is_readable

Overview
fn is_readable(value) -> bool

Test if the given value is readable.

A value is writable if can be acquired for shared access, such as producing an immutable reference.

A value that is moved is no longer considered readable.

Examples

let value = Some(42);
assert!(is_readable(value));
let value2 = value.map(|v| v + 1);
assert!(!is_readable(value));
assert_eq!(value2, Some(43));