pub struct WorkerSessionOptions { /* private fields */ }Expand description
Routing and lifetime options for one worker-held session.
A holder replacement must rebuild its local resources. TTL expiry and explicit close are terminal for the session identity, even when lease reacquisition is enabled. Options do not create a session until sent to Server.
Implementations§
Source§impl WorkerSessionOptions
impl WorkerSessionOptions
pub fn new(session_id: impl Into<String>) -> Self
pub fn session_id(&self) -> &str
pub fn task_queue(&self) -> Option<&str>
pub fn lease_duration(&self) -> Duration
pub fn ttl_duration(&self) -> Duration
pub fn connection(self, connection: impl Into<String>) -> Self
pub fn queue(self, queue: impl Into<String>) -> Self
pub fn requirements<I, S>(self, requirements: I) -> Self
pub fn lease_seconds(self, seconds: u64) -> Self
pub fn ttl_seconds(self, seconds: u64) -> Self
pub fn max_concurrent_activities(self, count: usize) -> Self
pub fn create_if_missing(self, enabled: bool) -> Self
pub fn allow_reacquire_after_failure(self, enabled: bool) -> Self
pub fn to_wire(&self) -> Result<Value>
Trait Implementations§
Source§impl Clone for WorkerSessionOptions
impl Clone for WorkerSessionOptions
Source§fn clone(&self) -> WorkerSessionOptions
fn clone(&self) -> WorkerSessionOptions
Returns a copy 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 moreSource§impl Debug for WorkerSessionOptions
impl Debug for WorkerSessionOptions
Source§impl<'de> Deserialize<'de> for WorkerSessionOptions
impl<'de> Deserialize<'de> for WorkerSessionOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for WorkerSessionOptions
impl PartialEq for WorkerSessionOptions
Source§impl Serialize for WorkerSessionOptions
impl Serialize for WorkerSessionOptions
impl Eq for WorkerSessionOptions
impl StructuralPartialEq for WorkerSessionOptions
Auto Trait Implementations§
impl Freeze for WorkerSessionOptions
impl RefUnwindSafe for WorkerSessionOptions
impl Send for WorkerSessionOptions
impl Sync for WorkerSessionOptions
impl Unpin for WorkerSessionOptions
impl UnwindSafe for WorkerSessionOptions
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