script::dom::window

Struct Window

source
#[repr(C)]
pub(crate) struct Window {
Show 59 fields globalscope: GlobalScope, webview_id: WebViewId, script_chan: Sender<MainThreadScriptMsg>, layout: RefCell<Box<dyn Layout>>, font_context: Arc<FontContext>, navigator: MutNullableDom<Navigator>, image_cache: Arc<dyn ImageCache>, image_cache_sender: IpcSender<PendingImageResponse>, window_proxy: MutNullableDom<WindowProxy>, document: MutNullableDom<Document>, location: MutNullableDom<Location>, history: MutNullableDom<History>, custom_element_registry: MutNullableDom<CustomElementRegistry>, performance: MutNullableDom<Performance>, navigation_start: Cell<CrossProcessInstant>, screen: MutNullableDom<Screen>, session_storage: MutNullableDom<Storage>, local_storage: MutNullableDom<Storage>, status: DomRefCell<DOMString>, devtools_markers: DomRefCell<HashSet<TimelineMarkerType>>, devtools_marker_sender: DomRefCell<Option<IpcSender<Option<TimelineMarker>>>>, unhandled_resize_event: DomRefCell<Option<(WindowSizeData, WindowSizeType)>>, theme: Cell<PrefersColorScheme>, parent_info: Option<PipelineId>, dom_static: GlobalStaticData, js_runtime: DomRefCell<Option<Rc<Runtime>>>, window_size: Cell<WindowSizeData>, bluetooth_thread: IpcSender<BluetoothRequest>, bluetooth_extra_permission_data: BluetoothExtraPermissionData, page_clip_rect: Cell<Rect<Au>>, layout_blocker: Cell<LayoutBlocker>, webdriver_script_chan: DomRefCell<Option<IpcSender<WebDriverJSResult>>>, current_state: Cell<WindowState>, current_viewport: Cell<Rect<Au>>, error_reporter: CSSErrorReporter, scroll_offsets: DomRefCell<HashMap<OpaqueNode, Vector2D<f32, LayoutPixel>>>, media_query_lists: DOMTracker<MediaQueryList>, test_runner: MutNullableDom<TestRunner>, webgl_chan: Option<WebGLChan>, webxr_registry: Option<Registry>, pending_image_callbacks: DomRefCell<HashMap<PendingImageId, Vec<PendingImageCallback>>>, pending_layout_images: DomRefCell<HashMapTracedValues<PendingImageId, Vec<Dom<Node>>>>, unminified_css_dir: DomRefCell<Option<String>>, local_script_source: Option<String>, test_worklet: MutNullableDom<Worklet>, paint_worklet: MutNullableDom<Worklet>, webrender_document: DocumentId, exists_mut_observer: Cell<bool>, compositor_api: CrossProcessCompositorApi, has_sent_idle_message: Cell<bool>, relayout_event: bool, prepare_for_screenshot: bool, unminify_css: bool, userscripts_path: Option<String>, replace_surrogates: bool, player_context: WindowGLContext, throttled: Cell<bool>, layout_marker: DomRefCell<Rc<Cell<bool>>>, current_event: DomRefCell<Option<Dom<Event>>>,
}

Fields§

§globalscope: GlobalScope§webview_id: WebViewId

The webview that contains this Window.

This may not be the top-level Window, in the case of frames.

§script_chan: Sender<MainThreadScriptMsg>§layout: RefCell<Box<dyn Layout>>§font_context: Arc<FontContext>

A FontContext which is used to store and match against fonts for this Window and to trigger the download of web fonts.

§navigator: MutNullableDom<Navigator>§image_cache: Arc<dyn ImageCache>§image_cache_sender: IpcSender<PendingImageResponse>§window_proxy: MutNullableDom<WindowProxy>§document: MutNullableDom<Document>§location: MutNullableDom<Location>§history: MutNullableDom<History>§custom_element_registry: MutNullableDom<CustomElementRegistry>§performance: MutNullableDom<Performance>§navigation_start: Cell<CrossProcessInstant>§screen: MutNullableDom<Screen>§session_storage: MutNullableDom<Storage>§local_storage: MutNullableDom<Storage>§status: DomRefCell<DOMString>§devtools_markers: DomRefCell<HashSet<TimelineMarkerType>>

For sending timeline markers. Will be ignored if no devtools server

§devtools_marker_sender: DomRefCell<Option<IpcSender<Option<TimelineMarker>>>>§unhandled_resize_event: DomRefCell<Option<(WindowSizeData, WindowSizeType)>>

