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>,
}Will be extracted to mockforge-workspace crate
Expand description
Folder represents a hierarchical grouping within a workspace
Fields§
§id: EntityIdWill be extracted to mockforge-workspace crate
Unique identifier
name: StringWill be extracted to mockforge-workspace crate
Human-readable name
description: Option<String>Will be extracted to mockforge-workspace crate
Optional description
parent_id: Option<EntityId>Will be extracted to mockforge-workspace crate
Parent folder ID (None if root folder)
created_at: DateTime<Utc>Will be extracted to mockforge-workspace crate
Creation timestamp
updated_at: DateTime<Utc>Will be extracted to mockforge-workspace crate
Last modification timestamp
Will be extracted to mockforge-workspace crate
Associated tags
inheritance: FolderInheritanceConfigWill be extracted to mockforge-workspace crate
Inheritance configuration for this folder
folders: Vec<Folder>Will be extracted to mockforge-workspace crate
Child folders
requests: Vec<MockRequest>Will be extracted to mockforge-workspace crate
Requests in this folder
Implementations§
Source§impl Folder
impl Folder
Sourcepub fn new(name: String) -> Self
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn new(name: String) -> Self
Will be extracted to mockforge-workspace crate
Create a new folder
Sourcepub fn add_folder(&mut self, name: String) -> Result<EntityId>
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn add_folder(&mut self, name: String) -> Result<EntityId>
Will be extracted to mockforge-workspace crate
Add a subfolder
Sourcepub fn add_request(&mut self, request: MockRequest) -> Result<EntityId>
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn add_request(&mut self, request: MockRequest) -> Result<EntityId>
Will be extracted to mockforge-workspace crate
Add a request to this folder
Sourcepub fn find_folder(&self, id: &str) -> Option<&Folder>
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn find_folder(&self, id: &str) -> Option<&Folder>
Will be extracted to mockforge-workspace crate
Find a folder by ID recursively
Sourcepub fn find_folder_mut(&mut self, id: &str) -> Option<&mut Folder>
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn find_folder_mut(&mut self, id: &str) -> Option<&mut Folder>
Will be extracted to mockforge-workspace crate
Find a folder by ID recursively (mutable)
Sourcepub fn find_request(&self, id: &str) -> Option<&MockRequest>
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn find_request(&self, id: &str) -> Option<&MockRequest>
Will be extracted to mockforge-workspace crate
Find a request by ID recursively
Sourcepub fn get_routes(&self, workspace_id: &str) -> Vec<Route>
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn get_routes(&self, workspace_id: &str) -> Vec<Route>
Will be extracted to mockforge-workspace crate
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>,
Auto Trait Implementations§
impl Freeze for Folder
impl RefUnwindSafe for Folder
impl Send for Folder
impl Sync for Folder
impl Unpin for Folder
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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