pub struct RunningServer { /* private fields */ }Expand description
A started server: mint typed handles, then abort() to stop.
Implementations§
Source§impl RunningServer
impl RunningServer
Sourcepub async fn pv<T: PvScalar>(&self, name: &str) -> Result<Pv<T>, PvError>
pub async fn pv<T: PvScalar>(&self, name: &str) -> Result<Pv<T>, PvError>
Mint a typed handle to any served record (handle-built or .db-loaded).
Sourcepub async fn array_pv(&self, name: &str) -> Result<PvArray, PvError>
pub async fn array_pv(&self, name: &str) -> Result<PvArray, PvError>
Mint an array handle to any served record (handle-built or .db-loaded).
Sourcepub async fn add_scalar(
&self,
name: &str,
value: ScalarValue,
writable: bool,
) -> Pv<ScalarValue>
pub async fn add_scalar( &self, name: &str, value: ScalarValue, writable: bool, ) -> Pv<ScalarValue>
Add a scalar record to the running server at runtime. The wire type is
taken from the ScalarValue variant; writable selects an output
record family (client PUTs allowed) vs an input family (read-only).
Returns a bound handle to the new record. Replaces any existing record
with the same name.
Sourcepub async fn add_array(
&self,
name: &str,
value: ScalarArrayValue,
writable: bool,
) -> PvArray
pub async fn add_array( &self, name: &str, value: ScalarArrayValue, writable: bool, ) -> PvArray
Add an array record to the running server at runtime. writable
selects aao (client PUTs allowed) vs aai (read-only). Element type
comes from the ScalarArrayValue variant. Returns a bound handle.
Replaces any existing record with the same name.
Sourcepub async fn add_enum(
&self,
name: &str,
choices: Vec<String>,
index: i32,
writable: bool,
)
pub async fn add_enum( &self, name: &str, choices: Vec<String>, index: i32, writable: bool, )
Add an NTEnum record at runtime. writable selects an mbbo
(output) vs mbbi (input) record type; note both accept client PUTs
at the store layer. Replaces any existing record with the same name.
Sourcepub async fn add_table(
&self,
name: &str,
columns: Vec<(String, ScalarArrayValue)>,
)
pub async fn add_table( &self, name: &str, columns: Vec<(String, ScalarArrayValue)>, )
Add an NTTable record at runtime from named, typed columns. Tables are always writable at the store layer. Replaces any existing record with the same name.