pub struct ServeBuilder { /* private fields */ }Expand description
Builder for the PV-handle API. Wraps PvaServerBuilder and adds handle
binding at build() time.
Implementations§
Source§impl ServeBuilder
impl ServeBuilder
pub fn pvs(self, pvs: impl IntoIterator<Item = impl Into<AnyPv>>) -> Self
pub fn db_file(self, path: impl AsRef<str>) -> Self
pub fn db_string(self, content: &str) -> Self
pub fn source( self, label: impl Into<String>, order: i32, source: Arc<dyn Source>, ) -> Self
pub fn port(self, port: u16) -> Self
pub fn udp_port(self, port: u16) -> Self
pub fn listen_ip(self, ip: IpAddr) -> Self
pub fn advertise_ip(self, ip: IpAddr) -> Self
pub fn compute_alarms(self, enabled: bool) -> Self
pub fn beacon_period(self, secs: u64) -> Self
Sourcepub async fn build(self) -> PvaServer
pub async fn build(self) -> PvaServer
Materialise records, links and scans from the handles, build the server, then bind every handle to the store.
Async because registering PUT validators post-build goes through
SimplePvStore::set_validator, which is async (an RwLock write);
there is no synchronous alternative and spvirit-server does not
depend on futures, so this awaits inline rather than blocking.
Sourcepub async fn start(self) -> RunningServer
pub async fn start(self) -> RunningServer
Build and spawn; returns a handle for typed access and shutdown.
Auto Trait Implementations§
impl !RefUnwindSafe for ServeBuilder
impl !UnwindSafe for ServeBuilder
impl Freeze for ServeBuilder
impl Send for ServeBuilder
impl Sync for ServeBuilder
impl Unpin for ServeBuilder
impl UnsafeUnpin for ServeBuilder
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