We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
offset
1 parent 882c25f commit e2f99b9Copy full SHA for e2f99b9
src/libstd/ptr.rs
@@ -213,7 +213,8 @@ pub trait RawPtr<T> {
213
/// be pointing to invalid memory.
214
unsafe fn to_option(&self) -> Option<&T>;
215
/// Calculates the offset from a pointer. The offset *must* be in-bounds of
216
- /// the object, or one-byte-past-the-end.
+ /// the object, or one-byte-past-the-end. `count` is in units of T; e.g. a
217
+ /// `count` of 3 represents a pointer offset of `3 * sizeof::<T>()` bytes.
218
unsafe fn offset(self, count: int) -> Self;
219
}
220
0 commit comments