pub struct PocketIcStartupConfig { /* private fields */ }Expand description
Explicit bounded source and policy for one PocketIC startup.
Implementations§
Source§impl PocketIcStartupConfig
impl PocketIcStartupConfig
Sourcepub fn spawn(server_binary: impl Into<PathBuf>, timeout: Duration) -> Self
pub fn spawn(server_binary: impl Into<PathBuf>, timeout: Duration) -> Self
Spawn and monitor one exact PocketIC server binary.
Sourcepub fn connect(server_url: impl Into<String>, timeout: Duration) -> Self
pub fn connect(server_url: impl Into<String>, timeout: Duration) -> Self
Connect to a caller-owned existing PocketIC server.
The URL is applied to the builder explicitly, so this mode never lets the upstream builder spawn a hidden server child.
Sourcepub const fn with_server_hard_ttl(self, hard_ttl: Duration) -> Self
pub const fn with_server_hard_ttl(self, hard_ttl: Duration) -> Self
Set the hard lifetime passed to an ic-testkit-managed server.
Sourcepub const fn server_hard_ttl(&self) -> Duration
pub const fn server_hard_ttl(&self) -> Duration
Managed server hard lifetime.
Sourcepub fn server_binary(&self) -> Option<&Path>
pub fn server_binary(&self) -> Option<&Path>
Managed server binary, when this configuration spawns one.
Sourcepub fn server_url(&self) -> Option<&str>
pub fn server_url(&self) -> Option<&str>
Existing caller-owned server URL, when configured.
Trait Implementations§
Source§impl Clone for PocketIcStartupConfig
impl Clone for PocketIcStartupConfig
Source§fn clone(&self) -> PocketIcStartupConfig
fn clone(&self) -> PocketIcStartupConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PocketIcStartupConfig
impl Debug for PocketIcStartupConfig
impl Eq for PocketIcStartupConfig
Source§impl PartialEq for PocketIcStartupConfig
impl PartialEq for PocketIcStartupConfig
impl StructuralPartialEq for PocketIcStartupConfig
Auto Trait Implementations§
impl Freeze for PocketIcStartupConfig
impl RefUnwindSafe for PocketIcStartupConfig
impl Send for PocketIcStartupConfig
impl Sync for PocketIcStartupConfig
impl Unpin for PocketIcStartupConfig
impl UnsafeUnpin for PocketIcStartupConfig
impl UnwindSafe for PocketIcStartupConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.