Struct x11rb::protocol::xproto::GcontextWrapper[][src]

pub struct GcontextWrapper<'c, C: RequestConnection>(_, _);
Expand description

A RAII-like wrapper around a Gcontext.

Instances of this struct represent a Gcontext that is freed in Drop.

Any errors during Drop are silently ignored. Most likely an error here means that your X11 connection is broken and later requests will also fail.

Implementations

Assume ownership of the given resource and destroy it in Drop.

Get the XID of the wrapped resource

Assume ownership of the XID of the wrapped resource

This function destroys this wrapper without freeing the underlying resource.

Create a new Gcontext and return a Gcontext wrapper and a cookie.

This is a thin wrapper around create_gc that allocates an id for the Gcontext. This function returns the resulting GcontextWrapper that owns the created Gcontext and frees it in Drop. This also returns a VoidCookie that comes from the call to create_gc.

Errors can come from the call to X11Connection::generate_id or create_gc.

Create a new Gcontext and return a Gcontext wrapper

This is a thin wrapper around create_gc that allocates an id for the Gcontext. This function returns the resulting GcontextWrapper that owns the created Gcontext and frees it in Drop.

Errors can come from the call to X11Connection::generate_id or create_gc.

Trait Implementations

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.