Skip to main content

NodeRef

Struct NodeRef 

Source
pub struct NodeRef { /* private fields */ }
Expand description

A node by its key, resolved in the active editor state on every call, so it always reads the latest version, as JS node methods do through getLatest(). Like a JS node reference, it can only be used inside Editor::read or EditorState::read, and panics elsewhere.

Implementations§

Source§

impl NodeRef

Source

pub fn get_highlight_type(&self) -> Option<String>

CodeHighlightNode.getHighlightType(); None when it is undefined, or for any other node (a class that extends it keeps no highlight type of its own here).

Source

pub fn set_highlight_type(&self, highlight_type: Option<&str>)

CodeHighlightNode.setHighlightType(highlightType): an empty one is undefined. Does nothing to any other node.

Source§

impl NodeRef

Source

pub fn get_language(&self) -> Option<String>

CodeNode.getLanguage(); None when it is undefined, or for any other node.

Source

pub fn set_language(&self, language: Option<&str>)

CodeNode.setLanguage(language): an empty one is undefined. Does nothing to any other node.

Source

pub fn get_theme(&self) -> Option<String>

CodeNode.getTheme(); None when it is undefined, or for any other node.

Source

pub fn set_theme(&self, theme: Option<&str>)

CodeNode.setTheme(theme): an empty one is undefined. Does nothing to any other node.

Source

pub fn get_is_syntax_highlight_supported(&self) -> bool

CodeNode.getIsSyntaxHighlightSupported(); false for any other node.

Source

pub fn set_is_syntax_highlight_supported(&self, is_supported: bool)

CodeNode.setIsSyntaxHighlightSupported(isSupported). Does nothing to any other node.

Source§

impl NodeRef

Source

pub fn get_decorator_block_format(&self) -> Option<&'static str>

DecoratorBlockNode.getFormat(); None for any other node.

Source

pub fn set_decorator_block_format(&self, format: &str)

DecoratorBlockNode.setFormat(format): '' for a string that names no format. Does nothing to any other node.

Source§

impl NodeRef

Source

pub fn get_url(&self) -> Option<String>

LinkNode.getURL(); None for any other node.

Source

pub fn set_url(&self, url: &str)

LinkNode.setURL(url). Does nothing to any other node.

Source

pub fn get_target(&self) -> Option<String>

LinkNode.getTarget(); None when it is null, or for any other node.

Source

pub fn set_target(&self, target: Option<&str>)

LinkNode.setTarget(target). Does nothing to any other node.

Source

pub fn get_rel(&self) -> Option<String>

LinkNode.getRel(); None when it is null, or for any other node.

Source

pub fn set_rel(&self, rel: Option<&str>)

LinkNode.setRel(rel). Does nothing to any other node.

Source

pub fn get_title(&self) -> Option<String>

LinkNode.getTitle(); None when it is null, or for any other node.

Source

pub fn set_title(&self, title: Option<&str>)

LinkNode.setTitle(title). Does nothing to any other node.

Source

pub fn get_is_unlinked(&self) -> Option<bool>

AutoLinkNode.getIsUnlinked(); None for any other node.

Source

pub fn set_is_unlinked(&self, value: bool)

AutoLinkNode.setIsUnlinked(value). Does nothing to any other node.

Source

pub fn is_email_uri(&self) -> bool

LinkNode.isEmailURI(): whether the URL starts with mailto:; false for any other node.

Source

pub fn is_web_site_uri(&self) -> bool

LinkNode.isWebSiteURI(): whether the URL starts with https:// or http://; false for any other node.

LinkNode.shouldMergeAdjacentLink(otherLink): whether two links of the same type have the same URL and attributes. AutoLinkNode’s is always false, so adjacent autolinks never merge.

Source§

impl NodeRef

Source

pub fn get_list_item_value(&self) -> Option<f64>

ListItemNode.getValue(); None for any other node.

Source

pub fn set_list_item_value(&self, value: f64)

ListItemNode.setValue(value). Does nothing to any other node.

Source

pub fn get_checked(&self) -> Option<bool>

