pub struct Config {
pub bind_to: SocketAddr,
pub enable_websocket: bool,
pub ip_whitelist: Option<HashSet<IpAddr>>,
pub basic_auth: Option<Credentials>,
pub cors: Option<Cors>,
}
Expand description
The server configuration
#TODO
- allowed methods
Fields§
§bind_to: SocketAddr
Bind server to specified hostname and port.
enable_websocket: bool
Enable JSON-RPC over websocket at /ws
.
ip_whitelist: Option<HashSet<IpAddr>>
Allowed IPs. If None
, all source IPs are allowed.
basic_auth: Option<Credentials>
Username and password for HTTP basic authentication.
cors: Option<Cors>
Cross-Origin Resource Sharing configuration
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Config
impl !RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin 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