Skip to content

Latest commit

 

History

History
 
 

user

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

slippi-user

This crate implements authentication handling and user management for players. It consists of three main components:

UserManager

A thread-safe type that can be freely cloned and passed around. This can be used to access the current user, and internally manages the process(es) for locating and finding the user.json file that signals whether a user is authenticated.

This internally is Arcs throughout, so you don't need to wrap it in an Arc yourself if you're storing it elsewhere.

UserInfo

A type that reflects various user properties. You can retrieve a reference to the current user by doing:

// Call `.get()` to glob properties from the current user.
let play_key = user_manager.get(|user| {
    user.play_key.clone()
});

UserInfoWatcher

The background thread that manages watching for and parsing user.json files.