fastly 0.12.0

Fastly Compute API
Documentation
// Warnings (other than unused variables) in doctests are promoted to errors.
#![doc(test(attr(deny(warnings))))]
#![doc(test(attr(allow(dead_code))))]
#![doc(test(attr(allow(unused_variables))))]
#![allow(deprecated)]
#![warn(missing_docs)]
#![deny(rustdoc::broken_intra_doc_links)]
#![deny(rustdoc::private_intra_doc_links)]
#![deny(rustdoc::invalid_codeblock_attributes)]
// Allow this library to use its own deprecated p1 APIs while the code
// is being ported.
#![cfg_attr(target_env = "p2", allow(deprecated))]

//! # Rust SDK for Compute.
//!
//! This Rustdoc page is a reference for how to use individual APIs from this SDK. For a guide-level
//! introduction to using Compute with this SDK, see [Rust on
//! Compute](https://developer.fastly.com/learning/compute/rust) at the Fastly Developer Hub.
mod abi;

pub mod acl;
pub mod backend;
pub mod cache;
pub mod compute_runtime;
pub mod config_store;
pub mod convert;
pub mod device_detection;
pub mod dictionary;
pub mod erl;
pub mod error;
pub mod experimental;
pub mod geo;
pub mod handle;
pub mod http;
pub mod image_optimizer;
pub mod kv_store;
pub mod log;
pub mod mime;
pub mod secret_store;
pub mod security;
pub mod shielding;

pub use crate::acl::Acl;
pub use crate::backend::Backend;
#[doc(inline)]
pub use crate::config_store::ConfigStore;
#[doc(inline)]
#[allow(deprecated)]
pub use crate::dictionary::Dictionary;
#[doc(inline)]
pub use crate::error::Error;
#[doc(inline)]
pub use crate::http::{Body, Request, Response};
#[doc(inline)]
pub use crate::kv_store::{DeleteBuilder, InsertBuilder, KVStore, ListBuilder, LookupBuilder};
#[doc(inline)]
pub use crate::secret_store::SecretStore;

pub use fastly_macros::main;

/// Tell the runtime what ABI version this program is using.
///
// TODO ACF 2020-12-02: figure out what we want to do with this function, probably when we switch
// away from using the `fastly-sys` semver for the ABI versioning. For now, hide its documentation
// to avoid confusion for users, but still allow the `#[fastly::main]` macro to see it.
#[doc(hidden)]
pub fn init() {
    // Ignore errors, as `init` traps if something is wrong, rather than failing.
    let _ = unsafe { abi::fastly_abi::init(abi::FASTLY_ABI_VERSION) };
}