Struct kvarn_testing::Server
source · pub struct Server { /* private fields */ }
Expand description
A port returned by ServerBuilder::run
to connect to.
Implementations§
source§impl 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<&CertificateDer<'static>>
pub fn cert(&self) -> Option<&CertificateDer<'static>>
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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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
Mutably borrows from an owned value. Read more