MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / init

Function init

engine/Trident/src/config.rs:69–73  ·  view source on GitHub ↗

Initialise the global config. Call once from `main()`. Panics if called more than once.

(cfg: TridentConfig)

Source from the content-addressed store, hash-verified

67/// Initialise the global config. Call once from `main()`.
68/// Panics if called more than once.
69pub fn init(cfg: TridentConfig) {
70 CONFIG
71 .set(cfg)
72 .expect("TridentConfig::init called more than once");
73}
74
75/// Read the global config. Returns the default if [`init`] was never called
76/// (useful in unit tests).

Callers 6

openMethod · 0.85
OpenBufferMethod · 0.85
openMethod · 0.85
NetMessageMethod · 0.85
~NetMessageMethod · 0.85
mainFunction · 0.85

Calls 1

setMethod · 0.45

Tested by

no test coverage detected