tachyon-types 0.3.0

Shared myko entity and command types for the tachyon Ansible runner.
Documentation
pub mod category;
pub use category::*;

pub mod inventory;
pub use inventory::*;

pub mod output;
pub use output::*;

pub mod playbook;
pub use playbook::*;

pub mod cluster;
pub use cluster::*;

pub mod pin;
pub use pin::*;

pub mod run;
pub use run::*;

pub mod resource;
pub use resource::*;

pub mod commands;
pub use commands::*;

/// Force the linker to keep every `#[myko_item]` / `#[myko_command]`
/// registration in this crate.
///
/// Each entity and command self-registers via a static that the linker will
/// drop (DCE) if nothing in the final binary references its module. The tachyon
/// server binary references these types directly, but when tachyon-types is
/// composed as a DEPENDENCY into another cell's server binary nothing
/// references them, so without this the entities and commands would
/// silently vanish from the composed cell. Call `tachyon_types::link()` once
/// from the host cell during setup.
///
/// This list MUST stay exhaustive: every `#[myko_item]` and `#[myko_command]`
/// in the crate needs a line below. Adding an entity or command without one
/// drops it from any composed cell with no error.
pub fn link() {
    use std::hint::black_box;
    // Entities (#[myko_item]).
    black_box(std::any::type_name::<crate::Run>());
    black_box(std::any::type_name::<crate::Playbook>());
    black_box(std::any::type_name::<crate::ClusterDef>());
    black_box(std::any::type_name::<crate::Category>());
    black_box(std::any::type_name::<crate::Pin>());
    black_box(std::any::type_name::<crate::OutputLine>());
    black_box(std::any::type_name::<crate::Inventory>());
    // Commands (#[myko_command]).
    black_box(std::any::type_name::<crate::RunPlaybook>());
    black_box(std::any::type_name::<crate::CancelRun>());
    black_box(std::any::type_name::<crate::PinPlaybook>());
    black_box(std::any::type_name::<crate::AppendRunOutput>());
    black_box(std::any::type_name::<crate::FinishRun>());
    black_box(std::any::type_name::<crate::DeclarePlaybooks>());
    black_box(std::any::type_name::<crate::DeclareClusters>());
}