pub struct ServiceInstance(/* private fields */);Expand description
A service-instance discriminator (a port, an identity key, …), appended to every label format.
Limits: 1–128 bytes, ASCII graphic characters only, and none of
/, \, or @ (path and systemd-template separators).
Implementations§
Source§impl ServiceInstance
impl ServiceInstance
Sourcepub fn try_new(instance: impl Into<String>) -> Result<Self, InvalidServiceValue>
pub fn try_new(instance: impl Into<String>) -> Result<Self, InvalidServiceValue>
Validate and wrap an instance discriminator.
§Errors
Returns InvalidServiceValue when the instance is empty,
longer than 128 bytes, contains a non-graphic ASCII byte, or
contains /, \, or @.
Trait Implementations§
Source§impl AsRef<str> for ServiceInstance
impl AsRef<str> for ServiceInstance
Source§impl Clone for ServiceInstance
impl Clone for ServiceInstance
Source§impl Debug for ServiceInstance
impl Debug for ServiceInstance
Source§impl Display for ServiceInstance
impl Display for ServiceInstance
impl Eq for ServiceInstance
Source§impl From<u16> for ServiceInstance
impl From<u16> for ServiceInstance
Source§impl FromStr for ServiceInstance
impl FromStr for ServiceInstance
Source§impl Hash for ServiceInstance
impl Hash for ServiceInstance
Source§impl PartialEq for ServiceInstance
impl PartialEq for ServiceInstance
impl StructuralPartialEq for ServiceInstance
Auto Trait Implementations§
impl Forget for ServiceInstance
impl Freeze for ServiceInstance
impl Move for ServiceInstance
impl RefUnwindSafe for ServiceInstance
impl Send for ServiceInstance
impl Sync for ServiceInstance
impl Unpin for ServiceInstance
impl UnsafeUnpin for ServiceInstance
impl UnwindSafe for ServiceInstance
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