pub struct TreeCreateRequest<T> {
pub parent: Option<T>,
pub after: Option<T>,
pub kind: TreeCreateKind,
pub default_label: String,
}Expand description
Input to a user-provided new-node factory.
§Examples
use ailloli_ui_widgets::controls::{TreeCreateKind, TreeCreateRequest};
let request = TreeCreateRequest { parent: Some(1), after: None, kind: TreeCreateKind::Child, default_label: "New item".into() };
assert_eq!(request.parent, Some(1));Fields§
§parent: Option<T>Parent ID, or None for a root-level sibling.
after: Option<T>Previous sibling ID for sibling insertion, if any.
kind: TreeCreateKindSibling or child placement.
default_label: StringSuggested initial editor label.
Trait Implementations§
Source§impl<T: Clone> Clone for TreeCreateRequest<T>
impl<T: Clone> Clone for TreeCreateRequest<T>
Source§fn clone(&self) -> TreeCreateRequest<T>
fn clone(&self) -> TreeCreateRequest<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for TreeCreateRequest<T>
impl<T: Debug> Debug for TreeCreateRequest<T>
Source§impl<T: PartialEq> PartialEq for TreeCreateRequest<T>
impl<T: PartialEq> PartialEq for TreeCreateRequest<T>
impl<T: Eq> Eq for TreeCreateRequest<T>
impl<T> StructuralPartialEq for TreeCreateRequest<T>
Auto Trait Implementations§
impl<T> Freeze for TreeCreateRequest<T>where
T: Freeze,
impl<T> RefUnwindSafe for TreeCreateRequest<T>where
T: RefUnwindSafe,
impl<T> Send for TreeCreateRequest<T>where
T: Send,
impl<T> Sync for TreeCreateRequest<T>where
T: Sync,
impl<T> Unpin for TreeCreateRequest<T>where
T: Unpin,
impl<T> UnwindSafe for TreeCreateRequest<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.