Struct aurelius::Server
[−]
[src]
pub struct Server { /* fields omitted */ }
An instance of the a markdown preview server.
The server will listen for HTTP and WebSocket connections on arbitrary ports.
Examples
use aurelius::{Config, Server}; let listening = Server::new_with_config( Config { initial_markdown: Some(String::from("# Hello, world!")), ..Default::default() }) .start() .unwrap();
Methods
impl Server
[src]
pub fn new() -> Self
[src]
Create a new markdown preview server.
pub fn new_with_config(config: Config) -> Self
[src]
Create a new markdown preview server with the given configuration.
pub fn start(&self) -> Result<Listening>
[src]
Starts the server.
Returns a channel that can be used to send markdown to the server. The markdown will be sent as HTML to all clients of the websocket server.
Trait Implementations
impl Debug for Server
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for Server
[src]
fn clone(&self) -> Server
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more