Struct wlc_with_elogind::WeakView [] [src]

pub struct WeakView(_, _);

Weak reference to a view

Can be optained by view.weak_reference()

Methods

impl WeakView
[src]

[src]

Upgrade your weak reference to an actual View

Safety

This function is unsafe, because it creates a lifetime bound to the WeakView, which may live forever.. But no view lives forever and might be destroyed by its process at any time A disconnection is signaled by Callback::view_destroyed and the View is deallocated shortly after. Because of this using this function one may create an invalid View reference. Also using this function it is possible to optain multiple mutable references, which is also unsafe

See WeakView::run for a safe variant

[src]

Run a function on the referenced View, if it still exists

Returns the result of the function, if successful

Safety

By enforcing a rather harsh limit on the lifetime of the view to a short lived scope of an anonymous function, this function makes sure the view does not live longer then it exists.

Trait Implementations

impl Clone for WeakView
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for WeakView
[src]

[src]

Formats the value using the given formatter.

impl !Send for WeakView
[src]

impl !Sync for WeakView
[src]

impl PartialEq<View> for WeakView
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl PartialEq for WeakView
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl Eq for WeakView
[src]

impl Hash for WeakView
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more