pub struct TextNode { /* private fields */ }
Expand description
A text node
Implementations§
Source§impl TextNode
impl TextNode
Sourcepub fn create<B: Backend>(
owner: &mut ForestNodeMut<'_, B::GeneralElement>,
content: impl ToLocaleStr,
) -> Result<(Self, ForestNodeRc<B::GeneralElement>), Error>where
Self: Sized,
pub fn create<B: Backend>(
owner: &mut ForestNodeMut<'_, B::GeneralElement>,
content: impl ToLocaleStr,
) -> Result<(Self, ForestNodeRc<B::GeneralElement>), Error>where
Self: Sized,
Create a text node.
Sourcepub fn backend_element_rc<'b, B: Backend>(
&'b mut self,
owner: &'b mut ForestNodeMut<'_, B::GeneralElement>,
) -> Result<ForestNodeRc<B::GeneralElement>, Error>
pub fn backend_element_rc<'b, B: Backend>( &'b mut self, owner: &'b mut ForestNodeMut<'_, B::GeneralElement>, ) -> Result<ForestNodeRc<B::GeneralElement>, Error>
Get the backend element.
Sourcepub fn set_text<B: Backend>(
&mut self,
owner: &mut ForestNodeMut<'_, B::GeneralElement>,
content: impl ToLocaleStr,
) -> Result<(), Error>
pub fn set_text<B: Backend>( &mut self, owner: &mut ForestNodeMut<'_, B::GeneralElement>, content: impl ToLocaleStr, ) -> Result<(), Error>
Set the text content.
Auto Trait Implementations§
impl Freeze for TextNode
impl RefUnwindSafe for TextNode
impl !Send for TextNode
impl !Sync for TextNode
impl Unpin for TextNode
impl UnwindSafe for TextNode
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<S, T> PropAsRef<S> for T
impl<S, T> PropAsRef<S> for T
Source§fn property_as_ref(&self) -> &S
fn property_as_ref(&self) -> &S
Borrow
&Self
as &S
.Source§fn property_to_owned(s: &S) -> T
fn property_to_owned(s: &S) -> T
Clone
&S
as a new Self
.