#[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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.