Skip to content

ServiceAccessMask

Access rights for a Service handle.

A mask is built from symbols, and every API taking one also accepts a bare symbol or an iterable of symbols in its place, so an explicit ServiceAccessMask is only needed to combine or inspect rights.

winscm.ServiceAccessMask is a security.windows.AccessMask, so it can be used wherever a Windows access mask is expected.

Example

let a = ServiceAccessMask :SERVICE_START: :SERVICE_STOP:
let b = ServiceAccessMask [:SERVICE_START:, :SERVICE_STOP:]

Inherits from: security.windows.AccessMask

Constructor

ServiceAccessMask ...flags -> ServiceAccessMask overload 1 of 2

Constructs a flag set from symbols.

Parameters

NameTypeDescription
...flags ServiceAccessRight

ServiceAccessMask flags -> ServiceAccessMask overload 2 of 2

Constructs a flag set from one iterable of symbols.

Parameters

NameTypeDescription
flags Iterable[ServiceAccessRight]

Class Methods

from_int value -> ServiceAccessMask

Builds a mask from a native integer, preserving every bit including ones this type does not name.

Parameters

NameTypeDescription
value Int Native Windows access mask.

Fields

int @ Int [get]

The complete native mask as an Int, including bits this type does not name.

Methods

contains flag -> Bool

Tests whether all flags named by flag are set.

Parameters

NameTypeDescription
flag ServiceAccessRight