kameloso.traits

Various traits that are too kameloso-specific to be in lu.

They generally deal with lengths of aggregate member names, used to format output and align columns for kameloso.printing.printObject.

More of our homebrewn traits were deemed too generic to be in kameloso and were moved to lu.traits instead.

Members

Aliases

longestMemberNames
alias longestMemberNames(Things...) = longestMemberNamesImpl!(No.unserialisable, Things)

Introspects one or more aggregate types and determines the name of the longest member found between them, as well as the name of the longest type. Ignores Unserialisable members.

longestUnserialisableMemberNames
alias longestUnserialisableMemberNames(Things...) = longestMemberNamesImpl!(Yes.unserialisable, Things)

Introspects one or more aggregate types and determines the name of the longest member found between them, as well as the name of the longest type. Includes Unserialisable members.

Enums

udaIndexOf
eponymoustemplate udaIndexOf(alias symbol, T)

Returns the index of a given UDA, as annotated on a symbol.

Functions

memberstringIsThisCtorOrDtor
auto memberstringIsThisCtorOrDtor(string memberstring)

Returns whether or not the member name of an aggregate has the special name this, __ctor or __dtor.

Mixin templates

UnderscoreOpDispatcher
mixintemplate UnderscoreOpDispatcher()

Mixin template mixing in an opDispatch redirecting calls to members whose names match the passed variable string but with an underscore prepended.

Templates

memberIsMutable
template memberIsMutable(Thing, string memberstring)

As the name suggests, aliases itself to true if the passed member of the passed aggregate Thing is mutable, which includes that it's not an enum.

memberIsValue
template memberIsValue(Thing, string memberstring)

Aliases itself to true if the passed member of the passed aggregate is a value and not a type, a function, a template or an enum.

memberIsVisibleAndNotDeprecated
template memberIsVisibleAndNotDeprecated(Thing, string memberstring)

Eponymous template; aliases itself to true if the passed member of the passed aggregate Thing is not private and not deprecated.

See Also

Meta