True if the member field exists
import bolts.traits: ProtectionLevel, PropertySemantics; static struct S { public int publicI; protected int protectedI; private @property int readPropI() { return protectedI; } } // Check the protection level of various members static assert(member!(S, "publicI").protection == ProtectionLevel.public_); static assert(member!(S, "protectedI").protection == ProtectionLevel.protected_); static assert(member!(S, "readPropI").protection == ProtectionLevel.private_); // Check if any are properties static assert(!member!(S, "na").isProperty); static assert(!member!(S, "publicI").isProperty); static assert( member!(S, "readPropI").isProperty); // Check their semantics static assert(member!(S, "readPropI").propertySemantics == PropertySemantics.r);
Used to extract details about a specific member
Available member traits: