pub struct BinaryName(/* private fields */);Expand description
An installed binary’s file name, used in systemd template units
({binary}@{instance}.service) and Windows service names
({binary}-{instance}).
Limits: 1–64 bytes, ASCII graphic characters only, and none of
/, \, or @ (path and systemd-template separators). A
platform suffix such as .exe is valid.
Implementations§
Source§impl BinaryName
impl BinaryName
Sourcepub fn try_new(name: impl Into<String>) -> Result<Self, InvalidServiceValue>
pub fn try_new(name: impl Into<String>) -> Result<Self, InvalidServiceValue>
Validate and wrap a binary name.
§Errors
Returns InvalidServiceValue when the name is empty, longer
than 64 bytes, contains a non-graphic ASCII byte, or contains
/, \, or @.
Trait Implementations§
Source§impl AsRef<str> for BinaryName
impl AsRef<str> for BinaryName
Source§impl Clone for BinaryName
impl Clone for BinaryName
Source§fn clone(&self) -> BinaryName
fn clone(&self) -> BinaryName
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BinaryName
impl Debug for BinaryName
Source§impl Display for BinaryName
impl Display for BinaryName
impl Eq for BinaryName
Source§impl FromStr for BinaryName
impl FromStr for BinaryName
Source§impl Hash for BinaryName
impl Hash for BinaryName
Source§impl PartialEq for BinaryName
impl PartialEq for BinaryName
impl StructuralPartialEq for BinaryName
Auto Trait Implementations§
impl Freeze for BinaryName
impl RefUnwindSafe for BinaryName
impl Send for BinaryName
impl Sync for BinaryName
impl Unpin for BinaryName
impl UnsafeUnpin for BinaryName
impl UnwindSafe for BinaryName
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