[−][src]Struct streaming_platform::MagicBall
Fields
addr: String
auth_token: Option<String>
auth_data: Option<Value>
write_tx: UnboundedSender<StreamUnit>
Implementations
impl MagicBall
[src]
pub fn new(
addr: String,
write_tx: UnboundedSender<StreamUnit>,
rpc_inbound_tx: UnboundedSender<RpcMsg>
) -> MagicBall
[src]
addr: String,
write_tx: UnboundedSender<StreamUnit>,
rpc_inbound_tx: UnboundedSender<RpcMsg>
) -> MagicBall
pub fn get_stream_id(&mut self) -> u64
[src]
pub async fn write_vec<'_>(
&'_ mut self,
stream_id: u64,
data: Vec<u8>,
msg_meta_size: u64,
payload_size: u64,
attachments_sizes: Vec<u64>
) -> Result<(), ProcessError>
[src]
&'_ mut self,
stream_id: u64,
data: Vec<u8>,
msg_meta_size: u64,
payload_size: u64,
attachments_sizes: Vec<u64>
) -> Result<(), ProcessError>
This function should be called for single message or parts of it (not for multiple messages inside vec) stream_id value MUST BE ACQUIRED with get_stream_id() function. stream_id generation can be implicit, however this will leads to less flexible API (if for example you need stream payload or attachments data).
pub async fn send_event<T, '_, '_, '_>(
&'_ mut self,
addr: &'_ str,
key: &'_ str,
payload: T
) -> Result<(), ProcessError> where
T: Serialize,
T: Deserialize<'de>,
T: Debug,
[src]
&'_ mut self,
addr: &'_ str,
key: &'_ str,
payload: T
) -> Result<(), ProcessError> where
T: Serialize,
T: Deserialize<'de>,
T: Debug,
pub async fn send_event_with_route<T, '_, '_, '_>(
&'_ mut self,
addr: &'_ str,
key: &'_ str,
payload: T,
__arg4: Route
) -> Result<(), ProcessError> where
T: Serialize,
T: Deserialize<'de>,
T: Debug,
[src]
&'_ mut self,
addr: &'_ str,
key: &'_ str,
payload: T,
__arg4: Route
) -> Result<(), ProcessError> where
T: Serialize,
T: Deserialize<'de>,
T: Debug,
pub async fn rpc<T, R, '_, '_, '_>(
&'_ mut self,
addr: &'_ str,
key: &'_ str,
payload: T
) -> Result<Message<R>, ProcessError> where
T: Serialize,
T: Debug,
R: Deserialize<'de>,
R: Debug,
[src]
&'_ mut self,
addr: &'_ str,
key: &'_ str,
payload: T
) -> Result<Message<R>, ProcessError> where
T: Serialize,
T: Debug,
R: Deserialize<'de>,
R: Debug,
pub async fn rpc_with_route<T, R, '_, '_, '_>(
&'_ mut self,
addr: &'_ str,
key: &'_ str,
payload: T,
__arg4: Route
) -> Result<Message<R>, ProcessError> where
T: Serialize,
T: Debug,
R: Deserialize<'de>,
R: Debug,
[src]
&'_ mut self,
addr: &'_ str,
key: &'_ str,
payload: T,
__arg4: Route
) -> Result<Message<R>, ProcessError> where
T: Serialize,
T: Debug,
R: Deserialize<'de>,
R: Debug,
pub async fn proxy_event<'_>(
&'_ mut self,
tx: String,
__arg2: Vec<u8>
) -> Result<(), ProcessError>
[src]
&'_ mut self,
tx: String,
__arg2: Vec<u8>
) -> Result<(), ProcessError>
pub async fn proxy_rpc<'_>(
&'_ mut self,
tx: String,
__arg2: Vec<u8>
) -> Result<(MsgMeta, Vec<u8>), ProcessError>
[src]
&'_ mut self,
tx: String,
__arg2: Vec<u8>
) -> Result<(MsgMeta, Vec<u8>), ProcessError>
pub async fn proxy_rpc_with_payload<T, '_>(
&'_ mut self,
tx: String,
__arg2: Vec<u8>
) -> Result<(MsgMeta, T, Vec<u8>), ProcessError> where
T: Deserialize<'de>,
T: Debug,
[src]
&'_ mut self,
tx: String,
__arg2: Vec<u8>
) -> Result<(MsgMeta, T, Vec<u8>), ProcessError> where
T: Deserialize<'de>,
T: Debug,
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for MagicBall
impl Send for MagicBall
impl Sync for MagicBall
impl Unpin for MagicBall
impl !UnwindSafe for MagicBall
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<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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,