feat(protocol): add logical model and validation
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
//! Transport-independent logical types for the Web Interface Protocol (WIP).
|
||||
//!
|
||||
//! This crate deliberately models interface declarations, published objects,
|
||||
//! operation calls, and operation results without assigning them HTTP routes,
|
||||
//! methods, headers, or JSON envelopes. A transport can encode these values,
|
||||
//! but the encoding is outside this crate's contract.
|
||||
|
||||
#![deny(missing_docs)]
|
||||
|
||||
mod error;
|
||||
mod model;
|
||||
mod validation;
|
||||
|
||||
pub use error::{
|
||||
NameNamespace, PathSegment, ProtocolError, ProtocolErrorCategory, ValidationError,
|
||||
ValidationErrorKind, ValueKind,
|
||||
};
|
||||
pub use model::{
|
||||
Documentation, EnumDeclaration, EnumVariantDeclaration, FieldDeclaration, InterfaceDescriptor,
|
||||
InterfaceObservation, JsonMember, JsonValue, NamedValue, Object, ObjectId, OperationCall,
|
||||
OperationDeclaration, OperationOutcome, OperationResult, OperationTarget, ParameterDeclaration,
|
||||
RecordDeclaration, ReturnDeclaration, TypeDeclaration, TypeExpr, UnionDeclaration,
|
||||
UnionVariantDeclaration, Value,
|
||||
};
|
||||
|
||||
/// Largest integer that is exactly interoperable with a JavaScript `Number`.
|
||||
pub const MAX_SAFE_INTEGER: i64 = 9_007_199_254_740_991;
|
||||
|
||||
/// Smallest integer that is exactly interoperable with a JavaScript `Number`.
|
||||
pub const MIN_SAFE_INTEGER: i64 = -MAX_SAFE_INTEGER;
|
||||
Reference in New Issue
Block a user