mod builder;
mod call;
mod connect;
mod connection;
mod discovery;
pub mod dynamic;
mod handler;
#[cfg(feature = "hosting")]
mod host;
#[cfg(feature = "hosting")]
mod identity;
mod layer;
mod node;
mod peer;
mod service;
mod session;
#[cfg(feature = "hosting")]
mod topology;
pub use builder::{NodeBuilder, Scope};
pub use call::{Destination, IntoBody, SendExt};
pub use connect::EndpointDialer;
pub use connection::{ConnectError, ConnectionStatus, DisconnectReason, PeerConnection};
pub use handler::{EventStream, HandlerError};
#[cfg(feature = "hosting")]
pub use host::{
HealthStatus, HostConfig, HostError, Hosting, TcpSecurity, TcpTransport, WebTransportConfig,
};
#[cfg(feature = "hosting")]
pub use identity::ServerIdentity;
pub use layer::{layer_fn, Layer, LayerFn, Next, Origin, ServiceBody};
pub use node::Node;
pub use peer::{
peer_layer_fn, InsecureAcceptDeclaredPeerIdentities, PeerLayer, PeerLayerFn, PeerNext,
PeerRequest, VerifiedPeer,
};
#[cfg(feature = "hosting")]
pub use rustls;
pub use service::Request;
pub use service::{
ContractSchema, Handler, HandlerOutput, HandlerService, Operation, OperationContract, Reply,
State, States, Streaming,
};
#[cfg(feature = "hosting")]
pub use topology::{
accept_unix, connect_unix, ParentLink, TopologyConfig, UnbTopology, UnixHosting,
};
pub use unb_client::{Endpoint, EndpointSet, TransportKind};
pub use unb_core::{
validate_node_identifier, Detail, ErrorCode, NodeIdentity, Scope as DiscoverScope,
};
pub use unb_runtime::{CancellationToken, Pipe, Wire, WsError};
#[cfg(feature = "hosting")]
pub use unb_transport::webtransport::{self, SelfSignedIdentity};
#[doc(hidden)]
pub mod __private {
pub use crate::service::{erase_streaming, erase_unary};
pub fn schema_value<T: schemars::JsonSchema>() -> serde_json::Value {
serde_json::to_value(schemars::schema_for!(T)).unwrap_or(serde_json::Value::Null)
}
pub fn combined_error_schema<A: schemars::JsonSchema, B: schemars::JsonSchema>(
) -> serde_json::Value {
serde_json::json!({
"oneOf": [schema_value::<A>(), schema_value::<B>()],
})
}
}