pub struct Session<Capability, Avatar, Land, UdpSocket> {Show 13 fields
pub address: String,
pub agent_id: Uuid,
pub session_id: Uuid,
pub socket: Option<Arc<UdpSocket>>,
pub sequence_number: u16,
pub local_ip: IpAddr,
pub seed_capability_url: String,
pub capability_urls: HashMap<Capability, String>,
pub inventory_data: InventoryData,
pub environment_cache: EnvironmentCache<Land>,
pub avatars: HashMap<Uuid, Avatar>,
pub region_data: RegionData,
pub inventory_db_connection: Pool<Sqlite>,
}Expand description
Message and struct for the current user’s session.
This includes all data that will be used throughout the session, and much of it is populated by the LoginResponse packet. This sets the active session for the Mailbox, and ensures the UDP socket doesn’t close.
§Cause
- A login is triggered by the UI, and the handle_login function is called
§Effects
- Starts UDP read between client and server
Fields§
§address: Stringaddress of the server the client is connected to. formatted http://Url:Socket
agent_id: Uuidagent ID of the user
session_id: Uuidsession ID of the user
socket: Option<Arc<UdpSocket>>the running UDP socket attached to the session
sequence_number: u16The sequence number of the packets sent. Created as a simple count from the core to the server.
local_ip: IpAddrThe local IP that the login is sent from. This is stored to ensure the IP of the UseCircuitCode packet is sent from the same IP as the login, to prevent server errors.
seed_capability_url: StringThe URL endpoint to request more capabilities
capability_urls: HashMap<Capability, String>The HashMap for storing capability URLs
inventory_data: InventoryDatainventory details retrieved from initial login
environment_cache: EnvironmentCache<Land>The environment cache. Contains things for handling and generating the environment.
avatars: HashMap<Uuid, Avatar>The agent list. Contains information about the appearances of all loaded agents
region_data: RegionDatadata about the region the user is currently in
inventory_db_connection: Pool<Sqlite>the connection to the inventory sqlite DB this stores folder data and inventory metadata
Trait Implementations§
Auto Trait Implementations§
impl<Capability, Avatar, Land, UdpSocket> !RefUnwindSafe for Session<Capability, Avatar, Land, UdpSocket>
impl<Capability, Avatar, Land, UdpSocket> !UnwindSafe for Session<Capability, Avatar, Land, UdpSocket>
impl<Capability, Avatar, Land, UdpSocket> Freeze for Session<Capability, Avatar, Land, UdpSocket>
impl<Capability, Avatar, Land, UdpSocket> Send for Session<Capability, Avatar, Land, UdpSocket>
impl<Capability, Avatar, Land, UdpSocket> Sync for Session<Capability, Avatar, Land, UdpSocket>
impl<Capability, Avatar, Land, UdpSocket> Unpin for Session<Capability, Avatar, Land, UdpSocket>
impl<Capability, Avatar, Land, UdpSocket> UnsafeUnpin for Session<Capability, Avatar, Land, UdpSocket>where
Option<Arc<UdpSocket>>: UnsafeUnpin,
HashMap<Capability, String>: UnsafeUnpin,
EnvironmentCache<Land>: UnsafeUnpin,
HashMap<Uuid, Avatar>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more