pub struct EngineConfig {
pub port: u16,
pub device_name: String,
pub download_dir: PathBuf,
pub trusted_hosts: Vec<String>,
pub receive_only: bool,
pub max_retries: u32,
pub retry_delay_ms: u64,
pub bandwidth_limit_bps: Option<u64>,
}Expand description
Engine configuration
Fields§
§port: u16Port for the HTTP server (default: 53317)
device_name: StringDevice name shown to peers
download_dir: PathBufDefault download directory
trusted_hosts: Vec<String>Trusted hosts that auto-accept transfers
receive_only: boolReceive-only mode (disable sending)
max_retries: u32Maximum number of retry attempts for transient failures (default: 3)
retry_delay_ms: u64Base delay between retries in milliseconds (default: 1000) Actual delay uses exponential backoff: delay * 2^attempt
bandwidth_limit_bps: Option<u64>Optional bandwidth limit in bytes per second (None = unlimited)
Implementations§
Source§impl EngineConfig
impl EngineConfig
Sourcepub fn builder() -> EngineConfigBuilder
pub fn builder() -> EngineConfigBuilder
Create a builder for more ergonomic configuration
Trait Implementations§
Source§impl Clone for EngineConfig
impl Clone for EngineConfig
Source§fn clone(&self) -> EngineConfig
fn clone(&self) -> EngineConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EngineConfig
impl Debug for EngineConfig
Auto Trait Implementations§
impl Freeze for EngineConfig
impl RefUnwindSafe for EngineConfig
impl Send for EngineConfig
impl Sync for EngineConfig
impl Unpin for EngineConfig
impl UnwindSafe for EngineConfig
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