#![deny(unsafe_code)]
#![warn(
missing_docs,
trivial_casts,
trivial_numeric_casts,
unused_import_braces,
unused_qualifications
)]
#![cfg_attr(not(feature = "std"), no_std)]
#[cfg(all(not(feature = "std"), not(feature = "alloc")))]
compile_error!(r#"The "no_std" feature currently requires the "alloc" feature"#);
#[cfg(feature = "std")]
extern crate core;
#[cfg(feature = "alloc")]
#[macro_use]
extern crate alloc;
#[macro_use]
extern crate tracing;
pub use async_trait::async_trait;
#[doc(inline)]
pub use async_trait::async_trait as worker;
#[doc(inline)]
pub use async_trait::async_trait as processor;
extern crate ockam_macros;
pub use ockam_macros::{AsyncTryClone, Message};
extern crate futures_util;
pub mod access_control;
pub mod api;
pub mod compat;
pub mod debugger;
pub mod flow_control;
pub mod hex_encoding;
pub mod env;
mod cbor;
mod error;
mod message;
mod processor;
mod routing;
mod uint;
mod worker;
pub use access_control::*;
pub use cbor::*;
pub use error::*;
pub use message::*;
pub use processor::*;
pub use routing::*;
pub use uint::*;
pub use worker::*;
#[cfg(all(not(feature = "std"), feature = "alloc"))]
#[doc(hidden)]
pub use compat::println;
#[cfg(feature = "std")]
#[doc(hidden)]
pub use std::println;
use crate::compat::boxed::Box;
#[async_trait]
pub trait AsyncTryClone: Sized {
async fn async_try_clone(&self) -> Result<Self>;
}
#[async_trait]
impl<D> AsyncTryClone for D
where
D: Clone + Sync,
{
async fn async_try_clone(&self) -> Result<Self> {
Ok(self.clone())
}
}
pub fn deny() -> Result<bool> {
Ok(false)
}
pub fn allow() -> Result<bool> {
Ok(true)
}