Trait mz_adapter::util::Transmittable

source ·
pub trait Transmittable {
    type Allowed: Eq + PartialEq + Debug;

    // Required method
    fn to_allowed(&self) -> Self::Allowed;
}
Expand description

A helper trait for ClientTransmitter.

Required Associated Types§

source

type Allowed: Eq + PartialEq + Debug

The type of values used to express which set of values are allowed.

Required Methods§

source

fn to_allowed(&self) -> Self::Allowed

The conversion from the ClientTransmitter’s type to Allowed.

The benefit of this style of trait, rather than relying on a bound on Allowed, are:

  • Not requiring a clone
  • The flexibility for facile implementations that do not plan to make use of the allowed feature. Those types can simply implement this trait for bool, and return true. However, it might not be semantically appropriate to expose From<&Self> for bool.

Implementations on Foreign Types§

source§

impl Transmittable for ()

§

type Allowed = bool

source§

fn to_allowed(&self) -> Self::Allowed

Implementors§

source§

impl Transmittable for ExecuteResponse

This implementation is meant to ensure that we maintain updated information about which types of ExecuteResponses are permitted to be sent, which will be a function of which plan we’re executing.

source§

impl Transmittable for CatalogDump

source§

impl Transmittable for GetVariablesResponse

source§

impl Transmittable for StartupResponse