Skip to main content

soulseek_rs/
lib.rs

1// The README is the crate's front page, and `cargo test --doc` compiles every
2// example in it, so a signature change cannot leave the advertised usage stale.
3#![doc = include_str!("../README.md")]
4
5// Core modules
6pub mod actor;
7pub mod client;
8pub mod dispatcher;
9pub mod download_store;
10pub mod error;
11pub mod message;
12pub mod peer;
13pub mod shares;
14pub mod types;
15#[macro_use]
16pub mod utils;
17
18// Prelude module for commonly used items
19pub mod prelude {
20    pub use crate::actor::server_actor::PeerAddress;
21    pub use crate::types::{
22        ClientVersion, DownloadStatus, File, RoomEvent, RoomInfo, Search,
23        SearchResult, Transfer, UploadInfo, UploadStatus, UserInfo,
24        UserPresence, UserStats, UserStatus,
25    };
26    pub use crate::{debug, error, info, trace, warn};
27}
28
29// Re-export commonly used types
30pub use actor::server_actor::{PeerAddress, UserMessage};
31pub use client::{Client, ClientSettings};
32pub use error::{Result, SoulseekRs};
33pub use message::peer::SharedDirectory;
34pub use types::{
35    ClientVersion, DownloadStatus, File, RoomEvent, RoomInfo, Search,
36    SearchResult, SessionLoss, Transfer, UploadInfo, UploadStatus, UserInfo,
37    UserPresence, UserStats, UserStatus,
38};