pub struct Environment {
pub id: EntityId,
pub name: String,
pub description: Option<String>,
pub color: Option<EnvironmentColor>,
pub variables: HashMap<String, String>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub order: i32,
pub sharable: bool,
}Will be extracted to mockforge-workspace crate
Expand description
Environment for managing variable collections
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
color: Option<EnvironmentColor>Will be extracted to mockforge-workspace crate
Color for visual distinction in UI
variables: HashMap<String, String>Will be extracted to mockforge-workspace crate
Environment variables
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
order: i32Will be extracted to mockforge-workspace crate
Display order for UI sorting (lower numbers appear first)
sharable: boolWill be extracted to mockforge-workspace crate
Whether this environment can be shared/synced
Implementations§
Source§impl Environment
impl Environment
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 environment
Sourcepub fn new_global() -> Self
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn new_global() -> Self
Will be extracted to mockforge-workspace crate
Create a new global environment
Sourcepub fn set_variable(&mut self, key: String, value: String)
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn set_variable(&mut self, key: String, value: String)
Will be extracted to mockforge-workspace crate
Add or update a variable
Sourcepub fn remove_variable(&mut self, key: &str) -> bool
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn remove_variable(&mut self, key: &str) -> bool
Will be extracted to mockforge-workspace crate
Remove a variable
Sourcepub fn get_variable(&self, key: &str) -> Option<&String>
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn get_variable(&self, key: &str) -> Option<&String>
Will be extracted to mockforge-workspace crate
Get a variable value
Sourcepub fn set_color(&mut self, color: EnvironmentColor)
👎Deprecated: Will be extracted to mockforge-workspace crate
pub fn set_color(&mut self, color: EnvironmentColor)
Will be extracted to mockforge-workspace crate
Set the environment color
Trait Implementations§
Source§impl Clone for Environment
impl Clone for Environment
Source§fn clone(&self) -> Environment
fn clone(&self) -> Environment
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Environment
impl Debug for Environment
Source§impl<'de> Deserialize<'de> for Environment
impl<'de> Deserialize<'de> for Environment
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 Environment
impl RefUnwindSafe for Environment
impl Send for Environment
impl Sync for Environment
impl Unpin for Environment
impl UnsafeUnpin for Environment
impl UnwindSafe for Environment
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