pub struct Slot(/* private fields */);Expand description
Logical identifier for a controller slot.
A slot groups tasks that share a single execution lane.
Slot: "build-pipeline" Slot: "deploy"
┌───────────────────────┐ ┌────────────────────────┐
│ TaskId: sub-build-1 │ │ TaskId: sub-deploy-1 │
│ TaskId: sub-build-2 │ │ TaskId: sub-deploy-2 │
│ TaskId: sub-build-3 │ │ TaskId: sub-deploy-3 │
│ ... │ │ ... │
└───────────────────────┘ └────────────────────────┘
one lane one lane
(one at a time) (one at a time)use solti_model::Slot;
let slot = Slot::new("build-pipeline");
assert_eq!(slot.as_str(), "build-pipeline");
let slot: Slot = "deploy".into();
assert_eq!(format!("{slot}"), "deploy");Implementations§
Source§impl Slot
impl Slot
Sourcepub fn validate_format(&self) -> Result<(), ModelError>
pub fn validate_format(&self) -> Result<(), ModelError>
Validate that the slot name is safe to use across the SDK.
See [validate_identity] for the exact rules.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Slot
impl<'de> Deserialize<'de> for Slot
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Slot
impl Ord for Slot
Source§impl PartialOrd for Slot
impl PartialOrd for Slot
impl Eq for Slot
impl StructuralPartialEq for Slot
Auto Trait Implementations§
impl Freeze for Slot
impl RefUnwindSafe for Slot
impl Send for Slot
impl Sync for Slot
impl Unpin for Slot
impl UnsafeUnpin for Slot
impl UnwindSafe for Slot
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