pub struct Cap {
pub name: String,
pub scope: CapScope,
pub counts: CapCount,
pub filter: CapFilter,
pub unless: CapFilter,
pub max: Expr,
pub reserve: Option<Reserve>,
}Expand description
A cap on what the dispatcher starts, in the board’s one capacity language (docs/adr/0009-board-capacity.md): what it counts, in which scope, among which cards and sessions, at most how many. Every cap applies; a card starts only when each cap that matches it has room.
Fields§
§name: StringWhat the cap is called where a card waits on it and in the capacity view.
scope: CapScopeWhere one count is kept: one for the whole home, or one per board, machine or profile.
counts: CapCountWhat is counted.
filter: CapFilterOnly what matches counts, and only a card that matches is held (every key that is given must match).
unless: CapFilterWhat matches this is neither counted nor held, whatever where says (a standing service that holds no slot).
max: ExprThe most there may be in each count; a max that evaluates to nothing caps nothing.
reserve: Option<Reserve>Slots of each count held back for the cards this matches while any waits (Hermes’s review reservation).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Cap
impl<'de> Deserialize<'de> for Cap
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Cap, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Cap, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for Cap
Source§impl JsonSchema for Cap
impl JsonSchema for Cap
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Serialize for Cap
impl Serialize for Cap
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Cap
Auto Trait Implementations§
impl Freeze for Cap
impl RefUnwindSafe for Cap
impl Send for Cap
impl Sync for Cap
impl Unpin for Cap
impl UnsafeUnpin for Cap
impl UnwindSafe for Cap
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.