#[non_exhaustive]pub struct ServerConfig {
pub block_check: BlockCheck,
pub eight_bit_clean: bool,
pub timeout: Duration,
pub retries: u32,
pub packet_pause: Duration,
pub max_size: Option<usize>,
}Expand description
Tunables of a Server.
Non-exhaustive: start from ServerConfig::default and set the fields
you need.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.block_check: BlockCheckBlock check we accept in our answer to the client’s Send-Init (default type 3; the client’s own choice wins when it asks for less).
eight_bit_clean: booltrue (default): QBIN Y, no 8th-bit prefixing unless the client
asks; false: we ask for it with &.
timeout: DurationInside a transaction: how long we wait for the client’s next packet before we resend (or NAK) (default 10 s, the 38G’s own TIME).
retries: u32Resends (or NAKs) per packet before the transaction fails (default 5).
packet_pause: DurationDelay before each packet we send in reply to input (default 0).
max_size: Option<usize>Most decoded data bytes accepted in one receive transaction; more
fails it with Error::TooLarge and an E packet. Default 4 MiB;
None means no limit.
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§impl Debug for ServerConfig
impl Debug for ServerConfig
Auto Trait Implementations§
impl Forget for ServerConfig
impl Freeze for ServerConfig
impl Move for ServerConfig
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnsafeUnpin for ServerConfig
impl UnwindSafe for ServerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more