[][src]Macro fluid_let::fluid_let

macro_rules! fluid_let {
    {
        $(#[$attr:meta])*
        $v:vis static $name:ident: $type_:ty
    } => { ... };
    {
        $(#[$attr:meta])*
        $v:vis static $name:ident: $type_:ty;
        $($rest:tt)*
    } => { ... };
    {} => { ... };
}

Defines global dynamic variables.

Examples

One-line form for single definitions:

fluid_let!(static ENABLED: bool);

Multiple definitions with attributes and visibility modifiers are also supported:

fluid_let! {
    /// Length of `Debug` representation of hashes in characters.
    pub static HASH_LENGTH: usize;

    /// If set to true then passwords will be printed to logs.
    #[cfg(test)]
    static DUMP_PASSWORDS: bool;
}

See also crate-level documentation for usage examples.