pub struct AttachConfiguration {
pub host: String,
pub port: u16,
pub timeout_ms: Option<u32>,
}Expand description
Attach configuration for connecting to a running Perl debugging session
This configuration is used when attaching to an already-running Perl process that has been started with the Perl::LanguageServer DAP module.
Fields§
§host: StringHost to connect to (typically “localhost”)
port: u16Port number for the DAP server (default: 13603)
timeout_ms: Option<u32>Connection timeout in milliseconds (optional)
Implementations§
Source§impl AttachConfiguration
impl AttachConfiguration
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Validate the attach configuration
This method checks that:
- Host is not empty
- Port is in valid range (1-65535)
- Timeout is reasonable (if specified)
§Errors
Returns an error if validation fails
§Examples
use perl_dap_config::AttachConfiguration;
let config = AttachConfiguration {
host: "localhost".to_string(),
port: 13603,
timeout_ms: Some(5000),
};
config.validate()?;Trait Implementations§
Source§impl Clone for AttachConfiguration
impl Clone for AttachConfiguration
Source§fn clone(&self) -> AttachConfiguration
fn clone(&self) -> AttachConfiguration
Returns a duplicate 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 AttachConfiguration
impl Debug for AttachConfiguration
Source§impl Default for AttachConfiguration
impl Default for AttachConfiguration
Source§impl<'de> Deserialize<'de> for AttachConfiguration
impl<'de> Deserialize<'de> for AttachConfiguration
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
Auto Trait Implementations§
impl Freeze for AttachConfiguration
impl RefUnwindSafe for AttachConfiguration
impl Send for AttachConfiguration
impl Sync for AttachConfiguration
impl Unpin for AttachConfiguration
impl UnsafeUnpin for AttachConfiguration
impl UnwindSafe for AttachConfiguration
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