pub struct DepartmentId(/* private fields */);Expand description
A human-readable identifier for a department or actor group.
Department identifiers use string labels (e.g. "engineering", "ops")
rather than UUIDs, so that task routing rules are human-readable in
configuration and WAL events.
§Invariants
- The identifier string must be non-empty.
- The identifier string must not exceed 128 characters.
- Validated at construction; never stores an invalid value.
Implementations§
Source§impl DepartmentId
impl DepartmentId
Sourcepub fn new(value: impl Into<String>) -> Result<Self, DepartmentIdError>
pub fn new(value: impl Into<String>) -> Result<Self, DepartmentIdError>
Creates a new DepartmentId from a string value.
§Errors
Returns DepartmentIdError::Empty if value is empty.
Returns DepartmentIdError::TooLong if value exceeds 128 characters.
Trait Implementations§
Source§impl Clone for DepartmentId
impl Clone for DepartmentId
Source§fn clone(&self) -> DepartmentId
fn clone(&self) -> DepartmentId
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 moreSource§impl Debug for DepartmentId
impl Debug for DepartmentId
Source§impl Display for DepartmentId
impl Display for DepartmentId
Source§impl Hash for DepartmentId
impl Hash for DepartmentId
Source§impl PartialEq for DepartmentId
impl PartialEq for DepartmentId
impl Eq for DepartmentId
impl StructuralPartialEq for DepartmentId
Auto Trait Implementations§
impl Freeze for DepartmentId
impl RefUnwindSafe for DepartmentId
impl Send for DepartmentId
impl Sync for DepartmentId
impl Unpin for DepartmentId
impl UnsafeUnpin for DepartmentId
impl UnwindSafe for DepartmentId
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