[−][src]Struct glib::send_unique::SendUniqueCell
Allows sending reference counted objects that don't implement Send to other threads
as long as only a single reference to the object exists.
Methods
impl<T: SendUnique> SendUniqueCell<T>[src]
pub fn new(obj: T) -> Result<Self, T>[src]
Create a new SendUniqueCell out of obj
Fails if obj is not unique at this time
pub fn borrow(&self) -> Ref<T>[src]
Borrow the contained object or panic if borrowing is not possible at this time
pub fn try_borrow(&self) -> Result<Ref<T>, BorrowError>[src]
Try borrowing the contained object
Borrowing is possible as long as only a single reference to the object exists, or it is borrowed from the same thread currently
pub fn into_inner(self) -> T[src]
Extract the contained object or panic if it is not possible at this time
pub fn try_into_inner(self) -> Result<T, Self>[src]
Try extracing the contained object
Borrowing is possible as long as only a single reference to the object exists, or it is borrowed from the same thread currently
Trait Implementations
impl<T: SendUnique> Send for SendUniqueCell<T>[src]
impl<T: Debug + SendUnique> Debug for SendUniqueCell<T>[src]
Auto Trait Implementations
impl<T> !Sync for SendUniqueCell<T>
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,