pub struct BridgeCoreHandle {
pub session_id: RwLock<String>,
pub environment_id: RwLock<String>,
pub session_ingress_url: String,
pub transport: RwLock<Option<Box<dyn ReplBridgeTransport>>>,
pub current_work_id: RwLock<Option<String>>,
pub current_ingress_token: RwLock<Option<String>>,
pub last_sequence_num: RwLock<u64>,
pub poll_abort: Sender<bool>,
pub teardown_started: RwLock<bool>,
/* private fields */
}Expand description
Bridge handle returned after initialization.
Fields§
§session_id: RwLock<String>The bridge session ID.
environment_id: RwLock<String>The environment ID (empty for env-less v2).
session_ingress_url: StringThe session ingress URL.
transport: RwLock<Option<Box<dyn ReplBridgeTransport>>>The transport (if connected).
current_work_id: RwLock<Option<String>>Current work item ID.
current_ingress_token: RwLock<Option<String>>Current ingress token.
last_sequence_num: RwLock<u64>Last SSE sequence number.
poll_abort: Sender<bool>Poll controller signal.
teardown_started: RwLock<bool>Teardown flag.
Implementations§
Source§impl BridgeCoreHandle
impl BridgeCoreHandle
Sourcepub fn new(
session_id: String,
environment_id: String,
session_ingress_url: String,
params: BridgeCoreParams,
) -> Self
pub fn new( session_id: String, environment_id: String, session_ingress_url: String, params: BridgeCoreParams, ) -> Self
Create a new bridge handle.
Sourcepub async fn write_messages(&self, messages: Vec<SDKMessage>)
pub async fn write_messages(&self, messages: Vec<SDKMessage>)
Write messages to the bridge.
Sourcepub async fn write_sdk_messages(&self, messages: Vec<SDKMessage>)
pub async fn write_sdk_messages(&self, messages: Vec<SDKMessage>)
Write SDK messages directly.
Sourcepub async fn send_control_request(&self, request: BridgeControlRequest)
pub async fn send_control_request(&self, request: BridgeControlRequest)
Send a control request.
Sourcepub async fn send_control_response(&self, response: BridgeControlResponse)
pub async fn send_control_response(&self, response: BridgeControlResponse)
Send a control response.
Sourcepub async fn send_control_cancel_request(&self, request_id: &str)
pub async fn send_control_cancel_request(&self, request_id: &str)
Send a control cancel request.
Sourcepub async fn send_result(&self)
pub async fn send_result(&self)
Send a result message.
Sourcepub fn get_sse_sequence_num(&self) -> u64
pub fn get_sse_sequence_num(&self) -> u64
Get the SSE sequence number for persistence.
Auto Trait Implementations§
impl !Freeze for BridgeCoreHandle
impl !RefUnwindSafe for BridgeCoreHandle
impl Send for BridgeCoreHandle
impl Sync for BridgeCoreHandle
impl Unpin for BridgeCoreHandle
impl UnsafeUnpin for BridgeCoreHandle
impl !UnwindSafe for BridgeCoreHandle
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