Trait mz_adapter::session::vars::Var

source ·
pub trait Var: Debug {
    fn name(&self) -> &'static str;
    fn value(&self) -> String;
    fn description(&self) -> &'static str;
    fn type_name(&self) -> &'static str;
    fn visible(&self, user: &User) -> bool;
    fn safe(&self) -> bool;

    fn experimental(&self) -> bool { ... }
Expand description

A Var represents a configuration parameter of an arbitrary type.

Required Methods§

Returns the name of the configuration parameter.

Constructs a flattened string representation of the current value of the configuration parameter.

The resulting string is guaranteed to be parsable if provided to Value::parse as a VarInput::Flat.

Returns a short sentence describing the purpose of the configuration parameter.

Returns the name of the type of this variable.

Indicates wither the Var is visible for the given User.

Variables marked as internal are only visible for the crate::catalog::SYSTEM_USER user.

Indicates wither the Var is only visible in unsafe mode.

Variables marked as safe are visible outside of unsafe mode.

Provided Methods§

Indicates wither the Var is experimental.

The default implementation determines this from the Var name, as experimental variable names should always end with “_experimental”.

Implementations on Foreign Types§