pub struct Swim { /* private fields */ }Expand description
The Swim struct is the main entry point for a Swim application.
It is created using the swim! macro, or by using the builder (or in this case; with) pattern.
Implementations§
Source§impl Swim
impl Swim
Sourcepub fn with(project: Box<dyn Project>) -> Self
pub fn with(project: Box<dyn Project>) -> Self
Creates a new Swim instance using the given Project.
Sourcepub fn host(self, host: &str) -> Self
pub fn host(self, host: &str) -> Self
Mutates the host field of the Swim instance. This is the hostname or IP address that the server will listen on.
The default value is 127.0.0.1.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Swim
impl !RefUnwindSafe for Swim
impl !Send for Swim
impl !Sync for Swim
impl Unpin for Swim
impl !UnwindSafe for Swim
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