Skip to main content

Connectable

Trait Connectable 

Source
pub trait Connectable {
    // Required methods
    fn with_connection(&mut self, connection_id: &str) -> &mut Self;
    fn has_connection(&self) -> bool;
    fn connection_id(&self) -> Option<&str>;
}
Expand description

A trait for messages that can be connected to a prior Connect message.

This trait provides functionality for linking messages to a previous Connect message, enabling the building of message chains in the TAP protocol.

Required Methods§

Source

fn with_connection(&mut self, connection_id: &str) -> &mut Self

Connect this message to a prior Connect message by setting the parent thread ID (pthid).

§Arguments
  • connection_id - The ID of the Connect message to link to
§Returns

Self reference for fluent interface chaining

Source

fn has_connection(&self) -> bool

Check if this message is connected to a prior Connect message.

§Returns

true if this message has a connection (pthid) set, false otherwise

Source

fn connection_id(&self) -> Option<&str>

Get the connection ID if present.

§Returns

The Connect message ID this message is connected to, or None if not connected

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§