Struct ockam_node::MessageSendReceiveOptions
source · pub struct MessageSendReceiveOptions { /* private fields */ }Expand description
Full set of options to send_and_receive_extended function
Implementations§
source§impl MessageSendReceiveOptions
impl MessageSendReceiveOptions
sourcepub fn new() -> Self
pub fn new() -> Self
Default options with DEFAULT_TIMEOUT and no session
sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set custom timeout
sourcepub fn without_timeout(self) -> Self
pub fn without_timeout(self) -> Self
Wait for the message forever
sourcepub fn with_session(
self,
sessions: &Sessions,
session_id: &SessionId,
policy: SessionPolicy
) -> Self
pub fn with_session( self, sessions: &Sessions, session_id: &SessionId, policy: SessionPolicy ) -> Self
Set session to be able to receive a resposne