Skip to main content

PhaseOf

Trait PhaseOf 

Source
pub trait PhaseOf {
    // Required method
    fn of(kind: EventKind) -> Option<Phase>;
}
Expand description

The phase an event of one of this crate’s kinds belongs to, where the kind alone decides it.

A trait rather than an inherent method because the four phases are declared in src/vocabulary.rs, beside the rest of the wire words, and which of them an onevcs kind is in is a fact about the kinds declared here. With it in scope the call is spelled Phase::of(kind), as it always was.

Required Methods§

Source

fn of(kind: EventKind) -> Option<Phase>

The phase an event of this kind belongs to, where the kind alone decides it.

None for exactly two kinds, and neither is an omission: a Push of the session’s own branch is Development and a push of anything else — the base a local-direct squash lands on, the base a merge train advanced — is Integrate. Which of the two it was is a fact about the push rather than about the kind, so the producer stamps it and this answers that it cannot. A GateRun is the same: a pre-push gate is Integrate and a change request’s required checks are Review, which is a fact about the gate.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§