rama-core 0.3.0

rama service core code, used by rama and service authors
Documentation
//! `async fn serve(&self, Input) -> Result<Output, Error>`
//!
//! Crate used by the end-user `rama` crate and `rama` crate authors alike.
//!
//! Learn more about `rama`:
//!
//! - Github: <https://github.com/plabayo/rama>
//! - Book: <https://ramaproxy.org/book/>
//!
//! # rama service
//!
//! Heavily inspired by [tower-service](https://docs.rs/tower-service/0.3.0/tower_service/trait.Service.html)
//! and the vast [Tokio](https://docs.rs/tokio/latest/tokio/) ecosystem which makes use of it.
//!
//! Initially the goal was to rely on `tower-service` directly, but it turned out to be
//! too restrictive and difficult to work with, for the use cases we have in Rama.
//! See <https://ramaproxy.org/book/faq.html> for more information regarding this and more.

#![doc(
    html_favicon_url = "https://raw.githubusercontent.com/plabayo/rama/main/docs/img/rama_logo.svg"
)]
#![doc(
    html_logo_url = "https://raw.githubusercontent.com/plabayo/rama/main/docs/img/rama_logo.svg"
)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(test, allow(clippy::float_cmp))]
#![cfg_attr(all(not(feature = "std"), not(test)), no_std)]

#[cfg(not(feature = "std"))]
extern crate alloc;

pub mod extensions;

#[doc(inline)]
pub use ::rama_error as error;

pub mod error_sink;

#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
pub mod graceful;
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
pub mod rt;

pub mod service;
pub use service::Service;

pub mod layer;
pub use layer::Layer;

#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
pub mod io;
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
pub mod stream;

pub mod combinators;
pub mod matcher;

pub mod username;

pub mod geo;

pub mod telemetry;

pub mod conversion;

#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
pub mod svc_input;
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
pub use svc_input::ServiceInput;

mod byte_str;

pub mod bytes {
    //! Re-export of [bytes](https://docs.rs/bytes/latest/bytes/) crate.
    //!
    //! Exported for your convenience and because it is so fundamental to rama.

    #[doc(inline)]
    pub use ::bytes::*;

    #[doc(inline)]
    pub use crate::byte_str::ByteStr;
}

pub mod futures;

mod std;