pub struct Config {
pub write: bool,
pub write_token: String,
pub allow_origins: Vec<String>,
pub hosts: Vec<String>,
pub throttle: Duration,
pub max_per_ip: usize,
pub ping: Duration,
}Fields§
§write: boolAccept write messages.
write_token: StringThe token every write message must carry.
allow_origins: Vec<String>Origins other than the server’s own whose pages may connect,
e.g. https://host.example.com.
hosts: Vec<String>Names browsers may use for this server, besides IP addresses,
localhost, this machine’s name and the hosts of allow_origins;
checked against Host to stop DNS rebinding.
throttle: DurationLeast time between two rounds of updates to one client; a PV that changes faster sends only its latest state.
max_per_ip: usizeMost clients connected at once from one address.
ping: DurationHow often to ping a client; one that has said nothing for two intervals is dropped.
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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