#[repr(transparent)]pub struct DefaultPub<T: ?Sized>(pub T);Expand description
A wrapper for type-instances that don’t implement Publisher natively.
This structure provides an implementation of the Publisher-trait that
doesn’t subscribe to anything and is therefore not alerted when the inner
value changes.
Tuple Fields§
§0: TImplementations§
Source§impl<T> DefaultPub<DefaultExpr<T>>
impl<T> DefaultPub<DefaultExpr<T>>
Sourcepub const fn expr_or_publisher(&self) -> DefaultPub<T>
pub const fn expr_or_publisher(&self) -> DefaultPub<T>
Trait Implementations§
Source§impl<T: Clone + ?Sized> Clone for DefaultPub<T>
impl<T: Clone + ?Sized> Clone for DefaultPub<T>
Source§fn clone(&self) -> DefaultPub<T>
fn clone(&self) -> DefaultPub<T>
Returns a duplicate 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: Expr> Expr for DefaultPub<T>
impl<T: Expr> Expr for DefaultPub<T>
Source§impl<T> Publisher for DefaultPub<T>
impl<T> Publisher for DefaultPub<T>
impl<T: Copy + ?Sized> Copy for DefaultPub<T>
Auto Trait Implementations§
impl<T> Freeze for DefaultPub<T>
impl<T> RefUnwindSafe for DefaultPub<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Send for DefaultPub<T>
impl<T> Sync for DefaultPub<T>
impl<T> Unpin for DefaultPub<T>
impl<T> UnwindSafe for DefaultPub<T>where
T: UnwindSafe + ?Sized,
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