pub struct ApiProfile {
pub id: CompactString,
pub spawn: ApiSpawnConfig,
}Expand description
Named API profile reused by orchestrators and caches.
Profiles give a stable identifier to a spawn configuration so higher-level layers can pool, cache, or replicate work by profile name rather than by comparing full command structures.
§Examples
use corsa_client::{ApiProfile, ApiSpawnConfig};
let profile = ApiProfile::new("primary", ApiSpawnConfig::new("/opt/bin/tsgo"));
assert_eq!(profile.id.as_str(), "primary");Fields§
§id: CompactStringStable profile identifier used as the cache/fleet key.
spawn: ApiSpawnConfigSpawn configuration for workers in this profile.
Implementations§
Source§impl ApiProfile
impl ApiProfile
Sourcepub fn new(id: impl Into<CompactString>, spawn: ApiSpawnConfig) -> ApiProfile
pub fn new(id: impl Into<CompactString>, spawn: ApiSpawnConfig) -> ApiProfile
Creates a new named profile.
Trait Implementations§
Source§impl Clone for ApiProfile
impl Clone for ApiProfile
Source§fn clone(&self) -> ApiProfile
fn clone(&self) -> ApiProfile
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 moreAuto Trait Implementations§
impl Freeze for ApiProfile
impl !RefUnwindSafe for ApiProfile
impl Send for ApiProfile
impl Sync for ApiProfile
impl Unpin for ApiProfile
impl UnsafeUnpin for ApiProfile
impl !UnwindSafe for ApiProfile
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