Skip to main content

RoadmapFilter

Struct RoadmapFilter 

Source
pub struct RoadmapFilter {
    pub period_from: Option<String>,
    pub period_to: Option<String>,
    pub owner: Option<String>,
    pub status: Option<String>,
    pub labels: Vec<String>,
    pub query: Option<String>,
}
Expand description

The normalized cross-surface roadmap filter (data-model §3).

All criteria are optional, so the default value is the empty filter; an empty filter narrows nothing and selects every initiative. The field names are the serialized names (see the serde attributes) and are stable: they are what the MCP tool arguments and the local portable DTO carry, so a renamed field would be a breaking change to every surface at once.

Unknown serialized fields are refused (deny_unknown_fields), which is deliberate: with a permissive reader a typo’d key ("ownerr") would silently drop the criterion and return more rows than asked for. A filter is a strict input; the forward-compatibility budget this mission spends is on the preserved initiative extensions, not on a query language.

Fields§

§period_from: Option<String>

Inclusive lower bound on the initiative target date (YYYY-MM-DD).

§period_to: Option<String>

Inclusive upper bound on the initiative target date (YYYY-MM-DD).

§owner: Option<String>

Owner identity to match; compared trimmed and case-insensitively.

§status: Option<String>

Initiative status to match; compared trimmed and case-insensitively.

§labels: Vec<String>

Labels the initiative must all carry; each compared trimmed and case-insensitively, order irrelevant.

§query: Option<String>

Free text matched case-insensitively against name/outcome/owner/status/labels.

Implementations§

Source§

impl RoadmapFilter

Source

pub fn is_empty(&self) -> bool

Whether this filter carries no criterion at all — the documented “no filter” value.

RoadmapFilter::default() is the empty filter, so a call site that supports “show everything” has one value to pass rather than four Nones it must keep in step. A blank query counts as absent because it narrows nothing; blank owner/status/labels are refusals and so are assumed absent here once Self::validate has run.

Source

pub fn validate(&self) -> Result<()>

Validate the filter’s syntax before any projection runs.

Refuses: a period_from/period_to that is not a YYYY-MM-DD calendar date (the shared crate::model::validate_date rule, the same one the record’s own loader uses), a period whose lower bound is after its upper bound, and a present-but-blank owner, status, or labels entry. A well-formed value that names no initiative is not refused — it matches nothing (see the module docs).

Source

pub fn matches(&self, initiative: &InitiativeConfiguration) -> bool

Whether one initiative record satisfies every criterion this filter sets.

Purely read-only: it inspects the record and mutates nothing. An empty filter matches every record.

Trait Implementations§

Source§

impl Clone for RoadmapFilter

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RoadmapFilter

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RoadmapFilter

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for RoadmapFilter

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for RoadmapFilter

Source§

impl PartialEq for RoadmapFilter

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for RoadmapFilter

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for RoadmapFilter

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.