Skip to content
API REFERENCEUsage guides →

cellpack::prof::SiteMask ​

struct

Module contract · All interfaces

At a glance ​

pub struct SiteMask(pub u64);

A set of sites, one bit per site in Site order.

Fields and variants ​

0 ​

0: u64

Member index ​

5 of 5 members

  • NONENo site: every hook is a bit test that fails.
  • ALLEvery site: all 64 bits when there are that many, else one per site.
  • parseSites and groups by name; all is every site.
  • containsWhether site is enabled; a bit test of its Site index, so the timed instances can skip a disabled site at its call site.
  • namesThe names of the enabled sites, in Site order.

Methods and associated constants ​

NONE ​

pub const NONE: SiteMask

No site: every hook is a bit test that fails.

ALL ​

pub const ALL: SiteMask

Every site: all 64 bits when there are that many, else one per site.

parse ​

pub fn parse<S: AsRef<str>>(names: &[S]) -> Result<Self>

Sites and groups by name; all is every site.

contains ​

pub fn contains(self, site: Site) -> bool

Whether site is enabled; a bit test of its Site index, so the timed instances can skip a disabled site at its call site.

names ​

pub fn names(self) -> Vec<&'static str>

The names of the enabled sites, in Site order.

Implemented traits ​

impl Clone for SiteMask
impl Debug for SiteMask
impl Default for SiteMask
impl Hash for SiteMask

Contract reference ​

See the module reference for semantic input/output rules, units, allocation, mutation, failure behavior, and lifetime requirements. Declarations and documented members are synchronized from the crate source.

Definition