aboutsummaryrefslogtreecommitdiff
path: root/src/model/user.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Allow compiling with only either cache or methodsAustin Hellyer2016-11-241-2/+8
| | | | | | | | | Some of the methods relied on the cache being present. Now, these methods only conditionally require the cache to be compiled and present. The cache was mainly used for checking if the current user had permission to perform operations.
* Change the CACHE to be an RwLockAustin Hellyer2016-11-221-2/+2
| | | | | | | | | | | | | | | | | | The global Cache used to be an Arc<Mutex>, however the issue is that it could only be opened for reading or writing once at a time. With an RwLock, multiple readers can access the Cache at once, while only one Writer may at once. This will allow users to be able to have multiple Readers open at once, which should ease some of the pains with working with the Cache. Upgrade path: Modify all uses of the CACHE from: `CACHE.lock().unwrap()` to `CACHE.read().unwrap()` if reading from the Cache (most use cases), or `CACHE.write().unwrap()` to write to it.
* Rename the State to CacheAustin Hellyer2016-11-221-11/+11
|
* Don't unnecessarily borrow some if-letsAustin Hellyer2016-11-211-2/+2
|
* Add created_at method to Ids and UserAustin Hellyer2016-11-211-0/+9
| | | | Returns a Timespec of when the Id (or User) was created.
* Rename state methods from find_ to get_Austin Hellyer2016-11-191-1/+1
| | | | | | | | | | For consistency with the rest of the library, rename the methods prefixed with `find_` to `get_`. The past logic was that items are "found", as they may or may not exist. With get, the expectation is that it is _always_ there, i.e. over REST. However, this is inconsistent, and "get"ting over REST can fail for other reasons.
* Fix cond. compile across multiple feature targetsAustin Hellyer2016-11-191-2/+2
| | | | | | | | Fixes conditional compilation across multiple combinations of feature targets, where it was assumed a second feature would be enabled by something that requires a feature to be enabled. This also fixes an EOF compilation error on no-feature builds.
* Add send_message rich embedsAustin Hellyer2016-11-151-1/+10
|
* Add state/framework/etc. conditional compile flagsAustin Hellyer2016-11-151-6/+19
| | | | | | | | | | | | | | | This adds conditional compilation for the following features, in addition to the voice conditional compilation flag: - extras (message builder) - framework - methods - state These 4 are enabled _by default_, while the `voice` feature flag is disabled. Disabling the state will allow incredibly low-memory bots.
* Add internal moduleAustin Hellyer2016-11-141-1/+1
| | | | | Create a general `internal` module, and move `prelude_internal` to `internal::prelude`.
* Add some more documentationAustin Hellyer2016-11-061-1/+1
|
* Add a prelude for userlandAustin Hellyer2016-11-051-1/+1
| | | | | | | Users can now import all of a prelude via `use serenity::prelude::*;`, which should provide some helpful stuff. As such, the internal prelude is now named `serenity::prelude_internal`, and all internal uses have been adjusted.
* Initial commitAustin Hellyer2016-10-181-0/+146