Improved documentation comments

- Reformat
- Added warning against usage of direct DBusAny constructor in user code
This commit is contained in:
Harry T. Vennik 2017-11-04 12:57:55 +01:00
parent 0570898602
commit c015f0ce15

View file

@ -175,15 +175,24 @@ struct DBusAny {
ubyte[] binaryData;
}
/// Manually creates a DBusAny object using a type, signature and implicit specifier.
/++
Manually creates a DBusAny object using a type, signature and explicit
variant specifier.
Direct use of this constructor from user code should be avoided.
+/
this(int type, string signature, bool explicit) {
this.type = type;
this.signature = signature;
this.explicitVariant = explicit;
}
/// Automatically creates a DBusAny object with fitting parameters from a D type or Variant!T.
/// Pass a `Variant!T` to make this an explicit variant.
/++
Automatically creates a DBusAny object with fitting parameters from a D
type or Variant!T.
Pass a `Variant!T` to make this an explicit variant.
+/
this(T)(T value) {
static if (is(T == byte) || is(T == ubyte)) {
this(typeCode!byte, null, false);