vibe.d beta banner
get vibe.d
0.7.30

Struct SessionVar

Maps a web interface member variable to a session field.

struct SessionVar(T, string name);

Setting a SessionVar variable will implicitly start a session, if none has been started yet. The content of the variable will be stored in the session store and is automatically serialized and deserialized.

Note that variables of type SessionVar must only be used from within handler functions of a class that was registered using registerWebInterface. Also note that two different session variables with the same name parameter will access the same underlying data.

Constructors

Constructors

NameDescription
thisInitializes a session var with a constant value.

Fields

Fields

NameTypeDescription
m_initValueT

Properties

Properties

NameTypeDescription
value[get, set]const(T)Accesses the current value of the session variable.

Methods

Methods

NameDescription
opAssign
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.