pub struct ConnectionConfig<T> {
pub protocol_id: u32,
pub timeout_period: Duration,
pub packet_deserializer: fn(&Vec<u8>) -> Option<T>,
pub packet_serializer: fn(&T) -> Vec<u8>,
}
General configuration for a connection
Fields
protocol_id | A shared ID to identify whether a connection should be accepted
|
timeout_period | How long we should wait before hanging up
|
packet_deserializer | A function to turn raw data into our packet format
|
packet_serializer | A function to turn a packet into raw data
|
Methods
Keyboard shortcuts
- ?
- Show this help dialog
- S
- Focus the search field
- ⇤
- Move up in search results
- ⇥
- Move down in search results
- ⏎
- Go to active search result
Search tricks
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
, enum
,
trait
, typedef
(or
tdef
).