[][src]Struct web_sys::Range

#[repr(transparent)]
pub struct Range { /* fields omitted */ }

The Range object

MDN Documentation

This API requires the following crate features to be activated: Range

Methods

impl Range[src]

pub fn new() -> Result<Range, JsValue>[src]

The new Range(..) constructor, creating a new instance of Range

MDN Documentation

This API requires the following crate features to be activated: Range

impl Range[src]

pub fn clone_contents(&self) -> Result<DocumentFragment, JsValue>[src]

The cloneContents() method

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment, Range

impl Range[src]

pub fn clone_range(&self) -> Range[src]

The cloneRange() method

MDN Documentation

This API requires the following crate features to be activated: Range

impl Range[src]

pub fn collapse(&self)[src]

The collapse() method

MDN Documentation

This API requires the following crate features to be activated: Range

impl Range[src]

pub fn collapse_with_to_start(&self, to_start: bool)[src]

The collapse() method

MDN Documentation

This API requires the following crate features to be activated: Range

impl Range[src]

pub fn compare_boundary_points(
    &self,
    how: u16,
    source_range: &Range
) -> Result<i16, JsValue>
[src]

The compareBoundaryPoints() method

MDN Documentation

This API requires the following crate features to be activated: Range

impl Range[src]

pub fn compare_point(&self, node: &Node, offset: u32) -> Result<i16, JsValue>[src]

The comparePoint() method

MDN Documentation

This API requires the following crate features to be activated: Node, Range

impl Range[src]

pub fn create_contextual_fragment(
    &self,
    fragment: &str
) -> Result<DocumentFragment, JsValue>
[src]

The createContextualFragment() method

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment, Range

impl Range[src]

pub fn delete_contents(&self) -> Result<(), JsValue>[src]

The deleteContents() method

MDN Documentation

This API requires the following crate features to be activated: Range

impl Range[src]

pub fn detach(&self)[src]

The detach() method

MDN Documentation

This API requires the following crate features to be activated: Range

impl Range[src]

pub fn extract_contents(&self) -> Result<DocumentFragment, JsValue>[src]

The extractContents() method

MDN Documentation

This API requires the following crate features to be activated: DocumentFragment, Range

impl Range[src]

pub fn get_bounding_client_rect(&self) -> DomRect[src]

The getBoundingClientRect() method

MDN Documentation

This API requires the following crate features to be activated: DomRect, Range

impl Range[src]

pub fn get_client_rects(&self) -> Option<DomRectList>[src]

The getClientRects() method

MDN Documentation

This API requires the following crate features to be activated: DomRectList, Range

impl Range[src]

pub fn insert_node(&self, node: &Node) -> Result<(), JsValue>[src]

The insertNode() method

MDN Documentation

This API requires the following crate features to be activated: Node, Range

impl Range[src]

pub fn intersects_node(&self, node: &Node) -> Result<bool, JsValue>[src]

The intersectsNode() method

MDN Documentation

This API requires the following crate features to be activated: Node, Range

impl Range[src]

pub fn is_point_in_range(
    &self,
    node: &Node,
    offset: u32
) -> Result<bool, JsValue>
[src]

The isPointInRange() method

MDN Documentation

This API requires the following crate features to be activated: Node, Range

impl Range[src]

pub fn select_node(&self, ref_node: &Node) -> Result<(), JsValue>[src]

The selectNode() method

MDN Documentation

This API requires the following crate features to be activated: Node, Range

impl Range[src]

pub fn select_node_contents(&self, ref_node: &Node) -> Result<(), JsValue>[src]

The selectNodeContents() method

MDN Documentation

This API requires the following crate features to be activated: Node, Range

impl Range[src]

pub fn set_end(&self, ref_node: &Node, offset: u32) -> Result<(), JsValue>[src]

The setEnd() method

MDN Documentation

This API requires the following crate features to be activated: Node, Range

impl Range[src]

pub fn set_end_after(&self, ref_node: &Node) -> Result<(), JsValue>[src]

The setEndAfter() method

MDN Documentation

This API requires the following crate features to be activated: Node, Range

impl Range[src]

pub fn set_end_before(&self, ref_node: &Node) -> Result<(), JsValue>[src]

The setEndBefore() method

MDN Documentation

This API requires the following crate features to be activated: Node, Range

impl Range[src]

pub fn set_start(&self, ref_node: &Node, offset: u32) -> Result<(), JsValue>[src]

The setStart() method

MDN Documentation