ListItemNode.getChecked(): whether the item is checked when its list is a check list, None otherwise (and for any other node).

Source

pub fn set_checked(&self, checked: Option<bool>)

ListItemNode.setChecked(checked). Does nothing to any other node.

Source

pub fn toggle_checked(&self)

ListItemNode.toggleChecked(). Does nothing to any other node.

Source§

impl NodeRef

Source

pub fn get_list_type(&self) -> Option<ListType>

ListNode.getListType(); None for any other node.

Source

pub fn set_list_type(&self, list_type: ListType)

ListNode.setListType(type). Does nothing to any other node.

Source

pub fn get_list_tag(&self) -> Option<&'static str>

ListNode.getTag(); None for any other node.

Source

pub fn get_list_start(&self) -> Option<f64>

ListNode.getStart(); None for any other node.

Source

pub fn set_list_start(&self, start: f64)

ListNode.setStart(start). Does nothing to any other node.

Source§

impl NodeRef

Source

pub fn has_id(&self, id: &str) -> bool

MarkNode.hasID(id); false for any other node.

Source

pub fn get_ids(&self) -> Option<Vec<String>>

MarkNode.getIDs(): a copy of the ids; None for any other node.

Source

pub fn set_ids(&self, ids: &[String])

MarkNode.setIDs(ids), as given (duplicates too). Does nothing to any other node.

Source

pub fn add_id(&self, id: &str)

MarkNode.addID(id): appends id unless the mark has it. The mark is written either way. Does nothing to any other node.

Source

pub fn delete_id(&self, id: &str)

MarkNode.deleteID(id): removes the first id, if any. The mark is written either way, and stays when it has no ids left. Does nothing to any other node.

Source§

impl NodeRef

Source

pub fn get_key(&self) -> &str

Source

pub fn get_latest(&self) -> Rc<dyn LexicalNode>

getLatest(): the node’s version in the active editor state.

Source

pub fn get_type(&self) -> &'static str

Source

pub fn is_element(&self) -> bool

$isElementNode(node).

Source

pub fn is_text(&self) -> bool

$isTextNode(node).

Source

pub fn is_decorator(&self) -> bool

$isDecoratorNode(node).

Source

pub fn is_isolated(&self) -> bool

DecoratorNode.isIsolated().

Source

pub fn is_keyboard_selectable(&self) -> bool

DecoratorNode.isKeyboardSelectable().

Source

pub fn is_root(&self) -> bool

$isRootNode(node).

Source

pub fn is_inline(&self) -> bool

Source

pub fn get_parent(&self) -> Option<NodeRef>

Source

pub fn get_parents(&self) -> Vec<NodeRef>

getParents(): the ancestors, nearest first.

Source

pub fn get_previous_sibling(&self) -> Option<NodeRef>

Source

pub fn get_next_sibling(&self) -> Option<NodeRef>

Source

pub fn get_first_child(&self) -> Option<NodeRef>

Source

pub fn get_last_child(&self) -> Option<NodeRef>

Source

pub fn get_children_size(&self) -> usize

Source

pub fn get_children(&self) -> Vec<NodeRef>

getChildren(); empty for a node that isn’t an element.

Source

pub fn get_text_content(&self) -> String

Source

pub fn export_json(&self, compact: bool) -> Object

exportJSON(compact), with the node’s NodeState.

Source

pub fn update_from_json(&self, json: &Object) -> Result<(), LexicalError>

updateFromJSON(json): the NodeState in the JSON ($updateStateFromJSON), then $applyJSONSetters (the flat states, then the class’s properties).

Source

pub fn get_parent_or_throw(&self) -> Result<NodeRef, LexicalError>

getParentOrThrow().

Source

pub fn is_attached(&self) -> bool

isAttached(): whether the node’s parents (and slot hosts) lead to the root.

Source

pub fn get_index_within_parent(&self) -> Option<usize>

getIndexWithinParent(); None where JS returns -1.

Source

pub fn get_text_content_size(&self) -> usize

getTextContentSize(): the text content’s length in UTF-16 code units.

Source

pub fn can_be_empty(&self) -> bool

