pub struct Service {
pub id: String,
pub name: String,
pub tenant_id: String,
pub file_path: Option<String>,
/* private fields */
}Expand description
Represents a service on the server
Fields§
§id: String§name: String§tenant_id: String§file_path: Option<String>Implementations§
Source§impl Service
impl Service
Sourcepub fn new(
id: String,
name: String,
tenant_id: String,
file_path: Option<String>,
) -> Self
pub fn new( id: String, name: String, tenant_id: String, file_path: Option<String>, ) -> Self
Create a new service instance
Sourcepub fn supports_memory_mapping(&self) -> bool
pub fn supports_memory_mapping(&self) -> bool
Check if this service supports direct memory mapping
Sourcepub fn add_variable(&mut self, meta: VariableMetadata)
pub fn add_variable(&mut self, meta: VariableMetadata)
Add variable metadata
Sourcepub fn get_variable(&self, name: &str) -> Option<&VariableMetadata>
pub fn get_variable(&self, name: &str) -> Option<&VariableMetadata>
Get variable metadata
Sourcepub fn variables(&self) -> &HashMap<String, VariableMetadata>
pub fn variables(&self) -> &HashMap<String, VariableMetadata>
List all variables
Sourcepub fn clear_variables(&mut self)
pub fn clear_variables(&mut self)
Clear variable cache
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Service
impl RefUnwindSafe for Service
impl Send for Service
impl Sync for Service
impl Unpin for Service
impl UnsafeUnpin for Service
impl UnwindSafe for Service
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