Struct trillium::Conn [−][src]
pub struct Conn { /* fields omitted */ }
Implementations
impl Conn
[src]
pub fn new(conn: Conn<impl Transport + 'static>) -> Self
[src]
pub fn state<T: 'static>(&self) -> Option<&T>
[src]
pub fn state_mut<T: 'static>(&mut self) -> Option<&mut T>
[src]
pub fn state_or_insert_with<T, F>(&mut self, default: F) -> &mut T where
T: Send + Sync + 'static,
F: FnOnce() -> T,
[src]
T: Send + Sync + 'static,
F: FnOnce() -> T,
pub fn register_before_send<G: Handler>(self, handler: G) -> Self
[src]
pub async fn request_body(&mut self) -> ReceivedBody<'_, BoxedTransport>
[src]
pub fn header_eq_ignore_case(&self, name: HeaderName, value: &str) -> bool
[src]
pub fn response_len(&self) -> Option<u64>
[src]
pub fn method(&self) -> &Method
[src]
pub fn get_status(&self) -> Option<&StatusCode>
[src]
pub fn headers(&self) -> &Headers
[src]
pub fn headers_mut(&mut self) -> &mut Headers
[src]
pub fn with_header(self, header: impl Header) -> Self
[src]
pub fn append_header(
self,
name: impl Into<HeaderName>,
values: impl ToHeaderValues
) -> Self
[src]
self,
name: impl Into<HeaderName>,
values: impl ToHeaderValues
) -> Self
pub fn set_state<T: Send + Sync + 'static>(&mut self, val: T) -> Option<T>
[src]
pub fn with_state<T: Send + Sync + 'static>(self, val: T) -> Self
[src]
pub fn take_state<T: Send + Sync + 'static>(&mut self) -> Option<T>
[src]
pub fn status(self, status: impl TryInto<StatusCode>) -> Self
[src]
pub fn url(&self) -> Option<Url>
[src]
pub fn path(&self) -> &str
[src]
pub fn push_path(&mut self, path: String)
[src]
pub fn pop_path(&mut self)
[src]
pub fn halt(self) -> Self
[src]
pub fn set_halted(&mut self, halted: bool)
[src]
pub fn is_halted(&self) -> bool
[src]
pub fn body(self, body: impl Into<Body>) -> Self
[src]
pub fn ok(self, body: impl Into<Body>) -> Conn
[src]
pub fn secure(&self) -> bool
[src]
pub fn inner(&self) -> &Conn<BoxedTransport>
[src]
pub fn inner_mut(&mut self) -> &mut Conn<BoxedTransport>
[src]
pub async fn send(self) -> Self
[src]
pub fn into_inner<T: Transport>(self) -> Conn<T>
[src]
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Conn
impl Send for Conn
impl Sync for Conn
impl Unpin for Conn
impl !UnwindSafe for Conn
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,