Struct kvarn_testing::Server
source · [−]pub struct Server { /* private fields */ }
Expand description
A port returned by ServerBuilder::run
to connect to.
Implementations
sourceimpl Server
impl Server
sourcepub fn get(&self, path: impl AsRef<str>) -> RequestBuilder
pub fn get(&self, path: impl AsRef<str>) -> RequestBuilder
Make a request to path
with the selected method.
sourcepub fn post(&self, path: impl AsRef<str>) -> RequestBuilder
pub fn post(&self, path: impl AsRef<str>) -> RequestBuilder
Make a request to path
with the selected method.
sourcepub fn put(&self, path: impl AsRef<str>) -> RequestBuilder
pub fn put(&self, path: impl AsRef<str>) -> RequestBuilder
Make a request to path
with the selected method.
sourcepub fn delete(&self, path: impl AsRef<str>) -> RequestBuilder
pub fn delete(&self, path: impl AsRef<str>) -> RequestBuilder
Make a request to path
with the selected method.
sourcepub fn head(&self, path: impl AsRef<str>) -> RequestBuilder
pub fn head(&self, path: impl AsRef<str>) -> RequestBuilder
Make a request to path
with the selected method.
sourcepub fn options(&self, path: impl AsRef<str>) -> RequestBuilder
pub fn options(&self, path: impl AsRef<str>) -> RequestBuilder
Make a request to path
with the selected method.
sourcepub fn connect(&self, path: impl AsRef<str>) -> RequestBuilder
pub fn connect(&self, path: impl AsRef<str>) -> RequestBuilder
Make a request to path
with the selected method.
sourcepub fn patch(&self, path: impl AsRef<str>) -> RequestBuilder
pub fn patch(&self, path: impl AsRef<str>) -> RequestBuilder
Make a request to path
with the selected method.
sourcepub fn trace(&self, path: impl AsRef<str>) -> RequestBuilder
pub fn trace(&self, path: impl AsRef<str>) -> RequestBuilder
Make a request to path
with the selected method.
sourcepub fn client(&self) -> ClientBuilder
pub fn client(&self) -> ClientBuilder
Get a reqwest::ClientBuilder
with the Self::cert
accepted.
sourcepub fn cert(&self) -> Option<&Certificate>
pub fn cert(&self) -> Option<&Certificate>
Gets the certificate, if any. This dictates whether or not HTTPS should be on.
sourcepub fn get_shutdown_manager(&self) -> Arc<Manager>
pub fn get_shutdown_manager(&self) -> Arc<Manager>
Gets a shutdown::Manager
which is Send
.
You can shut down Kvarn from another thread using this.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl !UnwindSafe for Server
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more