Struct X11docker

Source
pub struct X11docker { /* private fields */ }

Implementations§

Source§

impl X11docker

Source

pub fn arguments(self, args: HashSet<X11dockerOption>) -> Self

Sets the complete set of arguments, replacing any existing arguments

§Arguments
  • args - HashSet of X11dockerOption values to use as arguments
Source

pub fn append_arguments(self, args: HashSet<X11dockerOption>) -> Self

Adds additional arguments to the existing set If no arguments exist yet, initializes a new set

§Arguments
  • args - HashSet of X11dockerOption values to append
Source

pub fn internet(self) -> Self

Enables internet access for the container

Source

pub fn image_name(self, name: &str) -> Self

Sets the name of the Docker image to use

§Arguments
  • name - Name of the Docker image
Source

pub fn container_name(self, name: &str) -> Self

Sets a custom name for the container

§Arguments
  • name - Name to assign to the container
Source

pub fn xpra(self) -> Self

Enables Xpra display server

Source

pub fn desktop(self) -> Self

Enables desktop mode

Source

pub fn interactive(self) -> Self

Enables interactive mode

Source

pub fn backend(self, backend: &str) -> Self

Sets the X server backend to use

§Arguments
  • backend - Name of the X server backend
Source

pub fn rootless(self, value: bool) -> Self

Configures rootless mode

§Arguments
  • value - Enable (true) or disable (false) rootless mode
Source

pub fn xc(self, value: &str) -> Self

Sets the X client command

§Arguments
  • value - Command to run as X client
Source

pub fn xonly(self) -> Self

Enables X server only mode without container

Source

pub fn exec(&mut self) -> Result<()>

Executes x11docker with the configured arguments

§Errors
  • Returns std::io::Error if no arguments are provided
  • Returns std::io::Error if the x11docker process fails to spawn
Source

pub fn terminate(self) -> Result<()>

Terminates the running x11docker process

§Errors
  • Returns std::io::Error if no child process exists
  • Returns std::io::Error if waiting for the process to exit fails

Trait Implementations§

Source§

impl Default for X11docker

Source§

fn default() -> X11docker

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.