@@ -2,21 +2,21 @@ use super::Pointer;
2
2
use crate :: Token ;
3
3
use core:: ops:: Bound ;
4
4
5
- pub trait SlicePointer < ' p > : private:: Sealed {
5
+ pub trait PointerIndex < ' p > : private:: Sealed {
6
6
type Output : ' p ;
7
7
8
8
fn get ( self , pointer : & ' p Pointer ) -> Option < Self :: Output > ;
9
9
}
10
10
11
- impl < ' p > SlicePointer < ' p > for usize {
11
+ impl < ' p > PointerIndex < ' p > for usize {
12
12
type Output = Token < ' p > ;
13
13
14
14
fn get ( self , pointer : & ' p Pointer ) -> Option < Self :: Output > {
15
15
pointer. tokens ( ) . nth ( self )
16
16
}
17
17
}
18
18
19
- impl < ' p > SlicePointer < ' p > for core:: ops:: Range < usize > {
19
+ impl < ' p > PointerIndex < ' p > for core:: ops:: Range < usize > {
20
20
type Output = & ' p Pointer ;
21
21
22
22
fn get ( self , pointer : & ' p Pointer ) -> Option < Self :: Output > {
@@ -56,7 +56,7 @@ impl<'p> SlicePointer<'p> for core::ops::Range<usize> {
56
56
}
57
57
}
58
58
59
- impl < ' p > SlicePointer < ' p > for core:: ops:: RangeFrom < usize > {
59
+ impl < ' p > PointerIndex < ' p > for core:: ops:: RangeFrom < usize > {
60
60
type Output = & ' p Pointer ;
61
61
62
62
fn get ( self , pointer : & ' p Pointer ) -> Option < Self :: Output > {
@@ -81,7 +81,7 @@ impl<'p> SlicePointer<'p> for core::ops::RangeFrom<usize> {
81
81
}
82
82
}
83
83
84
- impl < ' p > SlicePointer < ' p > for core:: ops:: RangeTo < usize > {
84
+ impl < ' p > PointerIndex < ' p > for core:: ops:: RangeTo < usize > {
85
85
type Output = & ' p Pointer ;
86
86
87
87
fn get ( self , pointer : & ' p Pointer ) -> Option < Self :: Output > {
@@ -114,15 +114,15 @@ impl<'p> SlicePointer<'p> for core::ops::RangeTo<usize> {
114
114
}
115
115
}
116
116
117
- impl < ' p > SlicePointer < ' p > for core:: ops:: RangeFull {
117
+ impl < ' p > PointerIndex < ' p > for core:: ops:: RangeFull {
118
118
type Output = & ' p Pointer ;
119
119
120
120
fn get ( self , pointer : & ' p Pointer ) -> Option < Self :: Output > {
121
121
Some ( pointer)
122
122
}
123
123
}
124
124
125
- impl < ' p > SlicePointer < ' p > for core:: ops:: RangeInclusive < usize > {
125
+ impl < ' p > PointerIndex < ' p > for core:: ops:: RangeInclusive < usize > {
126
126
type Output = & ' p Pointer ;
127
127
128
128
fn get ( self , pointer : & ' p Pointer ) -> Option < Self :: Output > {
@@ -160,7 +160,7 @@ impl<'p> SlicePointer<'p> for core::ops::RangeInclusive<usize> {
160
160
}
161
161
}
162
162
163
- impl < ' p > SlicePointer < ' p > for core:: ops:: RangeToInclusive < usize > {
163
+ impl < ' p > PointerIndex < ' p > for core:: ops:: RangeToInclusive < usize > {
164
164
type Output = & ' p Pointer ;
165
165
166
166
fn get ( self , pointer : & ' p Pointer ) -> Option < Self :: Output > {
@@ -190,7 +190,7 @@ impl<'p> SlicePointer<'p> for core::ops::RangeToInclusive<usize> {
190
190
}
191
191
}
192
192
193
- impl < ' p > SlicePointer < ' p > for ( Bound < usize > , Bound < usize > ) {
193
+ impl < ' p > PointerIndex < ' p > for ( Bound < usize > , Bound < usize > ) {
194
194
type Output = & ' p Pointer ;
195
195
196
196
fn get ( self , pointer : & ' p Pointer ) -> Option < Self :: Output > {
0 commit comments