Struct DiscordIPCSync
Source pub struct DiscordIPCSync { }
Expand description
examples/indefinite-sync.rs (
line 4)
3fn main() {
4 let mut client = DiscordIPCSync::new("1463450870480900160").unwrap();
5
6 client.run().unwrap();
7 client.set_activity("this runs", "forever").unwrap();
8 client.wait().unwrap();
9}
More examples
Hide additional examples
examples/timed-sync.rs (
line 6)
5fn main() {
6 let mut client = DiscordIPCSync::new("1463450870480900160").unwrap();
7
8 client.run().unwrap();
9
10 client.set_activity("this runs", "for ten seconds").unwrap();
11 sleep(Duration::from_secs(5));
12 client.set_activity("believe it", "or not").unwrap();
13 sleep(Duration::from_secs(5));
14}
examples/indefinite-sync.rs (
line 6)
3fn main() {
4 let mut client = DiscordIPCSync::new("1463450870480900160").unwrap();
5
6 client.run().unwrap();
7 client.set_activity("this runs", "forever").unwrap();
8 client.wait().unwrap();
9}
More examples
Hide additional examples
examples/timed-sync.rs (
line 8)
5fn main() {
6 let mut client = DiscordIPCSync::new("1463450870480900160").unwrap();
7
8 client.run().unwrap();
9
10 client.set_activity("this runs", "for ten seconds").unwrap();
11 sleep(Duration::from_secs(5));
12 client.set_activity("believe it", "or not").unwrap();
13 sleep(Duration::from_secs(5));
14}
examples/indefinite-sync.rs (
line 8)
3fn main() {
4 let mut client = DiscordIPCSync::new("1463450870480900160").unwrap();
5
6 client.run().unwrap();
7 client.set_activity("this runs", "forever").unwrap();
8 client.wait().unwrap();
9}
examples/indefinite-sync.rs (
line 7)
3fn main() {
4 let mut client = DiscordIPCSync::new("1463450870480900160").unwrap();
5
6 client.run().unwrap();
7 client.set_activity("this runs", "forever").unwrap();
8 client.wait().unwrap();
9}
More examples
Hide additional examples
5fn main() {
6 let mut client = DiscordIPCSync::new("1463450870480900160").unwrap();
7
8 client.run().unwrap();
9
10 client.set_activity("this runs", "for ten seconds").unwrap();
11 sleep(Duration::from_secs(5));
12 client.set_activity("believe it", "or not").unwrap();
13 sleep(Duration::from_secs(5));
14}
Formats the value using the given formatter.
Read more
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.