Resource

session

No description available.

resource session;

F id

id: func() -> string;

Get the session ID.

F get

get: func(key: string) -> result​<option​<list​<u8>>, session-error>;

Get a persistent session context value by key.

F set

set: func(key: string, value: list​<u8>) -> result​<_, session-error>;

Set a persistent session context value by key.

F terminate

terminate: func(reason: option​<string>) -> result​<_, session-error>;

Terminate the session, optionally providing a reason. is-active will return false after termination.

Data associated with the terminated session is NOT deleted. Use delete() to remove all session data.

Subsequent calls will have no effect.

F is-terminated

is-terminated: func() -> result​<bool, session-error>;

Check if the session is terminated. Returns true if the session has been terminated.