Most recent unhandled resize event, if any.

§theme: Cell<PrefersColorScheme>

Platform theme.

§parent_info: Option<PipelineId>

Parent id associated with this page, if any.

§dom_static: GlobalStaticData

Global static data related to the DOM.

§js_runtime: DomRefCell<Option<Rc<Runtime>>>

The JavaScript runtime.

§window_size: Cell<WindowSizeData>

The current size of the window, in pixels.

§bluetooth_thread: IpcSender<BluetoothRequest>

A handle for communicating messages to the bluetooth thread.

§bluetooth_extra_permission_data: BluetoothExtraPermissionData§page_clip_rect: Cell<Rect<Au>>

An enlarged rectangle around the page contents visible in the viewport, used to prevent creating display list items for content that is far away from the viewport.

§layout_blocker: Cell<LayoutBlocker>

See the documentation for LayoutBlocker. Essentially, this flag prevents layouts from happening before the first load event, apart from a few exceptional cases.

§webdriver_script_chan: DomRefCell<Option<IpcSender<WebDriverJSResult>>>

A channel for communicating results of async scripts back to the webdriver server

§current_state: Cell<WindowState>

The current state of the window object

§current_viewport: Cell<Rect<Au>>§error_reporter: CSSErrorReporter§scroll_offsets: DomRefCell<HashMap<OpaqueNode, Vector2D<f32, LayoutPixel>>>

A list of scroll offsets for each scrollable element.

§media_query_lists: DOMTracker<MediaQueryList>

All the MediaQueryLists we need to update

§test_runner: MutNullableDom<TestRunner>§webgl_chan: Option<WebGLChan>

A handle for communicating messages to the WebGL thread, if available.

§webxr_registry: Option<Registry>§pending_image_callbacks: DomRefCell<HashMap<PendingImageId, Vec<PendingImageCallback>>>

When an element triggers an image load or starts watching an image load from the ImageCache it adds an entry to this list. When those loads are triggered from layout, they also add an etry to Self::pending_layout_images.

§pending_layout_images: DomRefCell<HashMapTracedValues<PendingImageId, Vec<Dom<Node>>>>

All of the elements that have an outstanding image request that was initiated by layout during a reflow. They are stored in the script thread to ensure that the element can be marked dirty when the image data becomes available at some point in the future.

§unminified_css_dir: DomRefCell<Option<String>>

Directory to store unminified css for this window if unminify-css opt is enabled.

§local_script_source: Option<String>

Directory with stored unminified scripts

§test_worklet: MutNullableDom<Worklet>

Worklets

§paint_worklet: MutNullableDom<Worklet>§webrender_document: DocumentId

The Webrender Document id associated with this window.

§exists_mut_observer: Cell<bool>

Flag to identify whether mutation observers are present(true)/absent(false)

§compositor_api: CrossProcessCompositorApi

Cross-process access to the compositor.

§has_sent_idle_message: Cell<bool>

Indicate whether a SetDocumentStatus message has been sent after a reflow is complete. It is used to avoid sending idle message more than once, which is unneccessary.

§relayout_event: bool

Emits notifications when there is a relayout.

§prepare_for_screenshot: bool

True if it is safe to write to the image.

§unminify_css: bool

Unminify Css.

§userscripts_path: Option<String>

Where to load userscripts from, if any. An empty string will load from the resources/user-agent-js directory, and if the option isn’t passed userscripts won’t be loaded.

§replace_surrogates: bool

Replace unpaired surrogates in DOM strings with U+FFFD. See https://github.com/servo/servo/issues/6564

§player_context: WindowGLContext

Window’s GL context from application

§throttled: Cell<bool>§layout_marker: DomRefCell<Rc<Cell<bool>>>

A shared marker for the validity of any cached layout values. A value of true indicates that any such values remain valid; any new layout that invalidates those values will cause the marker to be set to false.

§current_event: DomRefCell<Option<Dom<Event>>>

Implementations§

source§

impl Window

source§

impl Window

source

pub(crate) fn webview_id(&self) -> WebViewId

source

pub(crate) fn as_global_scope(&self) -> &GlobalScope

source

pub(crate) fn layout(&self) -> Ref<'_, Box<dyn Layout>>

source

pub(crate) fn layout_mut(&self) -> RefMut<'_, Box<dyn Layout>>

source

pub(crate) fn get_exists_mut_observer(&self) -> bool

source

pub(crate) fn set_exists_mut_observer(&self)

source

pub(crate) fn clear_js_runtime_for_script_deallocation(&self)