ElementNode.canBeEmpty().

Source

pub fn can_indent(&self) -> bool

ElementNode.canIndent().

Source

pub fn can_merge_when_empty(&self) -> bool

ElementNode.canMergeWhenEmpty().

Source

pub fn is_parent_required(&self) -> bool

isParentRequired().

Source

pub fn create_parent_element_node(&self) -> NodeRef

createParentElementNode().

Source

pub fn insert_new_after( &self, selection: &SelectionRef, restore_selection: bool, ) -> Result<Option<NodeRef>, LexicalError>

ElementNode.insertNewAfter(selection, restoreSelection).

Source

pub fn collapse_at_start( &self, selection: &SelectionRef, ) -> Result<bool, LexicalError>

ElementNode.collapseAtStart(selection).

Source

pub fn extract_with_child( &self, child: &NodeRef, selection: Option<&SelectionRef>, destination: &str, ) -> Result<bool, LexicalError>

ElementNode.extractWithChild(child, selection, destination).

Source

pub fn is_text_entity(&self) -> bool

TextNode.isTextEntity().

Source

pub fn can_have_format(&self) -> bool

TextNode.canHaveFormat().

Source

pub fn exclude_from_copy(&self, destination: &str) -> bool

ElementNode.excludeFromCopy(destination).

Source

pub fn can_replace_with(&self, replacement: &NodeRef) -> bool

ElementNode.canReplaceWith(replacement) (deprecated upstream).

Source

pub fn can_insert_after(&self, node: &NodeRef) -> bool

ElementNode.canInsertAfter(node) (deprecated upstream).

Source

pub fn get_top_level_element(&self) -> Result<Option<NodeRef>, LexicalError>

getTopLevelElement(): the highest ancestor of this node (or the node) below the root or a shadow root, or a slot value (the top of its isolated scope), or None when there is none (the root, or a node that isn’t attached). Fails where JS’s invariant does: on a non-element ancestor of the node, or a text node at the top.

Source

pub fn get_top_level_element_or_throw(&self) -> Result<NodeRef, LexicalError>

getTopLevelElementOrThrow(): get_top_level_element, failing where it is None (with RootNode’s own message for the root).

Source

pub fn get_parent_keys(&self) -> Vec<NodeKey>

getParentKeys(): the keys of the ancestors, nearest first.

Source

pub fn get_children_keys(&self) -> Vec<NodeKey>

ElementNode.getChildrenKeys().

Source

pub fn is_last_child(&self) -> Result<bool, LexicalError>

ElementNode.isLastChild(): whether this is its parent’s last child. Fails without a parent.

Source

pub fn get_first_child_or_throw(&self) -> Result<NodeRef, LexicalError>

ElementNode.getFirstChildOrThrow().

Source

pub fn get_last_child_or_throw(&self) -> Result<NodeRef, LexicalError>

ElementNode.getLastChildOrThrow().

Source

pub fn has_text_format(&self, format_type: &str) -> bool

ElementNode.hasTextFormat(type): whether the element’s text format (__textFormat) has the format.

Source

pub fn get_format_flags( &self, format_type: &str, align_with_format: Option<i32>, ) -> i32

getFormatFlags(type, alignWithFormat) of a text node (its __format) or an element (its __textFormat): the format with type toggled (toggleTextFormatType).

Source

pub fn is_directionless(&self) -> bool

TextNode.isDirectionless(): whether the text’s detail has IS_DIRECTIONLESS.

Source

pub fn is_parent_of(&self, target: &NodeRef) -> bool

isParentOf(targetNode): whether this node is an ancestor of target.

Source

pub fn is_selected( &self, selection: Option<&SelectionRef>, ) -> Result<bool, LexicalError>

isSelected(selection): whether the node is among the nodes of selection, or of the current selection when None. An element or decorator isn’t selected by a collapsed range between children, and an inline decorator that is its parent’s last child isn’t selected by an element range starting at the parent’s end.

Source

pub fn is_before(&self, target: &NodeRef) -> bool

isBefore(targetNode): whether this node comes before target in the document.

Source

