pub struct Devnet { /* private fields */ }Expand description
A local devnet composed of multiple nodes.
Implementations§
Source§impl Devnet
impl Devnet
Sourcepub async fn new(config: DevnetConfig) -> Result<Self>
pub async fn new(config: DevnetConfig) -> Result<Self>
Create a new devnet with the given configuration.
§Errors
Returns DevnetError::Config if the configuration is invalid (e.g. bootstrap
count exceeds node count or port range overflow).
Returns DevnetError::Io if the data directory cannot be created.
Sourcepub async fn start(&mut self) -> Result<()>
pub async fn start(&mut self) -> Result<()>
Start the devnet.
§Errors
Returns DevnetError::Startup if any node fails to start, or
DevnetError::Stabilization if the network does not stabilize within the timeout.
Sourcepub fn config(&self) -> &DevnetConfig
pub fn config(&self) -> &DevnetConfig
Get devnet configuration.
Sourcepub fn bootstrap_addrs(&self) -> Vec<MultiAddr>
pub fn bootstrap_addrs(&self) -> Vec<MultiAddr>
Get bootstrap addresses.
Sourcepub fn browser_listener_diagnostics(&self) -> Vec<WebRtcServerSnapshot>
pub fn browser_listener_diagnostics(&self) -> Vec<WebRtcServerSnapshot>
Snapshot every browser listener, including counters retained after shutdown.
Sourcepub fn browser_endpoints(&self) -> Vec<BrowserBootstrapNode>
pub fn browser_endpoints(&self) -> Vec<BrowserBootstrapNode>
Get every direct browser endpoint in this devnet.
Sourcepub async fn browser_payment_network(&self) -> Result<BrowserPaymentNetwork>
pub async fn browser_payment_network(&self) -> Result<BrowserPaymentNetwork>
Public EVM chain and contracts advertised to direct browser clients.
§Errors
Returns DevnetError::Config if a custom RPC cannot report its chain ID.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Devnet
impl !UnwindSafe for Devnet
impl Freeze for Devnet
impl Send for Devnet
impl Sync for Devnet
impl Unpin for Devnet
impl UnsafeUnpin for Devnet
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more