Struct re_web_viewer_server::WebViewerServer
source · pub struct WebViewerServer {
pub(crate) inner: Arc<WebViewerServerInner>,
pub(crate) thread_handle: Option<JoinHandle<()>>,
}
Expand description
HTTP host for the Rerun Web Viewer application This serves the HTTP+Wasm+JS files that make up the web-viewer.
Fields§
§inner: Arc<WebViewerServerInner>
§thread_handle: Option<JoinHandle<()>>
Implementations§
source§impl WebViewerServer
impl WebViewerServer
sourcepub fn new(
bind_ip: &str,
port: WebViewerServerPort
) -> Result<Self, WebViewerServerError>
pub fn new( bind_ip: &str, port: WebViewerServerPort ) -> Result<Self, WebViewerServerError>
Create new WebViewerServer
to host the Rerun Web Viewer on a specified port.
WebViewerServerPort::AUTO
will tell the OS choose any free port.
The server will immediately start listening for incoming connections
and stop doing so when the returned WebViewerServer
is dropped.
§Example
let server = WebViewerServer::new("0.0.0.0", WebViewerServerPort::AUTO)?;
let server_url = server.server_url();
sourcepub fn server_url(&self) -> String
pub fn server_url(&self) -> String
Includes http://
prefix
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WebViewerServer
impl !RefUnwindSafe for WebViewerServer
impl Send for WebViewerServer
impl Sync for WebViewerServer
impl Unpin for WebViewerServer
impl !UnwindSafe for WebViewerServer
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