Lines Matching refs:field

155                     .field(&format_args!("0x{0:x}", &self.0))
178 $($hi:tt:$lo:tt $field:ident as $type:tt
187 register!(@check_field_bounds $hi:$lo $field as $type);
193 register!(@field_accessor $name $hi:$lo $field as $type
204 (@check_field_bounds $hi:tt:$lo:tt $field:ident as bool) => {
209 concat!("boolean field `", stringify!($field), "` covers more than one bit")
215 (@check_field_bounds $hi:tt:$lo:tt $field:ident as $type:tt) => {
220 concat!("field `", stringify!($field), "`'s MSB is smaller than its LSB")
227 @field_accessor $name:ident $hi:tt:$lo:tt $field:ident as bool => $into_type:ty
231 @leaf_accessor $name $hi:$lo $field as bool
239 @field_accessor $name:ident $hi:tt:$lo:tt $field:ident as bool $(, $comment:literal)?;
241 register!(@field_accessor $name $hi:$lo $field as bool => bool $(, $comment)?;);
246 @field_accessor $name:ident $hi:tt:$lo:tt $field:ident as $type:tt ?=> $try_into_type:ty
249 register!(@leaf_accessor $name $hi:$lo $field as $type
260 @field_accessor $name:ident $hi:tt:$lo:tt $field:ident as $type:tt => $into_type:ty
263 register!(@leaf_accessor $name $hi:$lo $field as $type
269 @field_accessor $name:ident $hi:tt:$lo:tt $field:ident as $type:tt
272 register!(@field_accessor $name $hi:$lo $field as $type => $type $(, $comment)?;);
277 @leaf_accessor $name:ident $hi:tt:$lo:tt $field:ident as $type:ty
281 const [<$field:upper>]: ::core::ops::RangeInclusive<u8> = $lo..=$hi;
282 const [<$field:upper _MASK>]: u32 = ((((1 << $hi) - 1) << 1) + 1) - ((1 << $lo) - 1);
283 const [<$field:upper _SHIFT>]: u32 = Self::[<$field:upper _MASK>].trailing_zeros();
291 pub(crate) fn $field(self) -> $res_type {
293 const MASK: u32 = $name::[<$field:upper _MASK>];
294 const SHIFT: u32 = $name::[<$field:upper _SHIFT>];
296 let field = ((self.0 & MASK) >> SHIFT);
298 $process(field)
307 pub(crate) fn [<set_ $field>](mut self, value: $to_type) -> Self {
308 const MASK: u32 = $name::[<$field:upper _MASK>];
309 const SHIFT: u32 = $name::[<$field:upper _SHIFT>];