Skip to main content

ServerHandle

Struct ServerHandle 

Source
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

Source

pub fn tcp_port(&self) -> u16

Source

pub fn udp_port(&self) -> u16

Source

pub fn create_pv_double( &self, name: &str, initial: f64, metadata: NTScalarMetadataBuilder, ) -> Result<()>

Source

pub fn create_pv_double_array( &self, name: &str, initial: Vec<f64>, metadata: NTScalarMetadataBuilder, ) -> Result<()>

Source

pub fn create_pv_int32( &self, name: &str, initial: i32, metadata: NTScalarMetadataBuilder, ) -> Result<()>

Source

pub fn create_pv_int32_array( &self, name: &str, initial: Vec<i32>, metadata: NTScalarMetadataBuilder, ) -> Result<()>

Source

pub fn create_pv_string( &self, name: &str, initial: &str, metadata: NTScalarMetadataBuilder, ) -> Result<()>

Source

pub fn create_pv_string_array( &self, name: &str, initial: Vec<String>, metadata: NTScalarMetadataBuilder, ) -> Result<()>

Source

pub fn create_pv_enum( &self, name: &str, choices: Vec<&str>, selected_index: i16, metadata: NTEnumMetadataBuilder, ) -> Result<()>

Source

pub fn post_double(&self, name: &str, value: f64) -> Result<()>

Source

pub fn post_double_array(&self, name: &str, value: Vec<f64>) -> Result<()>

Source

pub fn post_int32(&self, name: &str, value: i32) -> Result<()>

Source

pub fn post_int32_array(&self, name: &str, value: Vec<i32>) -> Result<()>

Source

pub fn post_string(&self, name: &str, value: &str) -> Result<()>

Source

pub fn post_string_array(&self, name: &str, value: Vec<String>) -> Result<()>

Source

pub fn post_enum(&self, name: &str, value: i16) -> Result<()>

Source

pub fn remove_pv(&self, name: &str) -> Result<()>

Source

pub fn fetch_double(&self, name: &str) -> Result<FetchedDouble>

Source

pub fn fetch_int32(&self, name: &str) -> Result<FetchedInt32>

Source

pub fn fetch_string(&self, name: &str) -> Result<FetchedString>

Source

pub fn fetch_double_array(&self, name: &str) -> Result<FetchedDoubleArray>

Source

pub fn fetch_int32_array(&self, name: &str) -> Result<FetchedInt32Array>

Source

pub fn fetch_string_array(&self, name: &str) -> Result<FetchedStringArray>

Source

pub fn fetch_enum(&self, name: &str) -> Result<FetchedEnum>

Trait Implementations§

Source§

impl Clone for ServerHandle

Source§

fn clone(&self) -> ServerHandle

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.