pub struct ServerHandle { /* private fields */ }Expand description
Handle to a running PVXS server
Provides methods to interact with a running server without blocking. Can be cloned and shared across threads.
Implementations§
Source§impl ServerHandle
impl ServerHandle
pub fn tcp_port(&self) -> u16
pub fn udp_port(&self) -> u16
pub fn create_pv_double( &self, name: &str, initial: f64, metadata: NTScalarMetadataBuilder, ) -> Result<()>
pub fn create_pv_double_array( &self, name: &str, initial: Vec<f64>, metadata: NTScalarMetadataBuilder, ) -> Result<()>
pub fn create_pv_int32( &self, name: &str, initial: i32, metadata: NTScalarMetadataBuilder, ) -> Result<()>
pub fn create_pv_int32_array( &self, name: &str, initial: Vec<i32>, metadata: NTScalarMetadataBuilder, ) -> Result<()>
pub fn create_pv_string( &self, name: &str, initial: &str, metadata: NTScalarMetadataBuilder, ) -> Result<()>
pub fn create_pv_string_array( &self, name: &str, initial: Vec<String>, metadata: NTScalarMetadataBuilder, ) -> Result<()>
pub fn create_pv_enum( &self, name: &str, choices: Vec<&str>, selected_index: i16, metadata: NTEnumMetadataBuilder, ) -> Result<()>
pub fn post_double(&self, name: &str, value: f64) -> Result<()>
pub fn post_double_array(&self, name: &str, value: Vec<f64>) -> Result<()>
pub fn post_int32(&self, name: &str, value: i32) -> Result<()>
pub fn post_int32_array(&self, name: &str, value: Vec<i32>) -> Result<()>
pub fn post_string(&self, name: &str, value: &str) -> Result<()>
pub fn post_string_array(&self, name: &str, value: Vec<String>) -> Result<()>
pub fn post_enum(&self, name: &str, value: i16) -> Result<()>
pub fn remove_pv(&self, name: &str) -> Result<()>
pub fn fetch_double(&self, name: &str) -> Result<FetchedDouble>
pub fn fetch_int32(&self, name: &str) -> Result<FetchedInt32>
pub fn fetch_string(&self, name: &str) -> Result<FetchedString>
pub fn fetch_double_array(&self, name: &str) -> Result<FetchedDoubleArray>
pub fn fetch_int32_array(&self, name: &str) -> Result<FetchedInt32Array>
pub fn fetch_string_array(&self, name: &str) -> Result<FetchedStringArray>
pub fn fetch_enum(&self, name: &str) -> Result<FetchedEnum>
Trait Implementations§
Source§impl Clone for ServerHandle
impl Clone for ServerHandle
Source§fn clone(&self) -> ServerHandle
fn clone(&self) -> ServerHandle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ServerHandle
impl RefUnwindSafe for ServerHandle
impl Send for ServerHandle
impl Sync for ServerHandle
impl Unpin for ServerHandle
impl UnsafeUnpin for ServerHandle
impl UnwindSafe for ServerHandle
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