pub struct ServiceSpec { /* private fields */ }Expand description
Consumer-supplied desired registration.
Identity includes the exact executable path plus critical arguments and an
optional config path. Ownership compares all three: same name with a
different executable is Foreign; same executable with different critical
args is Foreign (documented rule); malformed registrations are Unknown.
Implementations§
Source§impl ServiceSpec
impl ServiceSpec
Sourcepub fn new(
id: ServiceId,
executable: PathBuf,
args: Vec<String>,
config: Option<PathBuf>,
) -> Result<Self, ServiceError>
pub fn new( id: ServiceId, executable: PathBuf, args: Vec<String>, config: Option<PathBuf>, ) -> Result<Self, ServiceError>
Creates a spec, validating the id, absolute executable, and arg safety.
§Errors
ServiceError::InvalidInput when the executable is not absolute or is
empty, when an argument contains a control character, or when the
optional config path is not absolute.
Sourcepub fn executable(&self) -> &Path
pub fn executable(&self) -> &Path
Returns the exact executable path.
Trait Implementations§
Source§impl Clone for ServiceSpec
impl Clone for ServiceSpec
Source§impl Debug for ServiceSpec
impl Debug for ServiceSpec
impl Eq for ServiceSpec
Source§impl PartialEq for ServiceSpec
impl PartialEq for ServiceSpec
impl StructuralPartialEq for ServiceSpec
Auto Trait Implementations§
impl Freeze for ServiceSpec
impl RefUnwindSafe for ServiceSpec
impl Send for ServiceSpec
impl Sync for ServiceSpec
impl Unpin for ServiceSpec
impl UnsafeUnpin for ServiceSpec
impl UnwindSafe for ServiceSpec
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