[−][src]Struct transsecs::transsecs_wrapper::TransSecsWrapper
Wrapper around all TransSecs functions that also contains and manages the JVM
Implementations
impl TransSecsWrapper
[src]
pub fn new<'a, S>(classpath: S) -> Result<TransSecsWrapper, Error> where
S: Into<String>,
[src]
S: Into<String>,
Create a new TransSecsWrapper, using a classpath which must include the runtime jar
pub fn subscribe<'a, S, F>(&self, topic: S, callback: F) -> Result<u128, Error> where
S: Into<String>,
F: FnMut(String, ValueObject) + Send + 'static,
[src]
S: Into<String>,
F: FnMut(String, ValueObject) + Send + 'static,
Add a new listener to the broker. Returns the listener uuid which is necessary to unsubscribe, or an error.
pub fn unsubscribe(&self, listener_uuid: u128) -> Result<(), Error>
[src]
Unsubscribe from a topic, using the listener_uuid that is returned from a subscription
pub fn start_main<S>(&self, package_name: S) -> Result<(), Error> where
S: Into<String>,
[src]
S: Into<String>,
Start the main class for the wrapper
pub fn add_test_values_to_broker(&self) -> Result<(), Error>
[src]
Add a few test values to the broker
pub fn get<S>(&self, topic: S) -> Result<ValueObject, Error> where
S: Into<String>,
[src]
S: Into<String>,
Return the latest value associated with a topic. Will return Error::NoSuchTopic if the topic does not exist.
pub fn publish_int<S, I>(&self, topic: S, value: I) -> Result<(), Error> where
S: Into<String>,
I: Into<i64>,
[src]
S: Into<String>,
I: Into<i64>,
Publish an int to a topic. Will create the topic if it does not exist.
pub fn publish_bool<S, I>(&self, topic: S, value: I) -> Result<(), Error> where
S: Into<String>,
I: Into<bool>,
[src]
S: Into<String>,
I: Into<bool>,
Publish a bool to a topic. Will create the topic if it does not exist.
pub fn publish_string<S, I>(&self, topic: S, value: I) -> Result<(), Error> where
S: Into<String>,
I: Into<String>,
[src]
S: Into<String>,
I: Into<String>,
Publish a string to a topic. Will create the topic if it does not exist.
pub fn publish_json<S, I>(&self, topic: S, value: I) -> Result<(), Error> where
S: Into<String>,
I: Into<String>,
[src]
S: Into<String>,
I: Into<String>,
Publish an object in json format to a topic. Will create the topic if it does not exist.
pub fn publish_bytes<S>(&self, topic: S, value: &[u8]) -> Result<(), Error> where
S: Into<String>,
[src]
S: Into<String>,
Publish a byte slice to a topic. Will create the topic if it does not exist.
pub fn publish_float<S, I>(&self, topic: S, value: I) -> Result<(), Error> where
S: Into<String>,
I: Into<f64>,
[src]
S: Into<String>,
I: Into<f64>,
Publish a float to a topic. Will create the topic if it does not exist.
pub fn alarm<S>(&self, alarm_name: S, set: bool) -> Result<(), Error> where
S: Into<String>,
[src]
S: Into<String>,
Set an alarm
pub fn trigger<S>(&self, event_name: S, ceid_trigger: S) -> Result<(), Error> where
S: Into<String>,
[src]
S: Into<String>,
Trigger an event
Trait Implementations
impl Clone for TransSecsWrapper
[src]
fn clone(&self) -> TransSecsWrapper
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl RefUnwindSafe for TransSecsWrapper
impl Send for TransSecsWrapper
impl Sync for TransSecsWrapper
impl Unpin for TransSecsWrapper
impl UnwindSafe for TransSecsWrapper
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<'a, T> Desc<'a, T> for T
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,