pub struct Folder {
pub id: EntityId,
pub name: String,
pub description: Option<String>,
pub parent_id: Option<EntityId>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub tags: Vec<String>,
pub inheritance: FolderInheritanceConfig,
pub folders: Vec<Folder>,
pub requests: Vec<MockRequest>,
}
Expand description
Folder represents a hierarchical grouping within a workspace
Fields§
§id: EntityId
Unique identifier
name: String
Human-readable name
description: Option<String>
Optional description
parent_id: Option<EntityId>
Parent folder ID (None if root folder)
created_at: DateTime<Utc>
Creation timestamp
updated_at: DateTime<Utc>
Last modification timestamp
Associated tags
inheritance: FolderInheritanceConfig
Inheritance configuration for this folder
folders: Vec<Folder>
Child folders
requests: Vec<MockRequest>
Requests in this folder
Implementations§
Source§impl Folder
impl Folder
Sourcepub fn add_folder(&mut self, name: String) -> Result<EntityId>
pub fn add_folder(&mut self, name: String) -> Result<EntityId>
Add a subfolder
Sourcepub fn add_request(&mut self, request: MockRequest) -> Result<EntityId>
pub fn add_request(&mut self, request: MockRequest) -> Result<EntityId>
Add a request to this folder
Sourcepub fn find_folder(&self, id: &str) -> Option<&Folder>
pub fn find_folder(&self, id: &str) -> Option<&Folder>
Find a folder by ID recursively
Sourcepub fn find_folder_mut(&mut self, id: &str) -> Option<&mut Folder>
pub fn find_folder_mut(&mut self, id: &str) -> Option<&mut Folder>
Find a folder by ID recursively (mutable)
Sourcepub fn find_request(&self, id: &str) -> Option<&MockRequest>
pub fn find_request(&self, id: &str) -> Option<&MockRequest>
Find a request by ID recursively
Sourcepub fn get_routes(&self, workspace_id: &str) -> Vec<Route>
pub fn get_routes(&self, workspace_id: &str) -> Vec<Route>
Get all routes from this folder and subfolders
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Folder
impl<'de> Deserialize<'de> for Folder
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 Folder
impl RefUnwindSafe for Folder
impl Send for Folder
impl Sync for Folder
impl Unpin for Folder
impl UnwindSafe for Folder
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