pub struct AnvilLayer { /* private fields */ }
Available on crate feature
anvil-node
only.Expand description
A layer that wraps an Anvil
config.
The config will be used to spawn an AnvilInstance
when the layer is applied, or when the
user requests any information about the anvil node (e.g. via the AnvilLayer::ws_endpoint_url
method).
Implementations§
source§impl AnvilLayer
impl AnvilLayer
sourcepub fn instance(&self) -> &Arc<AnvilInstance>
pub fn instance(&self) -> &Arc<AnvilInstance>
Starts the anvil instance, or gets a reference to the existing instance.
sourcepub fn endpoint_url(&self) -> Url
pub fn endpoint_url(&self) -> Url
Get the instance http endpoint.
sourcepub fn ws_endpoint_url(&self) -> Url
pub fn ws_endpoint_url(&self) -> Url
Get the instance ws endpoint.
Trait Implementations§
source§impl Clone for AnvilLayer
impl Clone for AnvilLayer
source§fn clone(&self) -> AnvilLayer
fn clone(&self) -> AnvilLayer
Returns a copy 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 AnvilLayer
impl Debug for AnvilLayer
source§impl Default for AnvilLayer
impl Default for AnvilLayer
source§fn default() -> AnvilLayer
fn default() -> AnvilLayer
Returns the “default value” for a type. Read more
source§impl From<Anvil> for AnvilLayer
impl From<Anvil> for AnvilLayer
source§impl<P, T> ProviderLayer<P, T> for AnvilLayer
impl<P, T> ProviderLayer<P, T> for AnvilLayer
Auto Trait Implementations§
impl !Freeze for AnvilLayer
impl RefUnwindSafe for AnvilLayer
impl Send for AnvilLayer
impl Sync for AnvilLayer
impl Unpin for AnvilLayer
impl UnwindSafe for AnvilLayer
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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>
Converts
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>
Converts
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