refactor(lib): export the ConnectionType parse error and document what hosts can still match
This commit is contained in:
@@ -115,6 +115,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
}
|
||||
```
|
||||
|
||||
`ServerMessage` and `ClientOperation` are `#[non_exhaustive]`: every protocol
|
||||
message the client learns to handle adds a variant, so match them with a
|
||||
wildcard arm.
|
||||
`ClientOperation` is `#[non_exhaustive]`: every protocol message the client
|
||||
learns to handle adds a variant, so match it with a wildcard arm. `SharedFile`
|
||||
is too, so build it with the `..` syntax rather than listing every field.
|
||||
|
||||
@@ -21,9 +21,7 @@ use std::sync::mpsc::{Receiver, Sender};
|
||||
use std::sync::{Arc, RwLock};
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
/// Marked non-exhaustive: each peer message the client learns adds a variant.
|
||||
#[derive(Debug, Clone)]
|
||||
#[non_exhaustive]
|
||||
pub enum PeerMessage {
|
||||
SendMessage(Message),
|
||||
FileSearchResult(SearchResult),
|
||||
|
||||
@@ -34,7 +34,7 @@ pub use actor::server_actor::{PeerAddress, UserMessage};
|
||||
pub use client::{Client, ClientSettings};
|
||||
pub use error::{Result, SoulseekRs};
|
||||
pub use message::peer::{SharedDirectory, SharedFileEntry};
|
||||
pub use peer::ConnectionType;
|
||||
pub use peer::{ConnectionType, ParseConnectionTypeError};
|
||||
pub use types::{
|
||||
ClientVersion, DownloadStatus, File, RoomEvent, RoomInfo, Search,
|
||||
SearchResult, SessionLoss, Transfer, UploadInfo, UploadStatus, UserInfo,
|
||||
|
||||
Reference in New Issue
Block a user