MCPcopy Create free account
hub / github.com/eigenform/perfect / from_value

Method from_value

perfect/src/util.rs:465–468  ·  view source on GitHub ↗
(value: usize)

Source from the content-addressed store, hash-verified

463pub struct Align(pub usize);
464impl Align {
465 pub const fn from_value(value: usize) -> Self {
466 assert!(value.is_power_of_two());
467 Self(value)
468 }
469 pub const fn from_bit(bit: usize) -> Self {
470 assert!(bit <= 63);
471 Self(1 << bit)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected