Searched refs:span_of (Results 1 – 4 of 4) sorted by relevance
/third_party/rust/crates/memoffset/src/ |
D | span_of.rs | 95 macro_rules! span_of { macro 140 span_of!(@helper $root, $parent, $(#$begin)* #$tt [] $($rest)*) 143 span_of!(@helper $root, $parent, #$tt [] $($rest)*) 151 let (begin, end) = span_of!(@helper root, $sty, [] $($exp)*); 169 assert_eq!(span_of!(Foo, a), 0..4); in span_simple() 170 assert_eq!(span_of!(Foo, b), 4..6); in span_simple() 171 assert_eq!(span_of!(Foo, c), 8..8 + 8); in span_simple() 184 assert_eq!(span_of!(Foo, a), 0..4); in span_simple_packed() 185 assert_eq!(span_of!(Foo, b), 4..6); in span_simple_packed() 186 assert_eq!(span_of!(Foo, c), 6..6 + 8); in span_simple_packed() [all …]
|
D | lib.rs | 93 mod span_of; module
|
/third_party/rust/crates/memoffset/ |
D | README.md | 11 * `span_of!` for obtaining the range that a field, or fields, span. 27 use memoffset::{offset_of, span_of}; 41 assert_eq!(span_of!(Foo, a), 0..4); 42 assert_eq!(span_of!(Foo, a .. c), 0..8); 43 assert_eq!(span_of!(Foo, a ..= c), 0..13); 44 assert_eq!(span_of!(Foo, ..= d), 0..17); 45 assert_eq!(span_of!(Foo, b ..), 4..17);
|
/third_party/rust/crates/rustix/src/ |
D | io_uring.rs | 1003 use memoffset::{offset_of, span_of}; in io_uring_layouts() 1034 assert_eq!(span_of!($struct, $field), span_of!(sys::$struct, $field)); in io_uring_layouts() 1043 assert_eq!(span_of!($struct, $to), span_of!(sys::$struct, $from)); in io_uring_layouts()
|