#[repr(C)]pub struct Range {
reflector_: Reflector,
start: BoundaryPoint,
end: BoundaryPoint,
associated_selections: DomRefCell<Vec<Dom<Selection>>>,
}
Fields§
§reflector_: Reflector
§start: BoundaryPoint
§end: BoundaryPoint
§associated_selections: DomRefCell<Vec<Dom<Selection>>>
Implementations§
source§impl Range
impl Range
fn __assert_parent_type(&self)
source§impl Range
impl Range
fn new_inherited(
start_container: &Node,
start_offset: u32,
end_container: &Node,
end_offset: u32
) -> Range
pub fn new_with_doc(
document: &Document,
proto: Option<HandleObject<'_>>
) -> Root<Dom<Range>>
pub fn new(
document: &Document,
start_container: &Node,
start_offset: u32,
end_container: &Node,
end_offset: u32
) -> Root<Dom<Range>>
fn new_with_proto(
document: &Document,
proto: Option<HandleObject<'_>>,
start_container: &Node,
start_offset: u32,
end_container: &Node,
end_offset: u32
) -> Root<Dom<Range>>
pub fn Constructor(
window: &Window,
proto: Option<HandleObject<'_>>
) -> Result<Root<Dom<Range>>, Error>
fn contains(&self, node: &Node) -> bool
fn partially_contains(&self, node: &Node) -> bool
fn contained_children(
&self
) -> Result<(Option<Root<Dom<Node>>>, Option<Root<Dom<Node>>>, Vec<Root<Dom<Node>>>), Error>
fn set_start(&self, node: &Node, offset: u32)
fn set_end(&self, node: &Node, offset: u32)
fn compare_point(&self, node: &Node, offset: u32) -> Result<Ordering, Error>
pub fn associate_selection(&self, selection: &Selection)
pub fn disassociate_selection(&self, selection: &Selection)
fn report_change(&self)
Trait Implementations§
source§impl DomObjectWrap for Range
impl DomObjectWrap for Range
source§const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::RangeBinding::Range_Binding::Wrap as for<'a, 'b> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::range::Range>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::range::Range>>}
const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::RangeBinding::Range_Binding::Wrap as for<'a, 'b> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::range::Range>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::range::Range>>}
Function pointer to the general wrap function type
source§impl IDLInterface for Range
impl IDLInterface for Range
source§impl MallocSizeOf for Range
impl MallocSizeOf for Range
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
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 Range
impl MutDomObject for Range
source§unsafe fn init_reflector(&self, obj: *mut JSObject)
unsafe fn init_reflector(&self, obj: *mut JSObject)
Initializes the Reflector
source§impl PartialEq<Range> for Range
impl PartialEq<Range> for Range
source§impl RangeMethods for Range
impl RangeMethods for Range
fn StartContainer(&self) -> Root<Dom<Node>>
fn StartOffset(&self) -> u32
fn EndContainer(&self) -> Root<Dom<Node>>
fn EndOffset(&self) -> u32
fn Collapsed(&self) -> bool
fn CommonAncestorContainer(&self) -> Root<Dom<Node>>
fn SetStart(&self, node: &Node, offset: u32) -> Result<(), Error>
fn SetEnd(&self, node: &Node, offset: u32) -> Result<(), Error>
fn SetStartBefore(&self, node: &Node) -> Result<(), Error>
fn SetStartAfter(&self, node: &Node) -> Result<(), Error>
fn SetEndBefore(&self, node: &Node) -> Result<(), Error>
fn SetEndAfter(&self, node: &Node) -> Result<(), Error>
fn Collapse(&self, to_start: bool)
fn SelectNode(&self, node: &Node) -> Result<(), Error>
fn SelectNodeContents(&self, node: &Node) -> Result<(), Error>
fn CompareBoundaryPoints(&self, how: u16, other: &Range) -> Result<i16, Error>
fn CloneRange(&self) -> Root<Dom<Range>>
fn IsPointInRange(&self, node: &Node, offset: u32) -> Result<bool, Error>
fn ComparePoint(&self, node: &Node, offset: u32) -> Result<i16, Error>
fn IntersectsNode(&self, node: &Node) -> bool
fn CloneContents(&self) -> Result<Root<Dom<DocumentFragment>>, Error>
fn ExtractContents(&self) -> Result<Root<Dom<DocumentFragment>>, Error>
fn Detach(&self)
fn InsertNode(&self, node: &Node) -> Result<(), Error>
fn DeleteContents(&self) -> Result<(), Error>
fn SurroundContents(&self, new_parent: &Node) -> Result<(), Error>
fn Stringifier(&self) -> DOMString
fn CreateContextualFragment(
&self,
fragment: DOMString
) -> Result<Root<Dom<DocumentFragment>>, Error>
source§impl ToJSValConvertible for Range
impl ToJSValConvertible for Range
Auto Trait Implementations§
impl !RefUnwindSafe for Range
impl !Send for Range
impl !Sync for Range
impl Unpin for Range
impl !UnwindSafe for Range
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> MaybeBoxed<Box<T, Global>> for T
impl<T> MaybeBoxed<Box<T, Global>> for T
source§fn maybe_boxed(self) -> Box<T, Global>
fn maybe_boxed(self) -> Box<T, Global>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert