mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-26 08:34:55 +01:00
Shortcuts
This commit is contained in:
parent
8e3b8834c0
commit
fc1aea2f96
@ -79,6 +79,14 @@ impl MachineState {
|
|||||||
Self { state: Status::Free }
|
Self { state: Status::Free }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn free() -> Self {
|
||||||
|
Self { state: Status::Free }
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn used(uid: UserId, priority: Priority) -> Self {
|
||||||
|
Self { state: Status::InUse(uid, priority) }
|
||||||
|
}
|
||||||
|
|
||||||
/// Check if the given priority is higher than one's own.
|
/// Check if the given priority is higher than one's own.
|
||||||
///
|
///
|
||||||
/// If `self` does not have a priority then this function always returns `true`
|
/// If `self` does not have a priority then this function always returns `true`
|
||||||
|
Loading…
Reference in New Issue
Block a user