pub struct Config {Show 27 fields
pub ocpp_listen: Option<SocketAddr>,
pub ocpp_tls_listen: Option<SocketAddr>,
pub tls: Option<TlsSettings>,
pub cso_name: Option<String>,
pub max_connections: usize,
pub api_listen: SocketAddr,
pub database_url: String,
pub database_max_connections: u32,
pub node_id: String,
pub versions: Vec<OcppVersion>,
pub heartbeat_interval: Duration,
pub call_timeout: Duration,
pub ping_interval: Duration,
pub max_message_size: usize,
pub ws_deflate: bool,
pub ws_force_client_no_context_takeover: bool,
pub require_password: bool,
pub authorize_unknown_tokens: bool,
pub api_token: Option<String>,
pub command_queue_size: usize,
pub auth_concurrency: usize,
pub nominal_voltage: f64,
pub ev_charging_needs: bool,
pub allow_bidirectional: bool,
pub reservation_sweep_interval: Duration,
pub default_timezone: String,
pub zoneinfo_dir: PathBuf,
}Fields§
§ocpp_listen: Option<SocketAddr>Plain (unencrypted) listener for charging stations; none disables it. Env: OCPP_LISTEN.
ocpp_tls_listen: Option<SocketAddr>TLS listener for charging stations (Security Profiles 2 and 3). Env: OCPP_TLS_LISTEN.
tls: Option<TlsSettings>Env: OCPP_TLS_CERT/OCPP_TLS_KEY (+ optional OCPP_TLS_CERT2/OCPP_TLS_KEY2),
OCPP_TLS_CLIENT_CA, OCPP_TLS_CIPHERS.
cso_name: Option<String>CSO name expected in the O RDN of station certificates (A00.FR.404). Env: OCPP_CSO_NAME.
max_connections: usizeMaximum concurrent station connections per listener. Env: OCPP_MAX_CONNECTIONS.
api_listen: SocketAddrListener for the internal HTTP API. Env: API_LISTEN.
database_url: StringEnv: DATABASE_URL.
database_max_connections: u32Env: DATABASE_MAX_CONNECTIONS.
node_id: StringIdentifies this instance in the charging_stations.connected_node column. Env: NODE_ID.
versions: Vec<OcppVersion>OCPP versions offered to stations. Env: OCPP_VERSIONS (e.g. 1.6,2.0.1,2.1).
heartbeat_interval: DurationHeartbeat interval returned in BootNotification responses. Env: HEARTBEAT_INTERVAL_SECS.
call_timeout: DurationTimeout for CSMS-initiated calls. Env: CALL_TIMEOUT_SECS.
ping_interval: DurationServer-side WebSocket ping interval when the link is idle; 0 disables. Env: PING_INTERVAL_SECS.
max_message_size: usizeEnv: MAX_MESSAGE_SIZE (bytes).
ws_deflate: boolRFC 7692 permessage-deflate. Env: WS_DEFLATE.
ws_force_client_no_context_takeover: boolImpose client_no_context_takeover to save memory. Env: WS_FORCE_CLIENT_NO_CONTEXT_TAKEOVER.
require_password: boolReject stations that have no password configured (Security Profile ≥ 1 everywhere). Env: OCPP_REQUIRE_PASSWORD.
Accept id tokens that are not in the database. Env: AUTHORIZE_UNKNOWN_TOKENS.
api_token: Option<String>Bearer token required by the HTTP API, if set. Env: API_TOKEN.
command_queue_size: usizeMax queued commands per station connection. Env: COMMAND_QUEUE_SIZE.
auth_concurrency: usizeMax concurrent password verifications (argon2 is memory-hard). Env: AUTH_CONCURRENCY.
nominal_voltage: f64Nominal phase voltage used to convert A ↔ W in composite schedules. Env: NOMINAL_VOLTAGE.
ev_charging_needs: boolAnswer ISO 15118 NotifyEVChargingNeeds with a TxProfile (K15–K19). Env: SMART_CHARGING_EV_NEEDS.
allow_bidirectional: boolAccept bidirectional energy transfer modes requested by EVs (OCPP 2.1). Env: ALLOW_BIDIRECTIONAL.
reservation_sweep_interval: DurationHow often expired reservations are closed. Env: RESERVATION_SWEEP_SECS.
default_timezone: StringTime zone of stations without their own (tariff conditions use local time). Env: DEFAULT_TIMEZONE.
zoneinfo_dir: PathBufDirectory of the IANA time zone database. Env: TZDIR.
Implementations§
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 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more