source

pub(crate) fn discard_browsing_context(&self)

source

pub(crate) fn time_profiler_chan(&self) -> &TimeProfilerChan

Get a sender to the time profiler thread.

source

pub(crate) fn origin(&self) -> &MutableOrigin

source

pub(crate) fn get_cx(&self) -> JSContext

source

pub(crate) fn get_js_runtime(&self) -> Ref<'_, Option<Rc<Runtime>>>

source

pub(crate) fn main_thread_script_chan(&self) -> &Sender<MainThreadScriptMsg>

source

pub(crate) fn parent_info(&self) -> Option<PipelineId>

source

pub(crate) fn new_script_pair( &self, ) -> (ScriptEventLoopSender, ScriptEventLoopReceiver)

source

pub(crate) fn event_loop_sender(&self) -> ScriptEventLoopSender

source

pub(crate) fn image_cache(&self) -> Arc<dyn ImageCache>

source

pub(crate) fn window_proxy(&self) -> Root<Dom<WindowProxy>>

This can panic if it is called after the browsing context has been discarded

source

pub(crate) fn undiscarded_window_proxy(&self) -> Option<Root<Dom<WindowProxy>>>

Returns the window proxy if it has not been discarded. https://html.spec.whatwg.org/multipage/#a-browsing-context-is-discarded

source

pub(crate) fn bluetooth_thread(&self) -> IpcSender<BluetoothRequest>

source

pub(crate) fn bluetooth_extra_permission_data( &self, ) -> &BluetoothExtraPermissionData

source

pub(crate) fn css_error_reporter(&self) -> Option<&dyn ParseErrorReporter>

source

pub(crate) fn set_scroll_offsets( &self, offsets: HashMap<OpaqueNode, Vector2D<f32, LayoutPixel>>, )

Sets a new list of scroll offsets.

This is called when layout gives us new ones and WebRender is in use.

source

pub(crate) fn current_viewport(&self) -> UntypedRect<Au>

source

pub(crate) fn webgl_chan(&self) -> Option<WebGLCommandSender>

source

pub(crate) fn webxr_registry(&self) -> Option<Registry>

source

fn new_paint_worklet(&self) -> Root<Dom<Worklet>>

source

