Struct AnyNodeRef

Source
pub struct AnyNodeRef(/* private fields */);
Expand description

A reactive reference to a DOM node that can be used with the node_ref attribute.

Implementations§

Source§

impl AnyNodeRef

Source

pub fn new() -> Self

Creates a new AnyNodeRef.

Trait Implementations§

Source§

impl Clone for AnyNodeRef

Source§

fn clone(&self) -> Self

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 Debug for AnyNodeRef

Source§

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

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

impl Default for AnyNodeRef

Source§

fn default() -> Self

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

impl DefinedAt for AnyNodeRef

Source§

fn defined_at(&self) -> Option<&'static Location<'static>>

Returns the location at which the signal was defined. This is usually simply None in release mode.
Source§

impl<T: ElementType> From<NodeRef<T>> for AnyNodeRef

Source§

fn from(value: NodeRef<T>) -> Self

Converts to this type from the input type.
Source§

impl IntoAnyNodeRef for AnyNodeRef

Source§

fn into_any(self) -> AnyNodeRef

Converts self into an AnyNodeRef.
Source§

impl<E: ElementType> NodeRefContainer<E> for AnyNodeRef

Source§

fn load(self, el: &Element)

Fills the container with the element.
Source§

impl ReadUntracked for AnyNodeRef

Source§

type Value = ReadGuard<Option<Element>, Derefable<Option<Element>>>

The guard type that will be returned, which can be dereferenced to the value.
Source§

fn try_read_untracked(&self) -> Option<Self::Value>

Returns the guard, or None if the signal has already been disposed.
Source§

fn read_untracked(&self) -> Self::Value

Returns the guard. Read more
Source§

fn custom_try_read(&self) -> Option<Option<Self::Value>>

This is a backdoor to allow overriding the Read::try_read implementation despite it being auto implemented. Read more
Source§

impl Track for AnyNodeRef

Source§

fn track(&self)

Subscribes to this signal in the current reactive scope without doing anything with its value.
Source§

impl Copy for AnyNodeRef

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, dst: *mut u8)

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

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Get for T
where T: With, <T as With>::Value: Clone,

Source§

type Value = <T as With>::Value

The type of the value contained in the signal.
Source§

fn try_get(&self) -> Option<<T as Get>::Value>

Subscribes to the signal, then clones and returns the value of the signal, or None if the signal has already been disposed.
Source§

fn get(&self) -> Self::Value

Subscribes to the signal, then clones and returns the value of the signal. Read more
Source§

impl<T> GetUntracked for T

Source§

type Value = <T as WithUntracked>::Value

The type of the value contained in the signal.
Source§

fn try_get_untracked(&self) -> Option<<T as GetUntracked>::Value>

Clones and returns the value of the signal, or None if the signal has already been disposed.
Source§

fn get_untracked(&self) -> Self::Value

Clones and returns the value of the signal, Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Read for T
where T: Track + ReadUntracked,

Source§

type Value = <T as ReadUntracked>::Value

The guard type that will be returned, which can be dereferenced to the value.
Source§

fn try_read(&self) -> Option<<T as Read>::Value>

Subscribes to the signal, and returns the guard, or None if the signal has already been disposed.
Source§

fn read(&self) -> Self::Value

Subscribes to the signal, and returns the guard. Read more
Source§

impl<T> StorageAccess<T> for T

Source§

fn as_borrowed(&self) -> &T

Borrows the value.
Source§

fn into_taken(self) -> T

Takes the value.
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.
Source§

impl<T> With for T
where T: Read,

Source§

type Value = <<T as Read>::Value as Deref>::Target

The type of the value contained in the signal.
Source§

fn try_with<U>(&self, fun: impl FnOnce(&<T as With>::Value) -> U) -> Option<U>

Subscribes to the signal, applies the closure to the value, and returns the result, or None if the signal has already been disposed.
Source§

fn with<U>(&self, fun: impl FnOnce(&Self::Value) -> U) -> U

Subscribes to the signal, applies the closure to the value, and returns the result. Read more
Source§

impl<T> WithUntracked for T

Source§

type Value = <<T as ReadUntracked>::Value as Deref>::Target

The type of the value contained in the signal.
Source§

fn try_with_untracked<U>( &self, fun: impl FnOnce(&<T as WithUntracked>::Value) -> U, ) -> Option<U>

Applies the closure to the value, and returns the result, or None if the signal has already been disposed.
Source§

fn with_untracked<U>(&self, fun: impl FnOnce(&Self::Value) -> U) -> U

Applies the closure to the value, and returns the result. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T