pub struct EmptyCount<T, const TOTAL: usize = 2> { /* private fields */ }Implementations§
Source§impl<T, const TOTAL: usize> EmptyCount<T, TOTAL>
impl<T, const TOTAL: usize> EmptyCount<T, TOTAL>
Sourcepub proof fn alloc() -> tracked result : Self
pub proof fn alloc() -> tracked result : Self
requires
TOTAL > 0,Allocates a new EmptyCount, the id is arbitrary.
Sourcepub proof fn put_resource(tracked self, tracked resource: T) -> tracked frac : Count<T, TOTAL>
pub proof fn put_resource(tracked self, tracked resource: T) -> tracked frac : Count<T, TOTAL>
ensures
frac.id() == self.id(),frac.resource() == resource,frac.frac() == TOTAL,frac.has_authority(),Puts a resource into the EmptyCount, returning a Count with the same id and the full fraction.
Auto Trait Implementations§
impl<T, const TOTAL: usize> Freeze for EmptyCount<T, TOTAL>
impl<T, const TOTAL: usize> RefUnwindSafe for EmptyCount<T, TOTAL>where
T: RefUnwindSafe,
impl<T, const TOTAL: usize> Send for EmptyCount<T, TOTAL>
impl<T, const TOTAL: usize> Sync for EmptyCount<T, TOTAL>
impl<T, const TOTAL: usize> Unpin for EmptyCount<T, TOTAL>where
T: Unpin,
impl<T, const TOTAL: usize> UnsafeUnpin for EmptyCount<T, TOTAL>
impl<T, const TOTAL: usize> UnwindSafe for EmptyCount<T, TOTAL>where
T: UnwindSafe,
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