pub enum Def {
Record {
key: String,
record: Schema,
},
Token,
Data(Schema),
Method(Box<Method>),
}Expand description
One definition in a document.
Variants§
Record
A record: a key strategy and the object schema of its body.
Token
A token: a bare identifier with no data.
Data(Schema)
Any other definition usable as data — an object, a string, an array.
Method(Box<Method>)
A query, procedure, subscription or permission-set.
Kept rather than dropped for two reasons. A ref pointing at one is reported as pointing at something that is not data, instead of as a dangling ref. And the schemas a method declares are what the conformance harness checks this server’s own HTTP against: an XRPC response is a JSON value with a schema, and the schema is in the document rather than in anything written here.
Trait Implementations§
impl Eq for Def
impl StructuralPartialEq for Def
Auto Trait Implementations§
impl Freeze for Def
impl RefUnwindSafe for Def
impl Send for Def
impl Sync for Def
impl Unpin for Def
impl UnsafeUnpin for Def
impl UnwindSafe for Def
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.