pub struct HttpConfig {
pub port: u16,
pub host: String,
pub max_message_size: usize,
pub enable_cors: bool,
pub allowed_origins: Option<Vec<String>>,
pub validate_messages: bool,
pub session_timeout_secs: u64,
pub require_auth: bool,
pub valid_tokens: Vec<String>,
}Expand description
Configuration for HTTP transport
Fields§
§port: u16Port to bind to
host: StringHost to bind to (default: localhost)
max_message_size: usizeMaximum message size in bytes
enable_cors: boolEnable CORS
allowed_origins: Option<Vec<String>>Allowed origins (None = allow any)
validate_messages: boolEnable message validation
session_timeout_secs: u64Session timeout in seconds
require_auth: boolEnable authentication
valid_tokens: Vec<String>Valid bearer tokens (for testing)
Trait Implementations§
Source§impl Clone for HttpConfig
impl Clone for HttpConfig
Source§fn clone(&self) -> HttpConfig
fn clone(&self) -> HttpConfig
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 HttpConfig
impl Debug for HttpConfig
Auto Trait Implementations§
impl Freeze for HttpConfig
impl RefUnwindSafe for HttpConfig
impl Send for HttpConfig
impl Sync for HttpConfig
impl Unpin for HttpConfig
impl UnwindSafe for HttpConfig
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