This API requires the following crate features to be activated: Node, Range

impl Range[src]

pub fn set_start_after(&self, ref_node: &Node) -> Result<(), JsValue>[src]

The setStartAfter() method

MDN Documentation

This API requires the following crate features to be activated: Node, Range

impl Range[src]

pub fn set_start_before(&self, ref_node: &Node) -> Result<(), JsValue>[src]

The setStartBefore() method

MDN Documentation

This API requires the following crate features to be activated: Node, Range

impl Range[src]

pub fn surround_contents(&self, new_parent: &Node) -> Result<(), JsValue>[src]

The surroundContents() method

MDN Documentation

This API requires the following crate features to be activated: Node, Range

impl Range[src]

pub fn start_container(&self) -> Result<Node, JsValue>[src]

The startContainer getter

MDN Documentation

This API requires the following crate features to be activated: Node, Range

impl Range[src]

pub fn start_offset(&self) -> Result<u32, JsValue>[src]

The startOffset getter

MDN Documentation

This API requires the following crate features to be activated: Range

impl Range[src]

pub fn end_container(&self) -> Result<Node, JsValue>[src]

The endContainer getter

MDN Documentation

This API requires the following crate features to be activated: Node, Range

impl Range[src]

pub fn end_offset(&self) -> Result<u32, JsValue>[src]

The endOffset getter

MDN Documentation

This API requires the following crate features to be activated: Range

impl Range[src]

pub fn collapsed(&self) -> bool[src]

The collapsed getter

MDN Documentation

This API requires the following crate features to be activated: Range

impl Range[src]

pub fn common_ancestor_container(&self) -> Result<Node, JsValue>[src]

The commonAncestorContainer getter

MDN Documentation

This API requires the following crate features to be activated: Node, Range

impl Range[src]

impl Range[src]

impl Range[src]

pub const END_TO_END: u16[src]

impl Range[src]

Trait Implementations

impl AsRef<JsValue> for Range[src]

impl AsRef<Object> for Range[src]

impl From<JsValue> for Range[src]

impl From<Range> for JsValue[src]

impl From<Range> for Object[src]

impl Clone for Range[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Range[src]

impl Deref for Range[src]

type Target = Object

The resulting type after dereferencing.

impl FromWasmAbi for Range[src]

type Abi = <JsValue as FromWasmAbi>::Abi

The wasm ABI type that this converts from when coming back out from the ABI boundary. Read more

impl IntoWasmAbi for Range[src]

type Abi = <JsValue as IntoWasmAbi>::Abi

The wasm ABI type that this converts into when crossing the ABI boundary. Read more

impl<'a> IntoWasmAbi for &'a Range[src]

type Abi = <&'a JsValue as IntoWasmAbi>::Abi

The wasm ABI type that this converts into when crossing the ABI boundary. Read more

impl WasmDescribe for Range[src]

impl OptionFromWasmAbi for Range[src]

impl OptionIntoWasmAbi for Range[src]

impl<'a> OptionIntoWasmAbi for &'a Range[src]

impl RefFromWasmAbi for Range[src]

type Abi = <JsValue as RefFromWasmAbi>::Abi

The wasm ABI type references to Self are recovered from.

type Anchor = ManuallyDrop<Range>

The type that holds the reference to Self for the duration of the invocation of the function that has an &Self parameter. This is required to ensure that the lifetimes don't persist beyond one function call, and so that they remain anonymous. Read more

impl JsCast for Range[src]

fn is_instance_of<T>(&self) -> bool where
    T: JsCast
[src]

Test whether this JS value is an instance of the type T. Read more

fn dyn_into<T>(self) -> Result<T, Self> where
    T: JsCast
[src]

Performs a dynamic cast (checked at runtime) of this value into the target type T. Read more

fn dyn_ref<T>(&self) -> Option<&T> where
    T: JsCast
[src]

Performs a dynamic cast (checked at runtime) of this value into the target type T. Read more

fn unchecked_into<T>(self) -> T where
    T: JsCast
[src]

Performs a zero-cost unchecked cast into the specified type. Read more

fn unchecked_ref<T>(&self) -> &T where
    T: JsCast
[src]

Performs a zero-cost unchecked cast into a reference to the specified type. Read more

Auto Trait Implementations

impl !Send for Range

impl !Sync for Range

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ReturnWasmAbi for T where
    T: IntoWasmAbi
[src]

type Abi = <T as IntoWasmAbi>::Abi

Same as IntoWasmAbi::Abi