Struct re_sdk::web_viewer::WebViewerConfig
source · pub struct WebViewerConfig {
pub bind_ip: String,
pub web_port: WebViewerServerPort,
pub source_url: Option<String>,
pub force_wgpu_backend: Option<String>,
pub video_decoder: Option<String>,
pub open_browser: bool,
}
Expand description
Helper to spawn an instance of the WebViewerServer
and configure a webviewer url.
Fields§
§bind_ip: String
Ip to which the http server is bound.
Defaults to 0.0.0.0
web_port: WebViewerServerPort
The port to which the webviewer should bind.
Defaults to WebViewerServerPort::AUTO
.
source_url: Option<String>
The url from which a spawned webviewer should source
This url could be a hosted RRD file or a ws://
url to a running re_ws_comms::RerunServer
.
Has no effect if Self::open_browser
is false.
force_wgpu_backend: Option<String>
If set, adjusts the browser url to force a specific backend, either webgl
or webgpu
.
Has no effect if Self::open_browser
is false.
video_decoder: Option<String>
If set, adjusts the browser url to set the video decoder setting, either auto
, prefer_software
or prefer_hardware
.
Has no effect if Self::open_browser
is false.
open_browser: bool
If set to true
, opens the default browser after hosting the webviewer.
Defaults to true
.
Implementations§
source§impl WebViewerConfig
impl WebViewerConfig
sourcepub fn host_web_viewer(self) -> Result<WebViewerServer, WebViewerServerError>
pub fn host_web_viewer(self) -> Result<WebViewerServer, WebViewerServerError>
Helper to spawn an instance of the WebViewerServer
.
This serves the HTTP+Wasm+JS files that make up the web-viewer.
The server will immediately start listening for incoming connections
and stop doing so when the returned WebViewerServer
is dropped.
Note: this does not include the websocket server.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WebViewerConfig
impl RefUnwindSafe for WebViewerConfig
impl Send for WebViewerConfig
impl Sync for WebViewerConfig
impl Unpin for WebViewerConfig
impl UnwindSafe for WebViewerConfig
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
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more