Skip to main content

RightJoinKey

Trait RightJoinKey 

Source
pub trait RightJoinKey<RK, RV, JK>:
    Send
    + Sync
    + 'static {
    const OPTIONAL: bool;

    // Required method
    fn right_join_key(&self, row_key: &RK, row_value: &RV) -> Option<JK>;
}
Expand description

Extracts a right-side join key while making key absence explicit.

The adapter types below avoid overlapping blanket implementations for required keys and Option keys. Join runtimes monomorphize this call, so RequiredRightKey retains the ordinary infallible fast path.

Required Associated Constants§

Source

const OPTIONAL: bool

Whether extraction can omit a row. Used to preserve the required-key fast path.

Required Methods§

Source

fn right_join_key(&self, row_key: &RK, row_value: &RV) -> Option<JK>

Returns the join key, or None when the row has no relationship.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<RK, RV, JK, F> RightJoinKey<RK, RV, JK> for OptionalRightKey<F>
where F: Fn(&RK, &RV) -> Option<JK> + Send + Sync + 'static,

Source§

const OPTIONAL: bool = true

Source§

impl<RK, RV, JK, F> RightJoinKey<RK, RV, JK> for RequiredRightKey<F>
where F: Fn(&RK, &RV) -> JK + Send + Sync + 'static,

Source§

const OPTIONAL: bool = false