pub enum TemplateCapsState {
NotYetRead,
Unreadable {
reason: String,
},
Read {
caps: TemplateCaps,
},
}Expand description
What gglib currently holds about a model’s template caps.
Shaped like BaselineState in gglib-proxy::props, for the same reason:
an Option<TemplateCaps> flattens “nobody has read it yet” and “the read
was attempted and failed” into one None, after which the only thing a
surface can say is “not read yet” — a claim about a read that did happen.
ADR 0007’s tri-state (supported / not supported / never observed) needs
the distinction held all the way down.
Variants§
NotYetRead
No /props read has completed for the running model yet. The
ordinary state for the first second of a launch.
Unreadable
The read was attempted and produced no caps — the endpoint was unreachable, the body unparseable, or (a pre-caps build) the key absent.
Read
The server reported its template’s caps.
Fields
caps: TemplateCapsThe self-report, verbatim.
Implementations§
Source§impl TemplateCapsState
impl TemplateCapsState
Sourcepub const fn caps(&self) -> Option<&TemplateCaps>
pub const fn caps(&self) -> Option<&TemplateCaps>
The caps, when they were read.
Trait Implementations§
Source§impl Clone for TemplateCapsState
impl Clone for TemplateCapsState
Source§fn clone(&self) -> TemplateCapsState
fn clone(&self) -> TemplateCapsState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TemplateCapsState
impl Debug for TemplateCapsState
Source§impl Default for TemplateCapsState
impl Default for TemplateCapsState
Source§fn default() -> TemplateCapsState
fn default() -> TemplateCapsState
Source§impl PartialEq for TemplateCapsState
impl PartialEq for TemplateCapsState
Source§fn eq(&self, other: &TemplateCapsState) -> bool
fn eq(&self, other: &TemplateCapsState) -> bool
self and other values to be equal, and is used by ==.