pub fn get_nodes_between(&self, target: &NodeRef) -> Vec<NodeRef>

getNodesBetween(targetNode): the nodes from this one to target, both included, in document order, with the ancestors the walk enters or leaves on the way.

Source

pub fn mark_dirty(&self)

markDirty(): marks the node dirty, so transforms run on it.

Source

pub fn remove(&self, preserve_empty_parent: bool) -> Result<(), LexicalError>

remove(preserveEmptyParent).

Source

pub fn replace( &self, replace_with: &NodeRef, include_children: bool, ) -> Result<NodeRef, LexicalError>

replace(replaceWith, includeChildren): puts replace_with where this node is, with this node’s children when include_children.

Source

pub fn insert_after( &self, node_to_insert: &NodeRef, restore_selection: bool, ) -> Result<NodeRef, LexicalError>

insertAfter(nodeToInsert, restoreSelection).

Source

pub fn get_indent(&self) -> Result<f64, LexicalError>

ElementNode.getIndent().

Source

pub fn set_indent(&self, indent: f64) -> Result<(), LexicalError>

ElementNode.setIndent(indentLevel).

Source

pub fn get_previous_siblings(&self) -> Vec<NodeRef>

getPreviousSiblings(): the siblings before this node, in document order.

Source

pub fn get_next_siblings(&self) -> Vec<NodeRef>

getNextSiblings(): the siblings after this node, in document order.

Source

pub fn insert_before( &self, node_to_insert: &NodeRef, restore_selection: bool, ) -> Result<NodeRef, LexicalError>

insertBefore(nodeToInsert, restoreSelection).

Source

pub fn select( &self, anchor_offset: Option<usize>, focus_offset: Option<usize>, ) -> Result<SelectionRef, LexicalError>

select(anchorOffset, focusOffset) of a text node or an element; None is JS’s undefined (the end).

Source

pub fn select_start(&self) -> Result<SelectionRef, LexicalError>

selectStart().

Source

pub fn select_end(&self) -> Result<SelectionRef, LexicalError>

selectEnd().

Source

pub fn select_previous( &self, anchor_offset: Option<usize>, focus_offset: Option<usize>, ) -> Result<SelectionRef, LexicalError>

selectPrevious(anchorOffset, focusOffset).

Source

pub fn select_next( &self, anchor_offset: Option<usize>, focus_offset: Option<usize>, ) -> Result<SelectionRef, LexicalError>

selectNext(anchorOffset, focusOffset).

Source§

impl NodeRef

ElementNode’s methods, for a node that is an element. They panic on any other node, as calling them on one is a bug.

Source

pub fn element_data(&self) -> ElementData

The element’s fields (getFormat(), getIndent(), …).

Source

pub fn is_empty(&self) -> bool

isEmpty(): no children and no slots (a host that holds content in its slots only is not empty).

Source

pub fn get_all_text_nodes(&self) -> Vec<NodeRef>

getAllTextNodes(): the text nodes of the slots, then the children’s.

Source

pub fn get_child_at_index(&self, index: usize) -> Option<NodeRef>

getChildAtIndex(index).

Source

pub fn get_first_descendant(&self) -> Option<NodeRef>

getFirstDescendant().

Source

pub fn get_last_descendant(&self) -> Option<NodeRef>

getLastDescendant().

Source

pub fn get_descendant_by_index(&self, index: usize) -> Option<NodeRef>

getDescendantByIndex(index): the first descendant of the child at index, or the last descendant of the last child for an index past the end; the child itself when it is not an element or is empty.

Source

pub fn select_element( &self, anchor_offset: Option<usize>, focus_offset: Option<usize>, ) -> Result<SelectionRef, LexicalError>

ElementNode.select(anchorOffset, focusOffset): an element range at those child offsets, the end by default.

Source

pub fn clear(&self) -> Result<(), LexicalError>

clear(): removes every child.

Source

pub fn append(&self, nodes: &[NodeRef]) -> Result<(), LexicalError>

append(...nodesToAppend).

Source

pub fn set_direction(&self, direction: Option<Direction>)

setDirection(direction).

