#[non_exhaustive]pub enum ManifestRule {
Show 22 variants
Json,
UnknownMember,
MissingMember,
WrongType,
Label,
ImageId,
Profile,
ContainerCount,
Path,
Mode,
ModeSet,
Operation,
OperationSet,
WriteOperationWithoutWrite,
DuplicatePath,
Workspace,
MaxBodyBytes,
LimitNotPositive,
LimitAboveCeiling,
MemoryNotUsable,
TmpNotBelowMemory,
TimeoutTooShort,
}Expand description
The validation rule a manifest broke.
Each row of the contract’s validation list has one variant, so a refusal table can name its case; the shape rules (JSON, members, types) have their own.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Json
The bytes are not a JSON object.
UnknownMember
A member the manifest does not define.
MissingMember
A required member is absent.
WrongType
A member has the wrong JSON type.
Label
name or version is empty, longer than MAX_LABEL_CHARS or
holds a control character.
ImageId
image_id is not sha256: and 64 lower-case hex digits.
Profile
profile is not "job".
ContainerCount
Zero containers, or more than MAX_CONTAINERS.
Path
A path that fails the path rule.
Mode
A mode other than Read or Write (so no Control and no
Append).
ModeSet
Modes other than exactly ["Read"] or ["Read","Write"].
Operation
An operation not in GET, HEAD, PUT, DELETE.
OperationSet
No operation, or one listed twice.
WriteOperationWithoutWrite
PUT or DELETE on a container without Write.
DuplicatePath
Two entries for one path.
Workspace
workspace is not "none", "read" or "write".
MaxBodyBytes
max_body_bytes is zero or negative.
LimitNotPositive
A limit that is zero or negative, or cpus that is not a number of
CPUs with at most three decimal places.
LimitAboveCeiling
A limit above the node’s ceiling.
MemoryNotUsable
memory_bytes below MIN_MEMORY_BYTES, or not a multiple of
MEMORY_STEP_BYTES.
TmpNotBelowMemory
tmp_bytes at or above memory_bytes.
TimeoutTooShort
timeout_secs below MIN_TIMEOUT_SECS.