pub struct TestPeer { /* private fields */ }Expand description
Represents a single peer in the test network
Implementations§
Source§impl TestPeer
impl TestPeer
Sourcepub fn is_gateway(&self) -> bool
pub fn is_gateway(&self) -> bool
Check if this is a gateway peer
Sourcepub fn network_address(&self) -> &str
pub fn network_address(&self) -> &str
Get the peer’s network address
Sourcepub fn network_port(&self) -> u16
pub fn network_port(&self) -> u16
Get the peer’s network port
Sourcepub fn socket_address(&self) -> SocketAddr
pub fn socket_address(&self) -> SocketAddr
Get the peer’s full socket address (address:port)
Sourcepub fn data_dir_path(&self) -> &Path
pub fn data_dir_path(&self) -> &Path
Get the root data directory for this peer
Sourcepub fn read_logs(&self) -> Result<Vec<LogEntry>>
pub fn read_logs(&self) -> Result<Vec<LogEntry>>
Read logs from this peer (fetches from Docker if needed)
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Check if the peer process is still running
Sourcepub fn location(&self) -> &PeerLocation
pub fn location(&self) -> &PeerLocation
Get the peer’s location (local or remote)
Auto Trait Implementations§
impl Freeze for TestPeer
impl !RefUnwindSafe for TestPeer
impl Send for TestPeer
impl !Sync for TestPeer
impl Unpin for TestPeer
impl !UnwindSafe for TestPeer
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