pub struct HttpServer { /* private fields */ }Expand description
A HTTP server for general use.
The HTTP server provides configuration for receiving and responding to HTTP incoming requests.
host: the network address to bind with.port: the port to bind with.
HttpServer aims to be used with connection treatment.
Every time a new HTTP request matching a configured route comes, a new track is created with @HttpRequest context.
ℹ️ If server binding fails, failedBinding is emitted.
⚠️ Use HttpServer with connection treatment, as using incoming source and outgoing treatment directly should be done carefully.
Implementations§
Source§impl HttpServer
impl HttpServer
pub fn new(model: Weak<HttpServerModel>) -> Self
pub fn statuses( &self, ) -> AsyncArc<AsyncRwLock<HashMap<Uuid, AsyncProducer<Status, Arc<AsyncRb<Status, SharedRb<Status, Vec<MaybeUninit<Status>>>>>>>>> ⓘ
pub fn headers( &self, ) -> AsyncArc<AsyncRwLock<HashMap<Uuid, AsyncProducer<StringMap, Arc<AsyncRb<StringMap, SharedRb<StringMap, Vec<MaybeUninit<StringMap>>>>>>>>> ⓘ
pub fn outgoing( &self, ) -> AsyncArc<AsyncRwLock<HashMap<Uuid, AsyncProducer<u8, Arc<AsyncRb<u8, SharedRb<u8, Vec<MaybeUninit<u8>>>>>>>>> ⓘ
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for HttpServer
impl !RefUnwindSafe for HttpServer
impl !UnwindSafe for HttpServer
impl Send for HttpServer
impl Sync for HttpServer
impl Unpin for HttpServer
impl UnsafeUnpin for HttpServer
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.