mod codec;
mod compose;
mod descriptor;
mod error;
pub mod format;
mod message;
mod resource;
mod session;
pub mod shortcut;
mod text;
mod types;
mod value;
pub use codec::{CodecError, Reader, Writer, decode, encode};
pub use compose::{
MODULES_STATE_TYPE, ModulePart, SET_ENABLED, command_offsets, compose, module_state_type,
};
pub use descriptor::{
CommandPolicy, CommandSpec, Concurrency, DescriptorError, EventSpec, ExternalNames,
MODULES_NAMESPACE, OperationKind, ParamSpec, ProtocolDescriptor, RESERVED_NAMESPACES, Retry,
Scope, StateField, check_external_names, valid_name,
};
pub use error::{CommandError, SchemaError};
pub use message::{Cancellation, CommandOutcome, CommandStatus, Invocation, StateUpdate};
pub use resource::check_resource_name;
pub use session::{SessionCommand, session_catalog};
pub use text::{LocalizedText, label_key};
pub use types::{EnumDef, FieldDef, RecordDef, Type, TypeTable, VariantDef};
pub use value::Value;
pub const PROTOCOL_VERSION: u32 = 1;
pub const DESCRIPTOR_VERSION: u32 = 1;
pub fn fingerprint_bytes(bytes: &[u8]) -> u64 {
let mut hash = 0xcbf2_9ce4_8422_2325u64;
for byte in bytes {
hash ^= u64::from(*byte);
hash = hash.wrapping_mul(0x0100_0000_01b3);
}
hash
}