pub struct ProjectFilter {
pub name_pattern: Option<String>,
pub status: Option<ProjectStatus>,
pub platform: Option<Platform>,
pub created_after: Option<DateTime<Utc>>,
pub created_before: Option<DateTime<Utc>>,
pub region: Option<Region>,
pub include_ids: Option<Vec<String>>,
pub exclude_ids: Option<Vec<String>>,
}Expand description
Filter criteria for selecting target projects
Fields§
§name_pattern: Option<String>Glob pattern for project name matching
status: Option<ProjectStatus>Filter by project status (default: Active)
platform: Option<Platform>Filter by platform (ACC, BIM360, or both if None)
created_after: Option<DateTime<Utc>>Include projects created after this date
created_before: Option<DateTime<Utc>>Include projects created before this date
region: Option<Region>Filter by region
include_ids: Option<Vec<String>>Explicit list of project IDs to include
exclude_ids: Option<Vec<String>>Explicit list of project IDs to exclude
Implementations§
Source§impl ProjectFilter
impl ProjectFilter
Sourcepub fn from_expression(expr: &str) -> Result<Self, AdminError>
pub fn from_expression(expr: &str) -> Result<Self, AdminError>
Parse filter from string expression
Syntax: key:value[,key:value...]
Keys:
name- Project name (supports * wildcard)status- Project status (active, inactive, archived)platform- Platform type (acc, bim360)created- Date filter (>YYYY-MM-DD, <YYYY-MM-DD)region- Region (us, emea)
Example: name:*Hospital*,status:active,platform:acc
Sourcepub fn matches_name(&self, project_name: &str) -> bool
pub fn matches_name(&self, project_name: &str) -> bool
Check if a project name matches the filter’s name pattern
Sourcepub fn matches(&self, project: &AccountProject) -> bool
pub fn matches(&self, project: &AccountProject) -> bool
Check if a project matches all filter criteria
Sourcepub fn apply(&self, projects: Vec<AccountProject>) -> Vec<AccountProject>
pub fn apply(&self, projects: Vec<AccountProject>) -> Vec<AccountProject>
Apply filter to a list of projects
Trait Implementations§
Source§impl Clone for ProjectFilter
impl Clone for ProjectFilter
Source§fn clone(&self) -> ProjectFilter
fn clone(&self) -> ProjectFilter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProjectFilter
impl Debug for ProjectFilter
Source§impl Default for ProjectFilter
impl Default for ProjectFilter
Source§fn default() -> ProjectFilter
fn default() -> ProjectFilter
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ProjectFilter
impl<'de> Deserialize<'de> for ProjectFilter
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ProjectFilter
impl RefUnwindSafe for ProjectFilter
impl Send for ProjectFilter
impl Sync for ProjectFilter
impl Unpin for ProjectFilter
impl UnsafeUnpin for ProjectFilter
impl UnwindSafe for ProjectFilter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more