pub struct Service { /* private fields */ }Expand description
Handle to an opened Windows service.
Implementations§
Source§impl Service
impl Service
Sourcepub fn open_with_access(name: &str, access: ServiceAccess) -> Result<Self>
pub fn open_with_access(name: &str, access: ServiceAccess) -> Result<Self>
Open a service by name with explicit access rights.
Sourcepub fn query(&self) -> Result<ServiceStatus>
pub fn query(&self) -> Result<ServiceStatus>
Query current service status.
Sourcepub fn query_with_buffer(
&self,
work_buffer: &mut Vec<u8>,
) -> Result<ServiceStatus>
pub fn query_with_buffer( &self, work_buffer: &mut Vec<u8>, ) -> Result<ServiceStatus>
Query current service status using a reusable workspace buffer.
Sourcepub fn send_control(&self, control: ServiceControl) -> Result<()>
pub fn send_control(&self, control: ServiceControl) -> Result<()>
Send a control code to the service.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Service
impl RefUnwindSafe for Service
impl !Send for Service
impl !Sync for Service
impl Unpin for Service
impl UnsafeUnpin for Service
impl UnwindSafe for Service
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