Skip to main content

RowBuilderWithoutSend

Struct RowBuilderWithoutSend 

Source
pub struct RowBuilderWithoutSend<T: ?Sized, Item: ?Sized> { /* private fields */ }

Implementations§

Source§

impl<T: ?Sized, Item: ?Sized> RowBuilderWithoutSend<T, Item>

Source

pub fn text( self, text: impl Fn(&Item) -> String + Send + Sync + 'static, ) -> Self

Source

pub fn text_str( self, text: impl Fn(&Item) -> &str + Send + Sync + 'static, ) -> Self

Source

pub fn send<SentItem: Send + Sync>( self, send: impl Fn(&Item) -> SentItem + Send + Sync + 'static, ) -> RowBuilderWithSend<T, Item, SentItem>

Source§

impl<T: ?Sized, Item: Copy + Send + Sync> RowBuilderWithoutSend<T, Item>

Source

pub fn send_copy(self) -> RowBuilderWithSend<T, Item, Item>

Source§

impl<T: ?Sized, Item: Clone + Send + Sync> RowBuilderWithoutSend<T, Item>

Source

pub fn send_clone(self) -> RowBuilderWithSend<T, Item, Item>

Sends a cloned item.

Prefer this over send(|item| item.clone()) when the item itself should be sent.

Source§

impl<T: ?Sized, Item: Send + Sync> RowBuilderWithoutSend<T, Option<Item>>

Source

pub fn try_send<SentItem: Send + Sync>( self, send: impl Fn(&Item) -> SentItem + Send + Sync + 'static, ) -> RowBuilderWithSend<T, Option<Item>, SentItem>

Sends a derived item only when the row item is Some(...).

This API is intentionally only available for Option<T> row items. Use item(...) or item_ref(...) to keep the row item as Option<T>, then text(...) to render it.

Source§

impl<T: ?Sized, Item: Copy + Send + Sync> RowBuilderWithoutSend<T, Option<Item>>

Source

pub fn try_send_copy(self) -> RowBuilderWithSend<T, Option<Item>, Item>

Sends the inner copied item only when the row item is Some(...).

Source§

impl<T: ?Sized, Item: Clone + Send + Sync> RowBuilderWithoutSend<T, Option<Item>>

Source

pub fn try_send_clone(self) -> RowBuilderWithSend<T, Option<Item>, Item>

Sends the inner cloned item only when the row item is Some(...).

Prefer this over try_send(|item| item.clone()) when the row item is Option<T> and the sent object should be the contained domain item, not its string representation.

Trait Implementations§

Source§

impl<T: ?Sized, Item> RowBuilder<T, Item> for RowBuilderWithoutSend<T, Item>

Source§

fn into_row(self) -> Row<T, Item>

Auto Trait Implementations§

§

impl<T, Item> Freeze for RowBuilderWithoutSend<T, Item>
where T: ?Sized, Item: ?Sized,

§

impl<T, Item> !RefUnwindSafe for RowBuilderWithoutSend<T, Item>

§

impl<T, Item> Send for RowBuilderWithoutSend<T, Item>
where T: ?Sized, Item: ?Sized,

§

impl<T, Item> Sync for RowBuilderWithoutSend<T, Item>
where T: ?Sized, Item: ?Sized,

§

impl<T, Item> Unpin for RowBuilderWithoutSend<T, Item>
where T: ?Sized, Item: ?Sized,

§

impl<T, Item> UnsafeUnpin for RowBuilderWithoutSend<T, Item>
where T: ?Sized, Item: ?Sized,

§

impl<T, Item> !UnwindSafe for RowBuilderWithoutSend<T, Item>

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