#[repr(C)]pub struct _EJDB_HTTP {
pub enabled: bool,
pub port: c_int,
pub bind: *const c_char,
pub access_token: *const c_char,
pub access_token_len: size_t,
pub blocking: bool,
pub read_anon: bool,
pub max_body_size: size_t,
pub cors: bool,
pub ssl_private_key: *const c_char,
pub ssl_certs: *const c_char,
}Expand description
@brief EJDB HTTP/Websocket Server options.
Fields§
§enabled: bool< If HTTP/Websocket endpoint enabled. Default: false
port: c_int< Listen port number, required
bind: *const c_char< Listen IP/host. Default: localhost
access_token: *const c_char< Server access token passed in X-Access-Token header. Default: zero
access_token_len: size_t< Length of access token string. Default: zero
blocking: bool< Block ejdb_open() thread until http service finished.
Otherwise HTTP server will be started in background.
read_anon: bool< Allow anonymous read-only database access
max_body_size: size_t< Maximum WS/HTTP API body size. Default: 64Mb, Min: 512K
cors: bool< Allow CORS
ssl_private_key: *const c_char< Path to TLS 1.2 private key PEM
ssl_certs: *const c_char< Path to TLS 1.2 certificates
Trait Implementations§
Source§impl Clone for _EJDB_HTTP
impl Clone for _EJDB_HTTP
Source§fn clone(&self) -> _EJDB_HTTP
fn clone(&self) -> _EJDB_HTTP
Returns a copy 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 _EJDB_HTTP
impl Debug for _EJDB_HTTP
impl Copy for _EJDB_HTTP
Auto Trait Implementations§
impl Freeze for _EJDB_HTTP
impl RefUnwindSafe for _EJDB_HTTP
impl !Send for _EJDB_HTTP
impl !Sync for _EJDB_HTTP
impl Unpin for _EJDB_HTTP
impl UnwindSafe for _EJDB_HTTP
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