1//! Contains the AsBool trait used for converting a reference of self into a bool. 2 3pub trait AsBool { 4 fn as_bool(&self) -> bool; 5} 6 7impl<T: AsBool> AsBool for &T { 8 fn as_bool(&self) -> bool { 9 (*self).as_bool() 10 } 11}