vibe.d beta banner
get vibe.d
0.10.1

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

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

NameDescription
this (init_val) Initializes a session var with a constant value.

Fields

NameTypeDescription
m_initValue T

Properties

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

Methods

NameDescription
opAssign (new_value)
Authors

Sönke Ludwig

Copyright

© 2013-2016 Sönke Ludwig

License

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