Struct WidgetRef

Source
pub struct WidgetRef(/* private fields */);

Implementations§

Source§

impl WidgetRef

Source

pub fn into_option(self) -> Option<WidgetRef>

Source

pub fn empty() -> Self

Source

pub fn is_empty(&self) -> bool

Source

pub fn new_with_inner(widget: Box<dyn Widget>) -> Self

Source

pub fn handle_event_with( &self, cx: &mut Cx, event: &Event, scope: &mut Scope<'_, '_>, sweep_area: Area, )

§handle event with a sweep area

this is used for the sweep event, this fn can help to pass the event into popup, the widget should implement the handle_event_with fn in impl Widget for $Widget

§Example
impl Widget for Button {
fn handle_event_with(&mut self, cx: &mut Cx, event: &Event, scope: &mut Scope, sweep_area: Area) {
    let uid = self.widget_uid();

    if self.animator_handle_event(cx, event).must_redraw() {
        self.draw_button.redraw(cx);
    }
    match event.hits_with_options(cx, self.draw_button.area(), HitOptions::new().with_sweep_area(sweep_area) ) {
        Hit::FingerDown(f_down) => {
            if self.grab_key_focus {
                 cx.set_key_focus(self.sweep_area);
            }
            cx.widget_action(uid, &scope.path, GButtonEvent::Pressed(f_down.modifiers));
            self.animator_play(cx, id!(hover.pressed));
        }
        _ =>()
    }
}
§Details

See Flexible Popup

Source

pub fn handle_event( &self, cx: &mut Cx, event: &Event, scope: &mut Scope<'_, '_>, )

Source

pub fn widget_uid(&self) -> WidgetUid

Returns the unique ID (UID) of this widget.

Returns WidgetUid(0) if the widget is currently borrowed or is empty.

Source

pub fn area(&self) -> Area

Source

pub fn widget_to_data( &self, cx: &mut Cx, actions: &Actions, nodes: &mut LiveNodeVec, path: &[LiveId], ) -> bool

Source

pub fn set_action_data<T: ActionTrait + PartialEq>(&self, data: T)

Source

pub fn set_action_data_always<T: ActionTrait>(&self, data: T)

Source

pub fn data_to_widget(&self, cx: &mut Cx, nodes: &[LiveNode], path: &[LiveId])

Source

pub fn uid_to_widget(&self, uid: WidgetUid) -> WidgetRef

Source

pub fn clear_query_cache(&self)

Source

pub fn find_widgets( &self, path: &[LiveId], cached: WidgetCache, results: &mut WidgetSet, )

Source

pub fn widget(&self, path: &[LiveId]) -> WidgetRef

Source

pub fn widgets(&self, paths: &[&[LiveId]]) -> WidgetSet

Source

pub fn widget_set(&self, paths: &[&[LiveId]]) -> WidgetSet

Source

pub fn draw_walk( &self, cx: &mut Cx2d<'_, '_>, scope: &mut Scope<'_, '_>, walk: Walk, ) -> DrawStep

Source

pub fn draw_walk_all( &self, cx: &mut Cx2d<'_, '_>, scope: &mut Scope<'_, '_>, walk: Walk, )

Source

pub fn draw_3d_all(&self, cx: &mut Cx3d<'_, '_>, scope: &mut Scope<'_, '_>)

Source

pub fn draw_3d( &mut self, cx: &mut Cx3d<'_, '_>, scope: &mut Scope<'_, '_>, ) -> DrawStep

Source

pub fn draw( &mut self, cx: &mut Cx2d<'_, '_>, scope: &mut Scope<'_, '_>, ) -> DrawStep

Source

pub fn draw_unscoped(&mut self, cx: &mut Cx2d<'_, '_>) -> DrawStep

Source

pub fn walk(&self, cx: &mut Cx) -> Walk

Source

pub fn redraw(&self, cx: &mut Cx)

Source

pub fn set_visible(&self, cx: &mut Cx, visible: bool)

Source

pub fn visible(&self) -> bool

Source

pub fn text(&self) -> String

Source

pub fn set_text(&self, cx: &mut Cx, v: &str)

Source

pub fn key_focus(&self, cx: &Cx) -> bool

Source

pub fn set_key_focus(&self, cx: &mut Cx)

Source

pub fn set_disabled(&self, cx: &mut Cx, disabled: bool)

Source

pub fn disabled(&self, cx: &Cx) -> bool

Source

pub fn draw_all(&self, cx: &mut Cx2d<'_, '_>, scope: &mut Scope<'_, '_>)

Source

pub fn action_data(&self) -> Option<Arc<dyn ActionTrait>>

Source

pub fn filter_actions<'a>( &'a self, actions: &'a Actions, ) -> impl Iterator<Item = &'a WidgetAction>

Source

pub fn draw_all_unscoped(&self, cx: &mut Cx2d<'_, '_>)

Source

pub fn borrow_mut<T: 'static + Widget>(&self) -> Option<RefMut<'_, T>>

Source

pub fn borrow<T: 'static + Widget>(&self) -> Option<Ref<'_, T>>

Source

pub fn apply_over(&self, cx: &mut Cx, nodes: &[LiveNode])

Trait Implementations§

Source§

impl AdaptiveViewWidgetRefExt for WidgetRef

Source§

impl BareStepSetWidgetRefExt for WidgetRef

Source§

fn bare_step_set(&self, paths: &[&[LiveId]]) -> BareStepSet

Source§

impl BareStepWidgetRefExt for WidgetRef

Source§

impl ButtonSetWidgetRefExt for WidgetRef

Source§

fn button_set(&self, paths: &[&[LiveId]]) -> ButtonSet

Source§

impl ButtonWidgetRefExt for WidgetRef

Source§

fn button(&self, path: &[LiveId]) -> ButtonRef

Source§

fn as_button(&self) -> ButtonRef

Source§

impl CachedWidgetWidgetRefExt for WidgetRef

Source§

impl CheckBoxSetWidgetRefExt for WidgetRef

Source§

fn check_box_set(&self, paths: &[&[LiveId]]) -> CheckBoxSet

Source§

impl CheckBoxWidgetRefExt for WidgetRef

Source§

impl Clone for WidgetRef

Source§

fn clone(&self) -> WidgetRef

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl ColorPickerSetWidgetRefExt for WidgetRef

Source§

impl ColorPickerWidgetRefExt for WidgetRef

Source§

impl CommandTextInputSetWidgetRefExt for WidgetRef

Source§

impl CommandTextInputWidgetRefExt for WidgetRef

Source§

impl Debug for WidgetRef

Source§

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

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

impl Default for WidgetRef

Source§

fn default() -> WidgetRef

Returns the “default value” for a type. Read more
Source§

impl DesignerContainerSetWidgetRefExt for WidgetRef

Source§

impl DesignerContainerWidgetRefExt for WidgetRef

Source§

impl DesignerOutlineSetWidgetRefExt for WidgetRef

Source§

impl DesignerOutlineTreeSetWidgetRefExt for WidgetRef

Source§

impl DesignerOutlineTreeWidgetRefExt for WidgetRef

Source§

impl DesignerOutlineWidgetRefExt for WidgetRef

Source§

impl DesignerSetWidgetRefExt for WidgetRef

Source§

fn designer_set(&self, paths: &[&[LiveId]]) -> DesignerSet

Source§

impl DesignerToolboxSetWidgetRefExt for WidgetRef

Source§

impl DesignerToolboxWidgetRefExt for WidgetRef

Source§

impl DesignerViewSetWidgetRefExt for WidgetRef

Source§

impl DesignerViewWidgetRefExt for WidgetRef

Source§

impl DesignerWidgetRefExt for WidgetRef

Source§

impl DesktopButtonSetWidgetRefExt for WidgetRef

Source§

impl DesktopButtonWidgetRefExt for WidgetRef

Source§

impl DockSetWidgetRefExt for WidgetRef

Source§

fn dock_set(&self, paths: &[&[LiveId]]) -> DockSet

Source§

impl DockWidgetRefExt for WidgetRef

Source§

fn dock(&self, path: &[LiveId]) -> DockRef

Source§

fn as_dock(&self) -> DockRef

Source§

impl DropDownSetWidgetRefExt for WidgetRef

Source§

fn drop_down_set(&self, paths: &[&[LiveId]]) -> DropDownSet

Source§

impl DropDownWidgetRefExt for WidgetRef

Source§

impl ExpandablePanelSetWidgetRefExt for WidgetRef

Source§

impl ExpandablePanelWidgetRefExt for WidgetRef

Source§

impl FileTreeSetWidgetRefExt for WidgetRef

Source§

fn file_tree_set(&self, paths: &[&[LiveId]]) -> FileTreeSet

Source§

impl FileTreeWidgetRefExt for WidgetRef

Source§

impl FlatListSetWidgetRefExt for WidgetRef

Source§

fn flat_list_set(&self, paths: &[&[LiveId]]) -> FlatListSet

Source§

impl FlatListWidgetRefExt for WidgetRef

Source§

impl FoldButtonSetWidgetRefExt for WidgetRef

Source§

fn fold_button_set(&self, paths: &[&[LiveId]]) -> FoldButtonSet

Source§

impl FoldButtonWidgetRefExt for WidgetRef

Source§

impl FoldHeaderSetWidgetRefExt for WidgetRef

Source§

fn fold_header_set(&self, paths: &[&[LiveId]]) -> FoldHeaderSet

Source§

impl FoldHeaderWidgetRefExt for WidgetRef

Source§

impl HtmlLinkSetWidgetRefExt for WidgetRef

Source§

impl HtmlLinkWidgetRefExt for WidgetRef

Source§

impl HtmlSetWidgetRefExt for WidgetRef

Source§

fn html_set(&self, paths: &[&[LiveId]]) -> HtmlSet

Source§

impl HtmlWidgetRefExt for WidgetRef

Source§

fn html(&self, path: &[LiveId]) -> HtmlRef

Source§

fn as_html(&self) -> HtmlRef

Source§

impl IconSetWidgetRefExt for WidgetRef

Source§

fn icon_set(&self, paths: &[&[LiveId]]) -> IconSet

Source§

impl IconWidgetRefExt for WidgetRef

Source§

fn icon(&self, path: &[LiveId]) -> IconRef

Source§

fn as_icon(&self) -> IconRef

Source§

impl ImageBlendSetWidgetRefExt for WidgetRef

Source§

fn image_blend_set(&self, paths: &[&[LiveId]]) -> ImageBlendSet

Source§

impl ImageBlendWidgetRefExt for WidgetRef

Source§

impl ImageSetWidgetRefExt for WidgetRef

Source§

fn image_set(&self, paths: &[&[LiveId]]) -> ImageSet

Source§

impl ImageWidgetRefExt for WidgetRef

Source§

fn image(&self, path: &[LiveId]) -> ImageRef

Source§

fn as_image(&self) -> ImageRef

Source§

impl KeyboardViewSetWidgetRefExt for WidgetRef

Source§

impl KeyboardViewWidgetRefExt for WidgetRef

Source§

impl LabelSetWidgetRefExt for WidgetRef

Source§

fn label_set(&self, paths: &[&[LiveId]]) -> LabelSet

Source§

impl LabelWidgetRefExt for WidgetRef

Source§

fn label(&self, path: &[LiveId]) -> LabelRef

Source§

fn as_label(&self) -> LabelRef

Source§

impl LinkLabelSetWidgetRefExt for WidgetRef

Source§

impl LinkLabelWidgetRefExt for WidgetRef

Source§

impl ListSetWidgetRefExt for WidgetRef

Source§

fn list_set(&self, paths: &[&[LiveId]]) -> ListSet

Source§

impl ListWidgetRefExt for WidgetRef

Source§

fn list(&self, path: &[LiveId]) -> ListRef

Source§

fn as_list(&self) -> ListRef

Source§

impl LiveApply for WidgetRef

Source§

fn apply( &mut self, cx: &mut Cx, apply: &mut Apply<'_, '_, '_>, index: usize, nodes: &[LiveNode], ) -> usize

Source§

fn apply_over(&mut self, cx: &mut Cx, nodes: &[LiveNode])

Source§

impl LiveHook for WidgetRef

Source§

fn apply_value_unknown( &mut self, cx: &mut Cx, _apply: &mut Apply<'_, '_, '_>, index: usize, nodes: &[LiveNode], ) -> usize

Source§

fn skip_apply_animator( &mut self, _cx: &mut Cx, _apply: &mut Apply<'_, '_, '_>, _index: usize, _nodes: &[LiveNode], ) -> bool

Source§

fn apply_value_instance( &mut self, _cx: &mut Cx, _apply: &mut Apply<'_, '_, '_>, index: usize, nodes: &[LiveNode], ) -> usize

Source§

fn skip_apply( &mut self, _cx: &mut Cx, _apply: &mut Apply<'_, '_, '_>, _index: usize, _nodes: &[LiveNode], ) -> Option<usize>

Source§

fn before_apply( &mut self, _cx: &mut Cx, _apply: &mut Apply<'_, '_, '_>, _index: usize, _nodes: &[LiveNode], )

Source§

fn after_apply( &mut self, _cx: &mut Cx, _apply: &mut Apply<'_, '_, '_>, _index: usize, _nodes: &[LiveNode], )

Source§

fn after_apply_from(&mut self, cx: &mut Cx, apply: &mut Apply<'_, '_, '_>)

Source§

fn after_new_from_doc(&mut self, _cx: &mut Cx)

Source§

fn after_update_from_doc(&mut self, _cx: &mut Cx)

Source§

fn after_apply_from_doc(&mut self, _cx: &mut Cx)

Source§

fn after_new_before_apply(&mut self, _cx: &mut Cx)

Source§

impl LiveNew for WidgetRef

Source§

fn new(_cx: &mut Cx) -> Self

Source§

fn live_type_info(_cx: &mut Cx) -> LiveTypeInfo

Source§

fn live_design_with(_cx: &mut Cx)

Source§

fn new_apply( cx: &mut Cx, apply: &mut Apply<'_, '_, '_>, index: usize, nodes: &[LiveNode], ) -> Self
where Self: Sized,

Source§

fn new_apply_over(cx: &mut Cx, nodes: &[LiveNode]) -> Self
where Self: Sized,

Source§

fn new_apply_mut_index( cx: &mut Cx, apply: &mut Apply<'_, '_, '_>, index: &mut usize, nodes: &[LiveNode], ) -> Self
where Self: Sized,

Source§

fn new_from_ptr(cx: &mut Cx, live_ptr: Option<LivePtr>) -> Self
where Self: Sized,

Source§

fn update_from_ptr(&mut self, cx: &mut Cx, live_ptr: Option<LivePtr>)

Source§

fn update_from_ptr_with_scope( &mut self, cx: &mut Cx, live_ptr: Option<LivePtr>, scope: &mut Scope<'_, '_>, )

Source§

fn new_from_ptr_with_scope( cx: &mut Cx, live_ptr: Option<LivePtr>, scope: &mut Scope<'_, '_>, ) -> Self
where Self: Sized,

Source§

fn new_main(cx: &mut Cx) -> Option<Self>
where Self: Sized,

Source§

fn register_main_module(cx: &mut Cx)

Source§

fn update_main(&mut self, cx: &mut Cx)

Source§

fn new_local(cx: &mut Cx) -> Self
where Self: Sized,

Source§

fn new_from_module( cx: &mut Cx, module_id: LiveModuleId, id: LiveId, ) -> Option<Self>
where Self: Sized,

Source§

fn update_from_module( &mut self, cx: &mut Cx, module_id: LiveModuleId, id: LiveId, )

Source§

impl MarkdownLinkSetWidgetRefExt for WidgetRef

Source§

impl MarkdownLinkWidgetRefExt for WidgetRef

Source§

impl MarkdownSetWidgetRefExt for WidgetRef

Source§

fn markdown_set(&self, paths: &[&[LiveId]]) -> MarkdownSet

Source§

impl MarkdownWidgetRefExt for WidgetRef

Source§

impl ModalSetWidgetRefExt for WidgetRef

Source§

fn modal_set(&self, paths: &[&[LiveId]]) -> ModalSet

Source§

impl ModalWidgetRefExt for WidgetRef

Source§

fn modal(&self, path: &[LiveId]) -> ModalRef

Source§

fn as_modal(&self) -> ModalRef

Source§

impl MultiImageSetWidgetRefExt for WidgetRef

Source§

fn multi_image_set(&self, paths: &[&[LiveId]]) -> MultiImageSet

Source§

impl MultiImageWidgetRefExt for WidgetRef

Source§

impl MultiWindowWidgetRefExt for WidgetRef

Source§

impl PageFlipSetWidgetRefExt for WidgetRef

Source§

fn page_flip_set(&self, paths: &[&[LiveId]]) -> PageFlipSet

Source§

impl PageFlipWidgetRefExt for WidgetRef

Source§

impl PartialEq for WidgetRef

Source§

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

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

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

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

impl PerformanceLiveGraphSetWidgetRefExt for WidgetRef

Source§

impl PerformanceLiveGraphWidgetRefExt for WidgetRef

Source§

impl PerformanceViewSetWidgetRefExt for WidgetRef

Source§

impl PerformanceViewWidgetRefExt for WidgetRef

Source§

impl PopupNotificationSetWidgetRefExt for WidgetRef

Source§

impl PopupNotificationWidgetRefExt for WidgetRef

Source§

impl PortalList2SetWidgetRefExt for WidgetRef

Source§

impl PortalList2WidgetRefExt for WidgetRef

Source§

impl PortalListSetWidgetRefExt for WidgetRef

Source§

fn portal_list_set(&self, paths: &[&[LiveId]]) -> PortalListSet

Source§

impl PortalListWidgetRefExt for WidgetRef

Source§

impl RadioButtonGroupSetWidgetRefExt for WidgetRef

Source§

impl RadioButtonGroupWidgetRefExt for WidgetRef

Source§

impl RadioButtonSetWidgetRefExt for WidgetRef

Source§

impl RadioButtonWidgetRefExt for WidgetRef

Source§

impl RootWidgetRefExt for WidgetRef

Source§

fn root(&self, path: &[LiveId]) -> RootRef

Source§

fn as_root(&self) -> RootRef

Source§

impl RotatedImageSetWidgetRefExt for WidgetRef

Source§

impl RotatedImageWidgetRefExt for WidgetRef

Source§

impl SlidePanelSetWidgetRefExt for WidgetRef

Source§

fn slide_panel_set(&self, paths: &[&[LiveId]]) -> SlidePanelSet

Source§

impl SlidePanelWidgetRefExt for WidgetRef

Source§

impl SliderSetWidgetRefExt for WidgetRef

Source§

fn slider_set(&self, paths: &[&[LiveId]]) -> SliderSet

Source§

impl SliderWidgetRefExt for WidgetRef

Source§

fn slider(&self, path: &[LiveId]) -> SliderRef

Source§

fn as_slider(&self) -> SliderRef

Source§

impl SlidesViewSetWidgetRefExt for WidgetRef

Source§

fn slides_view_set(&self, paths: &[&[LiveId]]) -> SlidesViewSet

Source§

impl SlidesViewWidgetRefExt for WidgetRef

Source§

impl SplitterSetWidgetRefExt for WidgetRef

Source§

fn splitter_set(&self, paths: &[&[LiveId]]) -> SplitterSet

Source§

impl SplitterWidgetRefExt for WidgetRef

Source§

impl StackNavigationViewSetWidgetRefExt for WidgetRef

Source§

impl StackNavigationViewWidgetRefExt for WidgetRef

Source§

impl StackNavigationWidgetRefExt for WidgetRef

Source§

impl TabBarSetWidgetRefExt for WidgetRef

Source§

fn tab_bar_set(&self, paths: &[&[LiveId]]) -> TabBarSet

Source§

impl TabBarWidgetRefExt for WidgetRef

Source§

fn tab_bar(&self, path: &[LiveId]) -> TabBarRef

Source§

fn as_tab_bar(&self) -> TabBarRef

Source§

impl TextFlowLinkSetWidgetRefExt for WidgetRef

Source§

impl TextFlowLinkWidgetRefExt for WidgetRef

Source§

impl TextFlowSetWidgetRefExt for WidgetRef

Source§

fn text_flow_set(&self, paths: &[&[LiveId]]) -> TextFlowSet

Source§

impl TextFlowWidgetRefExt for WidgetRef

Source§

impl TextInputSetWidgetRefExt for WidgetRef

Source§

fn text_input_set(&self, paths: &[&[LiveId]]) -> TextInputSet

Source§

impl TextInputWidgetRefExt for WidgetRef

Source§

impl TogglePanelSetWidgetRefExt for WidgetRef

Source§

impl TogglePanelWidgetRefExt for WidgetRef

Source§

impl TooltipSetWidgetRefExt for WidgetRef

Source§

fn tooltip_set(&self, paths: &[&[LiveId]]) -> TooltipSet

Source§

impl TooltipWidgetRefExt for WidgetRef

Source§

impl TurtleStepSetWidgetRefExt for WidgetRef

Source§

fn turtle_step_set(&self, paths: &[&[LiveId]]) -> TurtleStepSet

Source§

impl TurtleStepWidgetRefExt for WidgetRef

Source§

impl VectorLineSetWidgetRefExt for WidgetRef

Source§

fn vector_line_set(&self, paths: &[&[LiveId]]) -> VectorLineSet

Source§

impl VectorLineWidgetRefExt for WidgetRef

Source§

impl VideoSetWidgetRefExt for WidgetRef

Source§

fn video_set(&self, paths: &[&[LiveId]]) -> VideoSet

Source§

impl VideoWidgetRefExt for WidgetRef

Source§

fn video(&self, path: &[LiveId]) -> VideoRef

Source§

fn as_video(&self) -> VideoRef

Source§

impl ViewSetWidgetRefExt for WidgetRef

Source§

fn view_set(&self, paths: &[&[LiveId]]) -> ViewSet

Source§

impl ViewWidgetRefExt for WidgetRef

Source§

fn view(&self, path: &[LiveId]) -> ViewRef

Source§

fn as_view(&self) -> ViewRef

Source§

impl WebViewSetWidgetRefExt for WidgetRef

Source§

fn web_view_set(&self, paths: &[&[LiveId]]) -> WebViewSet

Source§

impl WebViewWidgetRefExt for WidgetRef

Source§

impl WindowMenuSetWidgetRefExt for WidgetRef

Source§

fn window_menu_set(&self, paths: &[&[LiveId]]) -> WindowMenuSet

Source§

impl WindowMenuWidgetRefExt for WidgetRef

Source§

impl WindowSetWidgetRefExt for WidgetRef

Source§

fn window_set(&self, paths: &[&[LiveId]]) -> WindowSet

Source§

impl WindowWidgetRefExt for WidgetRef

Source§

fn window(&self, path: &[LiveId]) -> WindowRef

Source§

fn as_window(&self) -> WindowRef

Source§

impl XrHandsSetWidgetRefExt for WidgetRef

Source§

fn xr_hands_set(&self, paths: &[&[LiveId]]) -> XrHandsSet

Source§

impl XrHandsWidgetRefExt for WidgetRef

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

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

Source§

fn ref_cast_type_id(&self) -> TypeId
where Self: 'static,

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> 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 = 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.