Struct wlc_with_elogind::WeakOutput [] [src]

pub struct WeakOutput(_, _);

Weak reference to an output

Can be optained by output.weak_reference()

Methods

impl WeakOutput
[src]

[src]

Upgrade your weak reference to an actual Output

Safety

This function is unsafe, because it creates a lifetime bound to WeakOutput, which may live forever.. But no output lives forever and might be disconnected at any time A disconnection is signaled by Callback::output_destroyed and the Output is deallocated shortly after. Because of this using this function one may create an invalid Output reference.

See WeakOutput::run for a safe variant

[src]

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

Returns the result of the function, if successful

Safety

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

Trait Implementations

impl Clone for WeakOutput
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for WeakOutput
[src]

[src]

Formats the value using the given formatter.

impl !Send for WeakOutput
[src]

impl !Sync for WeakOutput
[src]

impl PartialEq<Output> for WeakOutput
[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 WeakOutput
[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 WeakOutput
[src]

impl Hash for WeakOutput
[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