Skip to main content

Session

Struct Session 

Source
pub struct Session { /* private fields */ }

Implementations§

Source§

impl Session

Source

pub fn profile_conflict(&self, key: &str, supplied: &Config) -> bool

Source

pub fn bind_profile( &mut self, key: impl Into<String>, profile: Arc<Config>, ) -> Result<Arc<Config>, Error>

Source

pub fn bound_profile(&self, key: &str) -> Option<Arc<Config>>

Source

pub fn remove_profile(&mut self, key: &str) -> Option<Arc<Config>>

Source

pub fn begin_start( &mut self, key: impl Into<String>, supplied: Arc<Config>, events: EventSink, ) -> Result<u64, Error>

Source

pub fn profiled_turn_start( &self, key: &str, thread: &str, input: impl Into<String>, ) -> Result<Value, Error>

Source

pub fn active_serial(&self, key: &str) -> Option<u64>

Source

pub fn active_scope(&self, key: &str) -> Option<ActiveScope>

Source

pub fn thread(&self, key: &str) -> Option<&str>

Source

pub fn owner(&self, thread: &str) -> Option<&str>

Source

pub fn set_thread( &mut self, key: &str, thread: impl Into<String>, ) -> Result<(), Error>

Source

pub fn set_native_turn( &mut self, key: &str, serial: u64, turn: impl Into<String>, ) -> Option<Vec<Value>>

Source

pub fn buffer_early( &mut self, key: &str, serial: u64, message: Value, ) -> Result<bool, Error>

Source

pub fn record_failure(&mut self, key: &str, serial: u64, failure: Value) -> bool

Source

pub fn emit(&self, key: &str, serial: u64, event: Event) -> bool

Source

pub fn cancel_active(&mut self, key: &str, serial: u64) -> Option<EventSink>

Source

pub fn take_active(&mut self, key: &str, serial: u64) -> Option<ActiveTurn>

Source

pub fn take_sinks(&mut self) -> Vec<EventSink> ⓘ

Source

pub fn start_pending(&self, key: &str) -> bool

Source

pub fn steer_pending(&self, key: &str, serial: u64) -> bool

Source

pub fn begin_steer( &mut self, key: &str, supplied: &Config, input: impl Into<String>, reply: &mut PendingReply, ) -> Result<RegisteredRequest, Error>

Source

pub fn register_request( &mut self, method: impl Into<String>, params: Value, pending: Pending<PendingReply>, ) -> Result<RegisteredRequest, Error>

Source

pub fn take_pending(&mut self, id: u64) -> Result<Pending<PendingReply>, Error>

Source

pub fn begin_close(&mut self, key: &str) -> Result<Option<String>, Error>

Source

pub fn cancel_close(&mut self, key: &str)

Source

pub fn finish_close(&mut self, key: &str, thread: &str) -> Result<(), Error>

Source

pub fn interrupt_target( &mut self, key: &str, serial: u64, ) -> Option<(String, String)>

Source

pub fn track_tool( &mut self, key: &str, serial: u64, call: impl Into<String>, id: &Value, ) -> Result<ToolToken, Error>

Source

pub fn take_tool(&mut self, token: &ToolToken) -> Option<PendingTool>

Source

pub fn take_all_tools(&mut self) -> Vec<PendingTool>

Source

pub fn take_turn_tools( &mut self, key: &str, serial: u64, ) -> Vec<(ToolToken, PendingTool)>

Source

pub fn resolve_tool(&mut self, id: &Value) -> Result<Option<ToolToken>, Error>

Source

pub fn rpc_id_in_use(&self, id: &Value) -> Result<bool, Error>

Source

pub fn hold_completion( &mut self, key: &str, serial: u64, completed: TurnCompleted, ) -> Result<(), Error>

Source

pub fn take_held_completion( &mut self, key: &str, serial: u64, ) -> Option<TurnCompleted>

Trait Implementations§

Source§

impl Default for Session

Source§

fn default() -> Session

Returns the “default value” for a type. 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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.