Skip to main content

TestServerBuilder

Struct TestServerBuilder 

Source
pub struct TestServerBuilder<Cfg, F, Sf, I> { /* private fields */ }
Expand description

Test server builder

Implementations§

Source§

impl<Cfg, F, S, I> TestServerBuilder<Cfg, F, S, I>
where F: AsyncFn() -> I + Send + Clone + 'static, I: IntoService<S, Cfg::State, Io> + 'static, S: Service<Cfg::State, Io> + 'static, Cfg: ServerAppConfig + Default + 'static,

Source

pub fn new(factory: F) -> Self

Create test server builder

Source

pub fn config<T: Into<SharedCfg>>(self, cfg: T) -> Self

Set server io configuration

Source

pub fn client_config<T: Into<SharedCfg>>(self, cfg: T) -> Self

Set client io configuration

Source

pub fn start(self) -> TestServer

Start test server

Trait Implementations§

Source§

impl<Cfg, F, Sf, I> Debug for TestServerBuilder<Cfg, F, Sf, I>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<Cfg, F, Sf, I> !RefUnwindSafe for TestServerBuilder<Cfg, F, Sf, I>

§

impl<Cfg, F, Sf, I> !UnwindSafe for TestServerBuilder<Cfg, F, Sf, I>

§

impl<Cfg, F, Sf, I> Freeze for TestServerBuilder<Cfg, F, Sf, I>

§

impl<Cfg, F, Sf, I> Send for TestServerBuilder<Cfg, F, Sf, I>
where F: Send, Cfg: Send, PhantomData<(Sf, I)>: Send,

§

impl<Cfg, F, Sf, I> Sync for TestServerBuilder<Cfg, F, Sf, I>
where F: Sync, Cfg: Sync, PhantomData<(Sf, I)>: Sync,

§

impl<Cfg, F, Sf, I> Unpin for TestServerBuilder<Cfg, F, Sf, I>
where F: Unpin, Cfg: Unpin, PhantomData<(Sf, I)>: Unpin,

§

impl<Cfg, F, Sf, I> UnsafeUnpin for TestServerBuilder<Cfg, F, Sf, I>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.