pub struct CdpServer { /* private fields */ }Implementations§
Source§impl CdpServer
impl CdpServer
Sourcepub fn new(config: ServerConfig) -> Self
pub fn new(config: ServerConfig) -> Self
Create CdpServer with an empty domain registry.
For production use, prefer with_registry() with a pre-built registry
(e.g. DomainRegistry<DomainDispatch> for enum dispatch).
Sourcepub fn with_registry<R: RegistryDispatch + 'static>(
config: ServerConfig,
registry: Arc<R>,
) -> Self
pub fn with_registry<R: RegistryDispatch + 'static>( config: ServerConfig, registry: Arc<R>, ) -> Self
Create CdpServer with a pre-built registry (e.g. DomainRegistryArc<R> where R: RegistryDispatch is accepted.
pub fn registry(&self) -> &SharedRegistry
pub fn broadcaster(&self) -> Arc<EventBroadcaster> ⓘ
pub fn set_target_provider(&mut self, provider: Arc<dyn TargetProvider>)
Sourcepub fn set_console_receiver(&mut self, rx: Receiver<ConsoleMessage>)
pub fn set_console_receiver(&mut self, rx: Receiver<ConsoleMessage>)
Set the typed console message receiver. Messages are ConsoleMessage variants forwarded from servo’s show_console_message callbacks.
pub fn port(&self) -> u16
pub fn ws_url_for_target(&self, target_id: &str) -> String
Auto Trait Implementations§
impl !RefUnwindSafe for CdpServer
impl !Sync for CdpServer
impl !UnwindSafe for CdpServer
impl Freeze for CdpServer
impl Send for CdpServer
impl Unpin for CdpServer
impl UnsafeUnpin for CdpServer
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