Source

pub fn set_element_format(&self, format_type: &str)

setFormat(type): an alignment by name ('center', …); '' and unknown names clear it.

Source

pub fn set_element_style(&self, style: &str)

setStyle(style).

Source

pub fn set_text_format(&self, text_format: f64)

setTextFormat(type).

Source

pub fn set_text_style(&self, style: &str)

setTextStyle(style).

Source

pub fn splice( &self, start: usize, delete_count: usize, nodes_to_insert: &[NodeRef], ) -> Result<(), LexicalError>

splice(start, deleteCount, nodesToInsert): removes delete_count children from start and inserts nodes there (moving any that are in the tree already), repairing the selection when children are removed.

Source§

impl NodeRef

TextNode’s methods, for a node that is a text node (a TextNode or a subclass such as TabNode). They panic on any other node, as calling them on one is a bug.

Source

pub fn text_data(&self) -> TextData

The text node’s fields (getFormat(), getStyle(), …).

Source

pub fn is_composing(&self) -> bool

isComposing(): whether an input method is composing in this node.

Source

pub fn is_simple_text(&self) -> bool

isSimpleText(): a plain text node in normal mode.

Source

pub fn is_unmergeable(&self) -> bool

isUnmergeable().

Source

pub fn is_token(&self) -> bool

isToken().

Source

pub fn is_segmented(&self) -> bool

isSegmented().

Source

pub fn has_format(&self, format_type: &str) -> bool

hasFormat(type).

Source

pub fn set_format(&self, format: f64)

setFormat(format) with a number, which a node class may override (LexicalNode::set_format).

Source

pub fn set_format_type(&self, format_type: &str)

setFormat(type) with a name, such as 'bold'.

Source

pub fn set_detail(&self, detail: f64) -> Result<(), LexicalError>

setDetail(detail) with a number. A tab only takes IS_UNMERGEABLE, which it has.

Source

pub fn set_detail_type(&self, detail_type: &str) -> Result<(), LexicalError>

setDetail(type) with a name: 'directionless' or 'unmergeable'.

Source

pub fn set_style(&self, style: &str)

setStyle(style).

Source

pub fn toggle_format(&self, format_type: &str)

toggleFormat(type).

Source

pub fn toggle_directionless(&self)

toggleDirectionless().

Source

pub fn toggle_unmergeable(&self)

toggleUnmergeable().

Source

pub fn set_mode(&self, mode_type: &str) -> Result<(), LexicalError>

setMode(type): 'normal', 'token' or 'segmented'. A tab is always normal.

Source

pub fn set_text_content(&self, text: &str)

setTextContent(text). A tab keeps its \t.

Source

pub fn select_text( &self, anchor_offset: Option<usize>, focus_offset: Option<usize>, ) -> Result<SelectionRef, LexicalError>

TextNode.select(anchorOffset, focusOffset): a text range at those UTF-16 offsets, the end by default.

Source

pub fn splice_text( &self, offset: i64, del_count: i64, new_text: &str, move_selection: bool, ) -> Result<NodeRef, LexicalError>

spliceText(offset, delCount, newText, moveSelection): replaces del_count UTF-16 units at offset with new_text, and moves a range selection after it when move_selection.

Source

pub fn split_text( &self, split_offsets: &[i64], ) -> Result<Vec<NodeRef>, LexicalError>

splitText(...splitOffsets): splits the text at those UTF-16 offsets into this node and new siblings with the same format, style and detail, and returns the parts. A segmented node is replaced.

Source

pub fn merge_with_sibling( &self, target: &NodeRef, ) -> Result<NodeRef, LexicalError>

mergeWithSibling(target): appends (or prepends) the text of an adjacent text node and removes it, keeping the selection on the same text.

Source§

impl NodeRef

Source

pub fn get_heading_tag(&self) -> Option<HeadingTagType>

HeadingNode.getTag(); None for any other node.

Source

pub fn set_heading_tag(&self, tag: HeadingTagType)

HeadingNode.setTag(tag). Does nothing to any other node.

Source

