pub struct PackingUsize(_);
Expand description

Wraps a usize to add methods for packing bit ranges specified by PackUsize.

See the module-level documentation for details on using packing specs.

Implementations

Wrap a usize to add methods for packing bit ranges using PackUsize.

Pack bits from value into self, using the range specified by packer.

Any bits in value outside the range specified by packer are ignored.

Pack bits from value into self, using the range specified by packer.

Panics

If value contains bits outside the range specified by packer.

Set all bits in the range specified by packer to 1 in self.

Set all bits in the range specified by packer to 0 in self.

Returns true if any bits specified by packer are set in self.

Returns true if any bits specified by packer are set in self.

Finish packing bits into self, returning the wrapped value.

Trait Implementations

Formats the value using the given formatter.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Formats the value using the given formatter.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Formats the value using the given formatter.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.