pub struct Constitution {
pub engine_version: &'static str,
pub formats: Vec<FormatVersion>,
pub capabilities: Vec<&'static str>,
pub invariants: Vec<Invariant>,
pub grammar_digest: String,
}Expand description
Everything this engine guarantees, packaged for a client to verify against.
Fields§
§engine_version: &'static str§formats: Vec<FormatVersion>§capabilities: Vec<&'static str>§invariants: Vec<Invariant>§grammar_digest: StringDigest of the grammar THIS ENGINE implements. Never a digest of something the client supplied.
Implementations§
Source§impl Constitution
impl Constitution
Sourcepub fn digest(&self) -> String
pub fn digest(&self) -> String
A stable digest of the whole Constitution.
Built from an explicit ordered encoding rather than from serialized JSON:
every list here is a Vec walked in declaration order, no hash map is
involved at any point, and the counts are committed so a truncated list
cannot digest as a shorter one. Declaration order IS committed — the
lists are append-only, so reordering them is a change to the artifact and
should read as one.
Trait Implementations§
Source§impl Clone for Constitution
impl Clone for Constitution
Source§fn clone(&self) -> Constitution
fn clone(&self) -> Constitution
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Constitution
impl Debug for Constitution
Source§impl<'de> Deserialize<'de> for Constitution
impl<'de> Deserialize<'de> for Constitution
Source§fn deserialize<D>(d: D) -> Result<Constitution, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(d: D) -> Result<Constitution, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Constitution
Source§impl From<OwnedConstitution> for Constitution
impl From<OwnedConstitution> for Constitution
Source§fn from(o: OwnedConstitution) -> Constitution
fn from(o: OwnedConstitution) -> Constitution
Converts to this type from the input type.
Source§impl PartialEq for Constitution
impl PartialEq for Constitution
Source§impl Serialize for Constitution
impl Serialize for Constitution
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,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Constitution
Auto Trait Implementations§
impl Freeze for Constitution
impl RefUnwindSafe for Constitution
impl Send for Constitution
impl Sync for Constitution
impl Unpin for Constitution
impl UnsafeUnpin for Constitution
impl UnwindSafe for Constitution
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
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
Compare self to
key and return true if they are equal.impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more