[−][src]Struct pinboard::Pinboard
An instance of a Pinboard
, holds a shared, mutable, eventually-consistent reference to a T
.
Implementations
impl<T: Clone + 'static> Pinboard<T>
[src]
pub fn new(t: T) -> Pinboard<T>
[src]
Create a new Pinboard
instance holding the given value.
pub fn new_empty() -> Self
[src]
Create a new, empty Pinboard
pub fn set(&self, t: T)
[src]
Update the value stored in the Pinboard
.
pub fn clear(&self)
[src]
Clear out the Pinboard
so it's no longer holding any data.
pub fn read(&self) -> Option<T>
[src]
Get a copy of the latest (well, recent) version of the posted data.
Trait Implementations
impl<T: Clone + 'static> Debug for Pinboard<T> where
T: Debug,
[src]
T: Debug,
impl<T: Clone + 'static> Default for Pinboard<T>
[src]
impl<T: Clone + 'static> Drop for Pinboard<T>
[src]
impl<T: Clone + 'static> From<Option<T>> for Pinboard<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Pinboard<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Pinboard<T> where
T: Pointable + Send + Sync,
T: Pointable + Send + Sync,
impl<T> Sync for Pinboard<T> where
T: Pointable + Send + Sync,
T: Pointable + Send + Sync,
impl<T> Unpin for Pinboard<T>
impl<T> UnwindSafe for Pinboard<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,