diff options
| author | Austin Hellyer <[email protected]> | 2016-11-15 11:36:53 -0800 |
|---|---|---|
| committer | Austin Hellyer <[email protected]> | 2016-11-15 11:36:53 -0800 |
| commit | 5ccfaaa3b1a030b1fd0dcd364bdae001347d36e4 (patch) | |
| tree | 7cf531e4790109d6d7edd26bc5b483378d5ba5ac /src/model/gateway.rs | |
| parent | Embed Author: everything but 'name' is optional (diff) | |
| download | serenity-5ccfaaa3b1a030b1fd0dcd364bdae001347d36e4.tar.xz serenity-5ccfaaa3b1a030b1fd0dcd364bdae001347d36e4.zip | |
Add state/framework/etc. conditional compile flags
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.
Diffstat (limited to 'src/model/gateway.rs')
| -rw-r--r-- | src/model/gateway.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/model/gateway.rs b/src/model/gateway.rs index aa3d995..1a286af 100644 --- a/src/model/gateway.rs +++ b/src/model/gateway.rs @@ -734,6 +734,7 @@ impl Event { } impl Game { + #[cfg(feature="methods")] pub fn playing(name: String) -> Game { Game { kind: GameType::Playing, @@ -742,6 +743,7 @@ impl Game { } } + #[cfg(feature="methods")] pub fn streaming(name: String, url: String) -> Game { Game { kind: GameType::Streaming, @@ -750,6 +752,7 @@ impl Game { } } + #[doc(hidden)] pub fn decode(value: Value) -> Result<Option<Game>> { let mut map = try!(into_map(value)); @@ -771,6 +774,7 @@ impl Game { } impl Presence { + #[doc(hidden)] pub fn decode(value: Value) -> Result<Presence> { let mut value = try!(into_map(value)); let mut user_map = try!(remove(&mut value, "user").and_then(into_map)); |