Struct lignin::ReorderableFragment[][src]

pub struct ReorderableFragment<'a, S: ThreadSafety> {
    pub dom_key: u32,
    pub content: Node<'a, S>,
}
Expand description

Vdom A VDOM node that has its DOM identity preserved during DOM updates even after being repositioned within a (path-)matching Node::Keyed.

For more information, see Node::Keyed.

Fields

dom_key: u32

A key uniquely identifying a ReorderableFragment within any directly spanning Node::Keyed.

Note Node::Keyed’s usage notes!

content: Node<'a, S>

The Node to render from this ReorderableFragment.

Implementations

impl<'a, S: ThreadSafety> ReorderableFragment<'a, S>[src]

#[must_use]
pub fn deanonymize(self) -> Self
[src]

👎 Deprecated:

Call of .deanonymize() on named type.

When called on an opaque type, deanonymizes it into the underlying named type.

Both AutoSafe and Deanonymize must be in scope and the method must be called without qualification for this to work.

Calling this method on a named type returns the value and type unchanged and produces a deprecation warning.

impl<'a> ReorderableFragment<'a, ThreadSafe>[src]

#[must_use]
pub fn prefer_thread_safe(self) -> Self
[src]

Gently nudges the compiler to choose the ThreadSafe version of a value if both are possible.

This method is by value, so it will resolve with higher priority than the by-reference method on the ThreadBound type.

Note that not all tooling will show the correct overload here, but the compiler knows which to pick.

#[must_use]
pub fn prefer_thread_safe_ref(&self) -> &Self
[src]

Gently nudges the compiler to choose the ThreadSafe version of a reference if both are possible.

This method is once by single reference, so it will resolve with higher priority than the twice-by-reference method on the ThreadBound type.

Note that not all tooling will show the correct overload here, but the compiler knows which to pick.

impl<'a> ReorderableFragment<'a, ThreadBound>[src]

#[must_use]
pub fn prefer_thread_safe(&self) -> Self
[src]

Gently nudges the compiler to choose the ThreadSafe version of a value if both are is possible.

This method is by reference, so it will resolve with lower priority than the by-value method on the ThreadSafe type.

Note that not all tooling will show the correct overload here, but the compiler knows which to pick.

#[must_use]
pub fn prefer_thread_safe_ref<'b>(self: &&'b Self) -> &'b Self
[src]

Gently nudges the compiler to choose the ThreadSafe version of a reference if both are is possible.

This method is twice by reference, so it will resolve with lower priority than the once-by-reference method on the ThreadSafe type.

Note that not all tooling will show the correct overload here, but the compiler knows which to pick.

Trait Implementations

impl<'a, S1, S2> Align<ReorderableFragment<'a, S2>> for ReorderableFragment<'a, S1> where
    S1: ThreadSafety + Into<S2>,
    S2: ThreadSafety
[src]

Not derived from the Into constraints on $Name directly since those are too broad.

fn align(self) -> T[src]

Contextually thread-binds an instance, or not. Use only without qualification.

fn align_ref(&self) -> &T[src]

Contextually thread-binds a reference, or not. Use only without qualification.

impl<'a, S> Clone for ReorderableFragment<'a, S> where
    S: ThreadSafety
[src]

fn clone(&self) -> Self[src]

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl<'a, V> Deanonymize<ReorderableFragment<'a, ThreadSafe>> for V where
    V: Send + Sync + AutoSafe<ReorderableFragment<'a, ThreadBound>>, 
[src]

#[must_use]
fn deanonymize(self) -> SafeVariant
[src]

Deanonymize towards a compatible concrete type. Read more

impl<'a, S> Debug for ReorderableFragment<'a, S> where
    S: ThreadSafety
[src]

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

Formats the value using the given formatter. Read more

impl<'a> From<ReorderableFragment<'a, ThreadSafe>> for ReorderableFragment<'a, ThreadBound>[src]

fn from(thread_safe: ReorderableFragment<'a, ThreadSafe>) -> Self[src]

Performs the conversion.

impl<'a, S> Hash for ReorderableFragment<'a, S> where
    S: ThreadSafety
[src]

fn hash<H: Hasher>(&self, state: &mut H)[src]

Feeds this value into the given Hasher. Read more

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

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

impl<'a, S> Ord for ReorderableFragment<'a, S> where
    S: ThreadSafety
[src]

fn cmp(&self, other: &Self) -> Ordering[src]

This method returns an Ordering between self and other. Read more

#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]

Compares and returns the maximum of two values. Read more

#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]

Compares and returns the minimum of two values. Read more

#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]

Restrict a value to a certain interval. Read more

impl<'a, S1, S2> PartialEq<ReorderableFragment<'a, S2>> for ReorderableFragment<'a, S1> where
    S1: ThreadSafety,
    S2: ThreadSafety
[src]

fn eq(&self, other: &ReorderableFragment<'a, S2>) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a, S1, S2> PartialOrd<ReorderableFragment<'a, S2>> for ReorderableFragment<'a, S1> where
    S1: ThreadSafety,
    S2: ThreadSafety
[src]

fn partial_cmp(&self, other: &ReorderableFragment<'a, S2>) -> Option<Ordering>[src]

This method returns an ordering between self and other values if one exists. Read more

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, S> Vdom for ReorderableFragment<'a, S> where
    S: ThreadSafety
[src]

type ThreadSafety = S

The ThreadSafety of the Vdom type, either ThreadSafe or ThreadBound. Read more

impl<'a, S> Copy for ReorderableFragment<'a, S> where
    S: ThreadSafety
[src]

impl<'a, S> Eq for ReorderableFragment<'a, S> where
    S: ThreadSafety
[src]

Auto Trait Implementations

impl<'a, S> RefUnwindSafe for ReorderableFragment<'a, S> where
    S: RefUnwindSafe

impl<'a, S> Send for ReorderableFragment<'a, S> where
    S: Send + Sync

impl<'a, S> Sync for ReorderableFragment<'a, S> where
    S: Sync

impl<'a, S> Unpin for ReorderableFragment<'a, S> where
    S: Unpin

impl<'a, S> UnwindSafe for ReorderableFragment<'a, S> where
    S: RefUnwindSafe + UnwindSafe

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<'a, S, T> AutoSafe<T> for S where
    S: Vdom + Align<T>,
    T: Vdom<ThreadSafety = ThreadBound>, 
[src]

#[must_use]
fn deanonymize(&self) -> BoundVariant
[src]

Deanonymize towards a compatible concrete type. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<'a, V> Deanonymize<ReorderableFragment<'a, ThreadSafe>> for V where
    V: Send + Sync + AutoSafe<ReorderableFragment<'a, ThreadBound>>, 
[src]

#[must_use]
fn deanonymize(self) -> SafeVariant
[src]

Deanonymize towards a compatible concrete type. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

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

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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

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

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.