Skip to main content

Behavior

Trait Behavior 

Source
pub trait Behavior: Sync {
    // Required methods
    fn columns(&self) -> &'static [Field];
    fn written(&self, write: &Write<'_>, values: &mut [SqlValue]);

    // Provided methods
    fn guards(&self) -> bool { ... }
    fn hides(&self) -> Option<&'static str> { ... }
    fn broadcasts(&self) -> bool { ... }
    fn searched(&self) -> bool { ... }
    fn planned(&self, write: &Write<'_>, plan: &mut Plan<'_>) -> Result<()> { ... }
    fn name(&self) -> &'static str { ... }
}
Expand description

Never runs I/O.

Required Methods§

Source

fn columns(&self) -> &'static [Field]

Stored after the id and before the aggregate’s own fields.

Source

fn written(&self, write: &Write<'_>, values: &mut [SqlValue])

Provided Methods§

Source

fn guards(&self) -> bool

Source

fn hides(&self) -> Option<&'static str>

Source

fn broadcasts(&self) -> bool

Source

fn searched(&self) -> bool

Source

fn planned(&self, write: &Write<'_>, plan: &mut Plan<'_>) -> Result<()>

Runs once every behavior has set its columns.

Source

fn name(&self) -> &'static str

Names the behavior in errors, which see it only as dyn Behavior.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§