Lines Matching defs:Key
8 /// A type that can be converted into a [`Key`](struct.Key.html).
11 fn to_key(&self) -> Key;
18 fn to_key(&self) -> Key {
23 impl<'k> ToKey for Key<'k> {
24 fn to_key(&self) -> Key {
25 Key { key: self.key }
30 fn to_key(&self) -> Key {
31 Key::from_str(self)
37 pub struct Key<'k> {
41 impl<'k> Key<'k> {
44 Key { key: key }
53 impl<'k> fmt::Debug for Key<'k> {
59 impl<'k> fmt::Display for Key<'k> {
65 impl<'k> hash::Hash for Key<'k> {
74 impl<'k, 'ko> PartialEq<Key<'ko>> for Key<'k> {
75 fn eq(&self, other: &Key<'ko>) -> bool {
80 impl<'k> Eq for Key<'k> {}
82 impl<'k, 'ko> PartialOrd<Key<'ko>> for Key<'k> {
83 fn partial_cmp(&self, other: &Key<'ko>) -> Option<cmp::Ordering> {
88 impl<'k> Ord for Key<'k> {
94 impl<'k> AsRef<str> for Key<'k> {
100 impl<'k> Borrow<str> for Key<'k> {
106 impl<'k> From<&'k str> for Key<'k> {
108 Key::from_str(s)
119 fn to_key(&self) -> Key {
120 Key::from_str(self)
125 fn to_key(&self) -> Key {
126 Key::from_str(self)
139 impl<'a> Value for Key<'a> {
154 impl<'a> Serialize for Key<'a> {
170 assert_eq!("a key", Key::from_str("a key").as_str());