pub struct Domain(/* private fields */);Expand description
Representable number of resident-accounting domains in one driver scope.
Implementations§
Source§impl Domain
impl Domain
pub const ZERO: Self
pub const ONE: Self
pub const MAX: Self
Sourcepub const fn fixed<const COUNT: u32>() -> Self
pub const fn fixed<const COUNT: u32>() -> Self
Creates a count across the complete u32 representation.
Sourcepub const fn resolve(self, need: Self) -> Self
pub const fn resolve(self, need: Self) -> Self
Resolves additive resident-domain demand against this baseline.
pub const fn combine(self, next: Self) -> Result<Self, DomainSum>
pub const fn get(self) -> u32
Trait Implementations§
impl Copy for Domain
impl Eq for Domain
Source§impl Ord for Domain
impl Ord for Domain
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Domain
impl PartialOrd for Domain
impl StructuralPartialEq for Domain
Auto Trait Implementations§
impl Forget for Domain
impl Freeze for Domain
impl RefUnwindSafe for Domain
impl Send for Domain
impl Sync for Domain
impl Unpin for Domain
impl UnsafeUnpin for Domain
impl UnwindSafe for Domain
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more