pub struct Relay { /* private fields */ }
Expand description
A running instance of a Pkarr relay server.
This struct represents a running relay server and provides methods to interact with it, such as retrieving the server’s address or shutting it down.
Implementations§
Source§impl Relay
impl Relay
Sourcepub fn builder() -> RelayBuilder
pub fn builder() -> RelayBuilder
Create a builder for running a Relay
Sourcepub async unsafe fn run_with_config_file(
config_path: impl AsRef<Path>,
) -> Result<Self>
pub async unsafe fn run_with_config_file( config_path: impl AsRef<Path>, ) -> Result<Self>
Sourcepub async unsafe fn run_testnet() -> Result<Self>
pub async unsafe fn run_testnet() -> Result<Self>
Sourcepub fn relay_address(&self) -> SocketAddr
pub fn relay_address(&self) -> SocketAddr
Returns the HTTP socket address of the relay.
Auto Trait Implementations§
impl Freeze for Relay
impl RefUnwindSafe for Relay
impl Send for Relay
impl Sync for Relay
impl Unpin for Relay
impl UnwindSafe for Relay
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