vibe.d beta banner
get vibe.d
0.7.30

Function SessionVar.this

Initializes a session var with a constant value.

Prototype

this(
  T init_val
);

Example

class MyService {
	SessionVar!(int, "someInt") m_someInt = 42;

	void index() {
		assert(m_someInt == 42);
	}
}

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.