pub fn set_quote_is_shadow_root( &self, is_shadow_root: bool, ) -> Result<(), LexicalError>

QuoteNode.setIsShadowRoot(isShadowRoot): sets quote_shadow_root_state. Does nothing to any other node.

Source§

impl NodeRef

Source

pub fn can_insert_text_before(&self) -> bool

canInsertTextBefore() of a text node or an element.

Source

pub fn can_insert_text_after(&self) -> bool

canInsertTextAfter() of a text node or an element.

Source§

impl NodeRef

Source

pub fn get_col_span(&self) -> f64

TableCellNode.getColSpan(); 1 for any other node.

Source

pub fn set_col_span(&self, col_span: f64)

TableCellNode.setColSpan(colSpan).

Source

pub fn get_row_span(&self) -> f64

TableCellNode.getRowSpan(); 1 for any other node.

Source

pub fn set_row_span(&self, row_span: f64)

TableCellNode.setRowSpan(rowSpan).

Source

pub fn get_table_cell_tag(&self) -> Option<&'static str>

TableCellNode.getTag(); None for any other node.

Source

pub fn set_header_styles(&self, header_state: i32, mask: i32)

TableCellNode.setHeaderStyles(headerState, mask): the bits of mask take those of header_state, the others stay.

Source

pub fn get_header_styles(&self) -> i32

TableCellNode.getHeaderStyles(); NO_STATUS for any other node.

Source

pub fn set_cell_width(&self, width: Option<f64>)

TableCellNode.setWidth(width).

Source

pub fn get_cell_width(&self) -> Option<f64>

TableCellNode.getWidth().

Source

pub fn get_background_color(&self) -> Option<String>

TableCellNode.getBackgroundColor().

Source

pub fn set_background_color(&self, background_color: Option<&str>)

TableCellNode.setBackgroundColor(newBackgroundColor).

Source

pub fn get_vertical_align(&self) -> Option<String>

TableCellNode.getVerticalAlign().

Source

pub fn set_vertical_align(&self, vertical_align: Option<&str>)

TableCellNode.setVerticalAlign(newVerticalAlign): an empty string is undefined.

Source

pub fn toggle_header_style(&self, header_state_to_toggle: i32)

TableCellNode.toggleHeaderStyle(headerStateToToggle): clears the bits when the cell has all of them, sets them otherwise.

Source

pub fn has_header_state(&self, header_state: i32) -> bool

TableCellNode.hasHeaderState(headerState).

Source

pub fn has_header(&self) -> bool

TableCellNode.hasHeader().

Source§

impl NodeRef

Source

pub fn get_col_widths(&self) -> Option<Vec<f64>>

TableNode.getColWidths().

Source

pub fn set_col_widths(&self, col_widths: Option<Vec<f64>>)

TableNode.setColWidths(colWidths).

Source

pub fn get_row_striping(&self) -> bool

TableNode.getRowStriping().

Source

pub fn set_row_striping(&self, row_striping: bool)

TableNode.setRowStriping(newRowStriping).

Source

pub fn set_frozen_columns(&self, column_count: f64)

TableNode.setFrozenColumns(columnCount).

Source

pub fn get_frozen_columns(&self) -> f64

TableNode.getFrozenColumns().

Source

pub fn set_frozen_rows(&self, row_count: f64)

TableNode.setFrozenRows(rowCount).

Source

pub fn get_frozen_rows(&self) -> f64

TableNode.getFrozenRows().

Source

pub fn get_column_count(&self) -> usize

TableNode.getColumnCount(): the spans of the first row’s cells.

Source§

impl NodeRef

Source

pub fn set_row_height(&self, height: Option<f64>)

TableRowNode.setHeight(height); does nothing to any other node.

Source

pub fn get_row_height(&self) -> Option<f64>

TableRowNode.getHeight().

Trait Implementations§

Source§

impl Clone for NodeRef

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NodeRef

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for NodeRef

Source§

impl Hash for NodeRef

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for NodeRef

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for NodeRef

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> SignalValue for T
where T: Clone + PartialEq + 'static,

Source§

fn is_same(&self, other: &T) -> bool

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.