[][src]Struct weechat::buffer::BufferHandle

pub struct BufferHandle { /* fields omitted */ }

A handle to a buffer that was created in the current plugin.

This means that the plugin owns this buffer. Nevertheless Weechat can invalidate the buffer between callbacks at any point in time.

The buffer handle can be upgraded to a buffer which can then manipulate the buffer state using the upgrade() method.

The buffer won't be closed if this handle gets dropped, to close the buffer call the close method on the upgraded buffer object.

Implementations

impl BufferHandle[src]

pub fn upgrade(&self) -> Result<Buffer<'_>, ()>[src]

Upgrade the buffer handle into a Buffer.

This is necessary to do because the handle can be invalidated by Weechat between callbacks.

Trait Implementations

impl Clone for BufferHandle[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.