pub(crate) fn register_image_cache_listener( &self, id: PendingImageId, callback: impl Fn(PendingImageResponse) + 'static, ) -> IpcSender<PendingImageResponse>

source

fn pending_layout_image_notification(&self, response: PendingImageResponse)

source

pub(crate) fn pending_image_notification(&self, response: PendingImageResponse)

source

pub(crate) fn compositor_api(&self) -> &CrossProcessCompositorApi

source

pub(crate) fn get_userscripts_path(&self) -> Option<String>

source

pub(crate) fn replace_surrogates(&self) -> bool

source

pub(crate) fn get_player_context(&self) -> WindowGLContext

source

pub(crate) fn dispatch_event_with_target_override( &self, event: &Event, can_gc: CanGc, ) -> EventStatus

source§

impl Window

source

pub(crate) fn create_named_properties_object( cx: JSContext, proto: HandleObject<'_>, object: MutableHandleObject<'_>, )

source

pub(crate) fn current_event(&self) -> Option<Root<Dom<Event>>>

source

pub(crate) fn set_current_event( &self, event: Option<&Event>, ) -> Option<Root<Dom<Event>>>

source

fn post_message_impl( &self, target_origin: &USVString, source_origin: ImmutableOrigin, source: &Window, cx: JSContext, message: HandleValue<'_>, transfer: CustomAutoRooterGuard<'_, Vec<*mut JSObject>>, ) -> Result<(), Error>

source

pub(crate) fn paint_worklet(&self) -> Root<Dom<Worklet>>

source

pub(crate) fn has_document(&self) -> bool

source

pub(crate) fn clear_js_runtime(&self)

source

pub(crate) fn scroll( &self, x_: f64, y_: f64, behavior: ScrollBehavior, can_gc: CanGc, )

source

pub(crate) fn perform_a_scroll( &self, x: f32, y: f32, scroll_id: ExternalScrollId, _behavior: ScrollBehavior, _element: Option<&Element>, can_gc: CanGc, )

source

pub(crate) fn update_viewport_for_scroll(&self, x: f32, y: f32)

source

pub(crate) fn device_pixel_ratio(&self) -> Scale<f32, CSSPixel, DevicePixel>

source

fn client_window(&self) -> (Size2D<u32, CSSPixel>, Point2D<i32, CSSPixel>)

source

pub(crate) fn advance_animation_clock(&self, delta_ms: i32)

Prepares to tick animations and then does a reflow which also advances the layout animation clock.

source

fn force_reflow( &self, reflow_goal: ReflowGoal, condition: Option<ReflowTriggerCondition>, ) -> bool

Reflows the page unconditionally if possible and not suppressed. This method will wait for the layout to complete. If there is no window size yet, the page is presumed invisible and no reflow is performed. If reflow is suppressed, no reflow will be performed for ForDisplay goals.

Returns true if layout actually happened, false otherwise.

NOTE: This method should almost never be called directly! Layout and rendering updates should happen as part of the HTML event loop via update the rendering.

source

pub(crate) fn reflow(&self, reflow_goal: ReflowGoal, can_gc: CanGc) -> bool

Reflows the page if it’s possible to do so and the page is dirty. Returns true if layout actually happened, false otherwise.

NOTE: This method should almost never be called directly! Layout and rendering updates should happen as part of the HTML event loop via update the rendering. Currerntly, the only exceptions are script queries and scroll requests.

source

pub(crate) fn reflow_if_reflow_timer_expired(&self, can_gc: CanGc)

If parsing has taken a long time and reflows are still waiting for the load event, start allowing them. See https://github.com/servo/servo/pull/6028.

source

pub(crate) fn prevent_layout_until_load_event(&self)

Block layout for this Window until parsing is done. If parsing takes a long time, we want to layout anyway, so schedule a moment in the future for when layouts are allowed even though parsing isn’t finished and we havne’t sent a load event.

source

pub(crate) fn allow_layout_if_necessary(&self, can_gc: CanGc)

Inform the Window that layout is allowed either because load has happened or because parsing the <body> took so long that we cannot wait any longer.

source

pub(crate) fn layout_blocked(&self) -> bool

source

pub(crate) fn update_constellation_epoch(&self)

If writing a screenshot, synchronously update the layout epoch that it set in the constellation.

source

pub(crate) fn layout_reflow(&self, query_msg: QueryMsg, can_gc: CanGc) -> bool

source

pub(crate) fn resolved_font_style_query( &self, node: &Node, value: String, can_gc: CanGc, ) -> Option<ServoArc<Font>>

source

pub(crate) fn content_box_query( &self, node: &Node, can_gc: CanGc, ) -> Option<UntypedRect<Au>>

source

pub(crate) fn content_boxes_query( &self, node: &Node, can_gc: CanGc, ) -> Vec<UntypedRect<Au>>

source

pub(crate) fn client_rect_query( &self, node: &Node, can_gc: CanGc, ) -> UntypedRect<i32>

source

pub(crate) fn scrolling_area_query( &self, node: Option<&Node>, can_gc: CanGc, ) -> UntypedRect<i32>

Find the scroll area of the given node, if it is not None. If the node is None, find the scroll area of the viewport.

source

pub(crate) fn scroll_offset_query( &self, node: &Node, ) -> Vector2D<f32, LayoutPixel>

source

pub(crate) fn scroll_node( &self, node: &Node, x_: f64, y_: f64, behavior: ScrollBehavior, can_gc: CanGc, )

source

pub(crate) fn resolved_style_query( &self, element: TrustedNodeAddress, pseudo: Option<PseudoElement>, property: PropertyId, can_gc: CanGc, ) -> DOMString

source

pub(crate) fn get_iframe_size_if_known( &self, browsing_context_id: BrowsingContextId, can_gc: CanGc, ) -> Option<Size2D<f32, CSSPixel>>

If the given |browsing_context_id| refers to an <iframe> that is an element in this Window and that <iframe> has been laid out, return its size. Otherwise, return None.

source

pub(crate) fn offset_parent_query( &self, node: &Node, can_gc: CanGc, ) -> (Option<Root<Dom<Element>>>, UntypedRect<Au>)

source

pub(crate) fn text_index_query( &self, node: &Node, point_in_node: UntypedPoint2D<f32>, can_gc: CanGc, ) -> Option<usize>

source

pub(crate) fn init_window_proxy(&self, window_proxy: &WindowProxy)

source

pub(crate) fn init_document(&self, document: &Document)

source

pub(crate) fn load_url( &self, history_handling: NavigationHistoryBehavior, force_reload: bool, load_data: LoadData, can_gc: CanGc, )

Commence a new URL load which will either replace this window or scroll to a fragment.

https://html.spec.whatwg.org/multipage/#navigating-across-documents

source

pub(crate) fn set_window_size(&self, size: WindowSizeData)

source

pub(crate) fn window_size(&self) -> WindowSizeData

source

pub(crate) fn handle_theme_change(&self, new_theme: Theme)

Handle a theme change request, triggering a reflow is any actual change occured.

source

pub(crate) fn get_url(&self) -> ServoUrl

source

pub(crate) fn windowproxy_handler(&self) -> &'static WindowProxyHandler

source

pub(crate) fn add_resize_event( &self, event: WindowSizeData, event_type: WindowSizeType, )

source

pub(crate) fn take_unhandled_resize_event( &self, ) -> Option<(WindowSizeData, WindowSizeType)>

source

pub(crate) fn set_page_clip_rect_with_new_viewport( &self, viewport: UntypedRect<f32>, ) -> bool

source

pub(crate) fn suspend(&self)

source

pub(crate) fn resume(&self)

source

pub(crate) fn need_emit_timeline_marker( &self, timeline_type: TimelineMarkerType, ) -> bool

source

pub(crate) fn emit_timeline_marker(&self, marker: TimelineMarker)

source

pub(crate) fn set_devtools_timeline_markers( &self, markers: Vec<TimelineMarkerType>, reply: IpcSender<Option<TimelineMarker>>, )

source

pub(crate) fn drop_devtools_timeline_markers( &self, markers: Vec<TimelineMarkerType>, )

source

pub(crate) fn set_webdriver_script_chan( &self, chan: Option<IpcSender<WebDriverJSResult>>, )

source

pub(crate) fn is_alive(&self) -> bool

source

pub(crate) fn is_top_level(&self) -> bool

source

pub(crate) fn run_the_resize_steps(&self, can_gc: CanGc) -> bool

An implementation of: https://drafts.csswg.org/cssom-view/#document-run-the-resize-steps

Returns true if there were any pending resize events.

source

pub(crate) fn evaluate_media_queries_and_report_changes(&self, can_gc: CanGc)

source

pub(crate) fn set_throttled(&self, throttled: bool)

Set whether to use less resources by running timers at a heavily limited rate.

source

pub(crate) fn throttled(&self) -> bool

source

pub(crate) fn unminified_css_dir(&self) -> Option<String>

source

pub(crate) fn local_script_source(&self) -> &Option<String>

source

pub(crate) fn set_navigation_start(&self)

source

pub(crate) fn send_to_embedder(&self, msg: EmbedderMsg)

source

pub(crate) fn send_to_constellation(&self, msg: ScriptMsg)

source

pub(crate) fn webrender_document(&self) -> DocumentId

source

pub(crate) fn in_immersive_xr_session(&self) -> bool

source§

impl Window

source

pub(crate) fn new( webview_id: WebViewId, runtime: Rc<Runtime>, script_chan: Sender<MainThreadScriptMsg>, layout: Box<dyn Layout>, font_context: Arc<FontContext>, image_cache_sender: IpcSender<PendingImageResponse>, image_cache: Arc<dyn ImageCache>, resource_threads: ResourceThreads, bluetooth_thread: IpcSender<BluetoothRequest>, mem_profiler_chan: MemProfilerChan, time_profiler_chan: TimeProfilerChan, devtools_chan: Option<IpcSender<ScriptToDevtoolsControlMsg>>, constellation_chan: ScriptToConstellationChan, control_chan: IpcSender<ScriptThreadMessage>, pipeline_id: PipelineId, parent_info: Option<PipelineId>, window_size: WindowSizeData, origin: MutableOrigin, creator_url: ServoUrl, navigation_start: CrossProcessInstant, webgl_chan: Option<WebGLChan>, webxr_registry: Option<Registry>, microtask_queue: Rc<MicrotaskQueue>, webrender_document: DocumentId, compositor_api: CrossProcessCompositorApi, relayout_event: bool, prepare_for_screenshot: bool, unminify_js: bool, unminify_css: bool, local_script_source: Option<String>, userscripts_path: Option<String>, is_headless: bool, replace_surrogates: bool, user_agent: Cow<'static, str>, player_context: WindowGLContext, gpu_id_hub: Arc<IdentityHub>, inherited_secure_context: Option<bool>, ) -> Root<Dom<Self>>

source

pub(crate) fn pipeline_id(&self) -> PipelineId

source

pub(crate) fn cache_layout_value<T>(&self, value: T) -> LayoutValue<T>
where T: Copy + MallocSizeOf,

Create a new cached instance of the given value.

source§

impl Window

source

pub(crate) fn post_message( &self, target_origin: Option<ImmutableOrigin>, source_origin: ImmutableOrigin, source: &WindowProxy, data: StructuredSerializedData, )

Trait Implementations§

source§

impl Castable for Window

source§

fn is<T>(&self) -> bool
where T: DerivedFrom<Self>,

Check whether a DOM object implements one of its deriving interfaces.
source§

fn upcast<T>(&self) -> &T
where T: Castable, Self: DerivedFrom<T>,

Cast a DOM object upwards to one of the interfaces it derives from.
source§

fn downcast<T>(&self) -> Option<&T>
where T: DerivedFrom<Self>,

Cast a DOM object downwards to one of the interfaces it might implement.
source§

impl DomObject for Window

source§

fn reflector(&self) -> &Reflector

Returns the receiver’s reflector.
source§

fn global(&self) -> Root<Dom<GlobalScope>>
where Self: Sized,

Returns the GlobalScope of the realm that the DomObject was created in. If this object is a Node, this will be different from it’s owning Document if adopted by. For Nodes it’s almost always better to use NodeTraits::owning_global.
source§

impl HasParent for Window

source§

fn as_parent(&self) -> &GlobalScope

This is used in a type assertion to ensure that the source and webidls agree as to what the parent type is

source§

type Parent = GlobalScope

source§

impl IDLInterface for Window

source§

fn derives(class: &'static DOMClass) -> bool

Returns whether the given DOM class derives that interface.
source§

impl MallocSizeOf for Window

source§

fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize

Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself.
source§

impl MutDomObject for Window

source§

unsafe fn init_reflector(&self, obj: *mut JSObject)

Initializes the Reflector Read more
source§

impl PartialEq for Window

source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl ToJSValConvertible for Window

source§

unsafe fn to_jsval(&self, cx: *mut JSContext, rval: MutableHandleValue<'_>)

Convert self to a JSVal. JSAPI failure causes a panic.
source§

impl Traceable for Window

source§

unsafe fn trace(&self, tracer: *mut JSTracer)

Trace self.
source§

impl WindowMethods<DomTypeHolder> for Window

source§

fn RequestAnimationFrame(&self, callback: Rc<FrameRequestCallback>) -> u32

source§

fn CancelAnimationFrame(&self, ident: u32)

source§

fn PostMessage_( &self, cx: JSContext, message: HandleValue<'_>, options: RootedTraceableBox<WindowPostMessageOptions>, ) -> Result<(), Error>

source§

fn StructuredClone( &self, cx: JSContext, value: HandleValue<'_>, options: RootedTraceableBox<StructuredSerializeOptions>, retval: MutableHandleValue<'_>, ) -> Result<(), Error>

source§

fn Alert_(&self)

source§

fn Alert(&self, s: DOMString)

source§

fn Confirm(&self, s: DOMString) -> bool

source§

fn Prompt(&self, message: DOMString, default: DOMString) -> Option<DOMString>

source§

fn Stop(&self, can_gc: CanGc)

source§

fn Open( &self, url: USVString, target: DOMString, features: DOMString, can_gc: CanGc, ) -> Result<Option<Root<Dom<WindowProxy>>>, Error>

source§

fn GetOpener( &self, cx: JSContext, in_realm_proof: InRealm<'_>, retval: MutableHandleValue<'_>, ) -> Result<(), Error>

source§

fn SetOpener(&self, cx: JSContext, value: HandleValue<'_>) -> Result<(), Error>

source§

fn Closed(&self) -> bool

source§

fn Close(&self)

source§

fn Document(&self) -> Root<Dom<Document>>

source§

fn History(&self) -> Root<Dom<History>>

source§

fn CustomElements(&self) -> Root<Dom<CustomElementRegistry>>

source§

fn Location(&self) -> Root<Dom<Location>>

source§

fn SessionStorage(&self) -> Root<Dom<Storage>>

source§

fn LocalStorage(&self) -> Root<Dom<Storage>>

source§

fn Crypto(&self) -> Root<Dom<Crypto>>

source§

fn GetFrameElement(&self) -> Option<Root<Dom<Element>>>

source§

fn Navigator(&self) -> Root<Dom<Navigator>>

source§

fn SetTimeout( &self, _cx: JSContext, callback: StringOrFunction, timeout: i32, args: Vec<HandleValue<'_>>, ) -> i32

source§

fn ClearTimeout(&self, handle: i32)

source§

fn SetInterval( &self, _cx: JSContext, callback: StringOrFunction, timeout: i32, args: Vec<HandleValue<'_>>, ) -> i32

source§

fn ClearInterval(&self, handle: i32)

source§

fn QueueMicrotask(&self, callback: Rc<VoidFunction>)

source§

fn CreateImageBitmap( &self, image: ImageBitmapSource, options: &ImageBitmapOptions, can_gc: CanGc, ) -> Rc<Promise>

source§

fn Window(&self) -> Root<Dom<WindowProxy>>

source§

fn Self_(&self) -> Root<Dom<WindowProxy>>

source§

fn Frames(&self) -> Root<Dom<WindowProxy>>

source§

fn Length(&self) -> u32

source§

fn GetParent(&self) -> Option<Root<Dom<WindowProxy>>>

source§

fn GetTop(&self) -> Option<Root<Dom<WindowProxy>>>

source§

fn Performance(&self) -> Root<Dom<Performance>>

source§

fn GetOnblur(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnblur(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnerror(&self) -> Option<Rc<OnErrorEventHandlerNonNull>>

source§

fn SetOnerror(&self, listener: Option<Rc<OnErrorEventHandlerNonNull>>)

source§

fn GetOnfocus(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnfocus(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnload(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnload(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnresize(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnresize(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnscroll(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnscroll(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnabort(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnabort(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnanimationend(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnanimationend(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnanimationiteration(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnanimationiteration(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOncancel(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOncancel(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOncanplay(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOncanplay(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOncanplaythrough(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOncanplaythrough(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnchange(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnchange(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnclick(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnclick(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnclose(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnclose(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOncontextmenu(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOncontextmenu(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOncuechange(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOncuechange(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOndblclick(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOndblclick(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOndrag(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOndrag(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOndragend(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOndragend(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOndragenter(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOndragenter(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOndragexit(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOndragexit(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOndragleave(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOndragleave(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOndragover(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOndragover(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOndragstart(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOndragstart(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOndrop(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOndrop(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOndurationchange(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOndurationchange(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnemptied(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnemptied(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnended(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnended(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnformdata(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnformdata(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOninput(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOninput(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOninvalid(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOninvalid(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnkeydown(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnkeydown(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnkeypress(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnkeypress(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnkeyup(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnkeyup(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnloadeddata(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnloadeddata(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnloadedmetadata(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnloadedmetadata(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnloadstart(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnloadstart(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnmousedown(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnmousedown(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnmouseenter(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnmouseenter(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnmouseleave(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnmouseleave(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnmousemove(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnmousemove(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnmouseout(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnmouseout(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnmouseover(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnmouseover(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnmouseup(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnmouseup(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnwheel(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnwheel(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnpause(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnpause(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnplay(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnplay(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnplaying(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnplaying(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnprogress(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnprogress(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnratechange(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnratechange(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnreset(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnreset(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnsecuritypolicyviolation(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnsecuritypolicyviolation( &self, listener: Option<Rc<EventHandlerNonNull>>, )

source§

fn GetOnseeked(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnseeked(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnseeking(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnseeking(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnselect(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnselect(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnselectionchange(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnselectionchange(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnselectstart(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnselectstart(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnshow(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnshow(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnstalled(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnstalled(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnsubmit(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnsubmit(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnsuspend(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnsuspend(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOntimeupdate(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOntimeupdate(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOntoggle(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOntoggle(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOntransitioncancel(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOntransitioncancel(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOntransitionend(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOntransitionend(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOntransitionrun(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOntransitionrun(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnvolumechange(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnvolumechange(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnwaiting(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnwaiting(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnafterprint(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnafterprint(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnbeforeprint(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnbeforeprint(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnbeforeunload(&self) -> Option<Rc<OnBeforeUnloadEventHandlerNonNull>>

source§

fn SetOnbeforeunload( &self, listener: Option<Rc<OnBeforeUnloadEventHandlerNonNull>>, )

source§

fn GetOnhashchange(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnhashchange(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnlanguagechange(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnlanguagechange(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnmessage(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnmessage(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnmessageerror(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnmessageerror(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnoffline(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnoffline(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnonline(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnonline(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnpagehide(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnpagehide(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnpageshow(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnpageshow(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnpopstate(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnpopstate(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnrejectionhandled(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnrejectionhandled(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnstorage(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnstorage(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnunhandledrejection(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnunhandledrejection(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOnunload(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOnunload(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOngamepadconnected(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOngamepadconnected(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn GetOngamepaddisconnected(&self) -> Option<Rc<EventHandlerNonNull>>

source§

fn SetOngamepaddisconnected(&self, listener: Option<Rc<EventHandlerNonNull>>)

source§

fn Screen(&self) -> Root<Dom<Screen>>

source§

fn Btoa(&self, btoa: DOMString) -> Result<DOMString, Error>

source§

fn Atob(&self, atob: DOMString) -> Result<DOMString, Error>

source§

fn PostMessage( &self, cx: JSContext, message: HandleValue<'_>, target_origin: USVString, transfer: CustomAutoRooterGuard<'_, Vec<*mut JSObject>>, ) -> Result<(), Error>

source§

fn CaptureEvents(&self)

source§

fn ReleaseEvents(&self)

source§

fn Debug(&self, message: DOMString)

source§

fn Gc(&self)

source§

fn Js_backtrace(&self)

source§

fn WebdriverCallback(&self, cx: JSContext, val: HandleValue<'_>)

source§

fn WebdriverTimeout(&self)

source§

fn GetComputedStyle( &self, element: &Element, pseudo: Option<DOMString>, ) -> Root<Dom<CSSStyleDeclaration>>

source§

fn InnerHeight(&self) -> i32

source§

fn InnerWidth(&self) -> i32

source§

fn ScrollX(&self) -> i32

source§

fn PageXOffset(&self) -> i32

source§

fn ScrollY(&self) -> i32

source§

fn PageYOffset(&self) -> i32

source§

fn Scroll(&self, options: &ScrollToOptions, can_gc: CanGc)

source§

fn Scroll_(&self, x: f64, y: f64, can_gc: CanGc)

source§

fn ScrollTo(&self, options: &ScrollToOptions)

source§

fn ScrollTo_(&self, x: f64, y: f64)

source§

fn ScrollBy(&self, options: &ScrollToOptions, can_gc: CanGc)

source§

fn ScrollBy_(&self, x: f64, y: f64, can_gc: CanGc)

source§

fn ResizeTo(&self, width: i32, height: i32)

source§

fn ResizeBy(&self, x: i32, y: i32)

source§

fn MoveTo(&self, x: i32, y: i32)

source§

fn MoveBy(&self, x: i32, y: i32)

source§

fn ScreenX(&self) -> i32

source§

fn ScreenY(&self) -> i32

source§

fn OuterHeight(&self) -> i32

source§

fn OuterWidth(&self) -> i32

source§

fn DevicePixelRatio(&self) -> Finite<f64>

source§

fn Status(&self) -> DOMString

source§

fn SetStatus(&self, status: DOMString)

source§

fn MatchMedia(&self, query: DOMString) -> Root<Dom<MediaQueryList>>

source§

fn Fetch( &self, input: RequestOrUSVString, init: RootedTraceableBox<RequestInit>, comp: InRealm<'_>, can_gc: CanGc, ) -> Rc<Promise>

source§

fn TestRunner(&self) -> Root<Dom<TestRunner>>

source§

fn RunningAnimationCount(&self) -> u32

source§

fn SetName(&self, name: DOMString)

source§

fn Name(&self) -> DOMString

source§

fn Origin(&self) -> USVString

source§

fn GetSelection(&self) -> Option<Root<Dom<Selection>>>

source§

fn Event(&self, cx: JSContext, rval: MutableHandleValue<'_>)

source§

fn IsSecureContext(&self) -> bool

source§

fn NamedGetter( &self, _cx: JSContext, name: DOMString, ) -> Option<NonNull<JSObject>>

source§

fn SupportedPropertyNames(&self) -> Vec<DOMString>

source§

impl DerivedFrom<EventTarget> for Window

source§

impl DerivedFrom<GlobalScope> for Window

source§

impl Eq for Window

Auto Trait Implementations§

§

impl !Freeze for Window

§

impl !RefUnwindSafe for Window

§

impl !Send for Window

§

impl !Sync for Window

§

impl Unpin for Window

§

impl !UnwindSafe for Window

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Downcast<T> for T

source§

fn downcast(&self) -> &T

source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> Filterable for T

source§

fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>

Creates a filterable data provider with the given name for debugging. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
source§

impl<T> MaybeBoxed<Box<T>> for T

source§

fn maybe_boxed(self) -> Box<T>

Convert
source§

impl<T> MaybeBoxed<T> for T

source§

fn maybe_boxed(self) -> T

Convert
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
source§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

source§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> Upcast<T> for T

source§

fn upcast(&self) -> Option<&T>

source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> ErasedDestructor for T
where T: 'static,

source§

impl<T> MaybeSendSync for T