Lines Matching full:me
134 unsafe fn view_links(me: *const Self) -> *mut $crate::list::ListLinks<$num> {
135 // SAFETY: The caller guarantees that `me` points at a valid value of type `Self`.
137 <Self as $crate::list::HasListLinks<$num>>::raw_get_list_links(me.cast_mut())
142 // * `me` originates from the most recent call to `prepare_to_insert`, which just added
144 // `offset` from `me` so it returns the pointer originally passed to
150 unsafe fn view_value(me: *mut $crate::list::ListLinks<$num>) -> *const Self {
152 // SAFETY: `me` originates from the most recent call to `prepare_to_insert`, so it
154 // subtracting `offset` from `me` is still in-bounds of the allocation.
155 unsafe { (me as *const u8).sub(offset) as *const Self }
166 unsafe fn prepare_to_insert(me: *const Self) -> *mut $crate::list::ListLinks<$num> {
167 // SAFETY: The caller promises that `me` points at a valid value.
168 unsafe { <Self as $crate::list::ListItem<$num>>::view_links(me) }
172 // * `me` originates from the most recent call to `prepare_to_insert`, which just added
174 // `offset` from `me` so it returns the pointer originally passed to
176 unsafe fn post_remove(me: *mut $crate::list::ListLinks<$num>) -> *const Self {
178 // SAFETY: `me` originates from the most recent call to `prepare_to_insert`, so it
180 // subtracting `offset` from `me` is still in-bounds of the allocation.
181 unsafe { (me as *const u8).sub(offset) as *const Self }
201 unsafe fn prepare_to_insert(me: *const Self) -> *mut $crate::list::ListLinks<$num> {
202 // SAFETY: The caller promises that `me` points at a valid value of type `Self`.
203 let links_field = unsafe { <Self as $crate::list::ListItem<$num>>::view_links(me) };
219 unsafe { ::core::ptr::write(cell_inner, me) };
229 unsafe fn view_links(me: *const Self) -> *mut $crate::list::ListLinks<$num> {
230 // SAFETY: The caller promises that `me` points at a valid value of type `Self`.
231 unsafe { <Self as HasListLinks<$num>>::raw_get_list_links(me.cast_mut()) }
265 unsafe fn post_remove(me: *mut $crate::list::ListLinks<$num>) -> *const Self {
269 unsafe { <Self as $crate::list::ListItem<$num>>::view_value(me) }