vibe.d beta banner
get vibe.d
0.10.1

Asynchronous I/O that doesn’t get in your way, written in D

Function optional

Attribute marking a field as optional during deserialization.

OptionalAttribute!Policy optional(alias Policy)() @property;

Example

struct Test {
	// does not need to be present during deserialization
	@optional int screenSize = 100;
}
Authors

Sönke Ludwig

Copyright

© 2013-2016 rejectedsoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.