SpiceBuilder

Struct SpiceBuilder 

Source
pub struct SpiceBuilder<S: State = Empty> { /* private fields */ }
Expand description

Use builder syntax to set the inputs and finish with build().

Implementations§

Source§

impl<S: State> SpiceBuilder<S>

Source

pub fn build(self) -> Spice
where S: IsComplete,

Finish building and return the requested object

Source

pub fn port(self, value: u16) -> SpiceBuilder<SetPort<S>>
where S::Port: IsUnset,

Optional (Some / Option setters).

Set the TCP port spice is listening on for plaintext channels.

Source

pub fn maybe_port(self, value: Option<u16>) -> SpiceBuilder<SetPort<S>>
where S::Port: IsUnset,

Optional (Some / Option setters).

Set the TCP port spice is listening on for plaintext channels.

Source

pub fn addr(self, value: String) -> SpiceBuilder<SetAddr<S>>
where S::Addr: IsUnset,

Optional (Some / Option setters).

Set the IP address spice is listening on. Default is any address.

Source

pub fn maybe_addr(self, value: Option<String>) -> SpiceBuilder<SetAddr<S>>
where S::Addr: IsUnset,

Optional (Some / Option setters).

Set the IP address spice is listening on. Default is any address.

Source

pub fn ipv4(self, value: OnOff) -> SpiceBuilder<SetIpv4<S>>
where S::Ipv4: IsUnset,

Optional (Some / Option setters).

Force using the specified IP version.

Source

pub fn maybe_ipv4(self, value: Option<OnOff>) -> SpiceBuilder<SetIpv4<S>>
where S::Ipv4: IsUnset,

Optional (Some / Option setters).

Force using the specified IP version.

Source

pub fn ipv6(self, value: OnOff) -> SpiceBuilder<SetIpv6<S>>
where S::Ipv6: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_ipv6(self, value: Option<OnOff>) -> SpiceBuilder<SetIpv6<S>>
where S::Ipv6: IsUnset,

Optional (Some / Option setters).

Source

pub fn unix(self, value: OnOff) -> SpiceBuilder<SetUnix<S>>
where S::Unix: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_unix(self, value: Option<OnOff>) -> SpiceBuilder<SetUnix<S>>
where S::Unix: IsUnset,

Optional (Some / Option setters).

Source

pub fn password_secret( self, value: String, ) -> SpiceBuilder<SetPasswordSecret<S>>
where S::PasswordSecret: IsUnset,

Optional (Some / Option setters).

Set the ID of the secret object containing the password you need to authenticate.

Source

pub fn maybe_password_secret( self, value: Option<String>, ) -> SpiceBuilder<SetPasswordSecret<S>>
where S::PasswordSecret: IsUnset,

Optional (Some / Option setters).

Set the ID of the secret object containing the password you need to authenticate.

Source

pub fn sasl(self, value: OnOff) -> SpiceBuilder<SetSasl<S>>
where S::Sasl: IsUnset,

Optional (Some / Option setters).

Require that the client use SASL to authenticate with the spice. The exact choice of authentication method used is controlled from the system / user’s SASL configuration file for the ‘qemu’ service. This is typically found in /etc/sasl2/qemu.conf. If running QEMU as an unprivileged user, an environment variable SASL_CONF_PATH can be used to make it search alternate locations for the service config. While some SASL auth methods can also provide data encryption (eg GSSAPI), it is recommended that SASL always be combined with the ‘tls’ and ‘x509’ settings to enable use of SSL and server certificates. This ensures a data encryption preventing compromise of authentication credentials.

Source

pub fn maybe_sasl(self, value: Option<OnOff>) -> SpiceBuilder<SetSasl<S>>
where S::Sasl: IsUnset,

Optional (Some / Option setters).

Require that the client use SASL to authenticate with the spice. The exact choice of authentication method used is controlled from the system / user’s SASL configuration file for the ‘qemu’ service. This is typically found in /etc/sasl2/qemu.conf. If running QEMU as an unprivileged user, an environment variable SASL_CONF_PATH can be used to make it search alternate locations for the service config. While some SASL auth methods can also provide data encryption (eg GSSAPI), it is recommended that SASL always be combined with the ‘tls’ and ‘x509’ settings to enable use of SSL and server certificates. This ensures a data encryption preventing compromise of authentication credentials.

Source

pub fn disable_ticketing( self, value: OnOff, ) -> SpiceBuilder<SetDisableTicketing<S>>
where S::DisableTicketing: IsUnset,

Optional (Some / Option setters).

Allow client connects without authentication.

Source

pub fn maybe_disable_ticketing( self, value: Option<OnOff>, ) -> SpiceBuilder<SetDisableTicketing<S>>
where S::DisableTicketing: IsUnset,

Optional (Some / Option setters).

Allow client connects without authentication.

Source

pub fn disable_copy_paste( self, value: OnOff, ) -> SpiceBuilder<SetDisableCopyPaste<S>>
where S::DisableCopyPaste: IsUnset,

Optional (Some / Option setters).

Disable copy paste between the client and the guest.

Source

pub fn maybe_disable_copy_paste( self, value: Option<OnOff>, ) -> SpiceBuilder<SetDisableCopyPaste<S>>
where S::DisableCopyPaste: IsUnset,

Optional (Some / Option setters).

Disable copy paste between the client and the guest.

Source

pub fn disable_agent_file_xfer( self, value: OnOff, ) -> SpiceBuilder<SetDisableAgentFileXfer<S>>
where S::DisableAgentFileXfer: IsUnset,

Optional (Some / Option setters).

Disable spice-vdagent based file-xfer between the client and the guest.

Source

pub fn maybe_disable_agent_file_xfer( self, value: Option<OnOff>, ) -> SpiceBuilder<SetDisableAgentFileXfer<S>>
where S::DisableAgentFileXfer: IsUnset,

Optional (Some / Option setters).

Disable spice-vdagent based file-xfer between the client and the guest.

Source

pub fn tls_port(self, value: u16) -> SpiceBuilder<SetTlsPort<S>>
where S::TlsPort: IsUnset,

Optional (Some / Option setters).

Set the TCP port spice is listening on for encrypted channels.

Source

pub fn maybe_tls_port(self, value: Option<u16>) -> SpiceBuilder<SetTlsPort<S>>
where S::TlsPort: IsUnset,

Optional (Some / Option setters).

Set the TCP port spice is listening on for encrypted channels.

Source

pub fn x509_dir(self, value: PathBuf) -> SpiceBuilder<SetX509Dir<S>>
where S::X509Dir: IsUnset,

Optional (Some / Option setters).

Set the x509 file directory. Expects same filenames as -vnc $display,x509=$dir

Source

pub fn maybe_x509_dir( self, value: Option<PathBuf>, ) -> SpiceBuilder<SetX509Dir<S>>
where S::X509Dir: IsUnset,

Optional (Some / Option setters).

Set the x509 file directory. Expects same filenames as -vnc $display,x509=$dir

Source

pub fn x509_key_file(self, value: PathBuf) -> SpiceBuilder<SetX509KeyFile<S>>
where S::X509KeyFile: IsUnset,

Optional (Some / Option setters).

The x509 file names can also be configured individually.

Source

pub fn maybe_x509_key_file( self, value: Option<PathBuf>, ) -> SpiceBuilder<SetX509KeyFile<S>>
where S::X509KeyFile: IsUnset,

Optional (Some / Option setters).

The x509 file names can also be configured individually.

Source

pub fn x509_key_password( self, value: PathBuf, ) -> SpiceBuilder<SetX509KeyPassword<S>>
where S::X509KeyPassword: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_x509_key_password( self, value: Option<PathBuf>, ) -> SpiceBuilder<SetX509KeyPassword<S>>
where S::X509KeyPassword: IsUnset,

Optional (Some / Option setters).

Source

pub fn x509_cert_file(self, value: PathBuf) -> SpiceBuilder<SetX509CertFile<S>>
where S::X509CertFile: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_x509_cert_file( self, value: Option<PathBuf>, ) -> SpiceBuilder<SetX509CertFile<S>>
where S::X509CertFile: IsUnset,

Optional (Some / Option setters).

Source

pub fn x509_cacert_file( self, value: PathBuf, ) -> SpiceBuilder<SetX509CacertFile<S>>
where S::X509CacertFile: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_x509_cacert_file( self, value: Option<PathBuf>, ) -> SpiceBuilder<SetX509CacertFile<S>>
where S::X509CacertFile: IsUnset,

Optional (Some / Option setters).

Source

pub fn x509_dh_key_file( self, value: PathBuf, ) -> SpiceBuilder<SetX509DhKeyFile<S>>
where S::X509DhKeyFile: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_x509_dh_key_file( self, value: Option<PathBuf>, ) -> SpiceBuilder<SetX509DhKeyFile<S>>
where S::X509DhKeyFile: IsUnset,

Optional (Some / Option setters).

Source

pub fn tls_ciphers(self, value: String) -> SpiceBuilder<SetTlsCiphers<S>>
where S::TlsCiphers: IsUnset,

Optional (Some / Option setters).

Specify which ciphers to use.

Source

pub fn maybe_tls_ciphers( self, value: Option<String>, ) -> SpiceBuilder<SetTlsCiphers<S>>
where S::TlsCiphers: IsUnset,

Optional (Some / Option setters).

Specify which ciphers to use.

Source

pub fn tls_channel(self, value: Channel) -> SpiceBuilder<SetTlsChannel<S>>
where S::TlsChannel: IsUnset,

Optional (Some / Option setters).

Force specific channel to be used with or without TLS encryption. The options can be specified multiple times to configure multiple channels. The special name “default” can be used to set the default mode. For channels which are not explicitly forced into one mode the spice client is allowed to pick tls/plaintext as he pleases.

Source

pub fn maybe_tls_channel( self, value: Option<Channel>, ) -> SpiceBuilder<SetTlsChannel<S>>
where S::TlsChannel: IsUnset,

Optional (Some / Option setters).

Force specific channel to be used with or without TLS encryption. The options can be specified multiple times to configure multiple channels. The special name “default” can be used to set the default mode. For channels which are not explicitly forced into one mode the spice client is allowed to pick tls/plaintext as he pleases.

Source

pub fn plaintext_channel( self, value: Channel, ) -> SpiceBuilder<SetPlaintextChannel<S>>
where S::PlaintextChannel: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_plaintext_channel( self, value: Option<Channel>, ) -> SpiceBuilder<SetPlaintextChannel<S>>
where S::PlaintextChannel: IsUnset,

Optional (Some / Option setters).

Source

pub fn image_compression( self, value: ImageCompression, ) -> SpiceBuilder<SetImageCompression<S>>
where S::ImageCompression: IsUnset,

Optional (Some / Option setters).

Configure image compression (lossless). Default is auto_glz.

Source

pub fn maybe_image_compression( self, value: Option<ImageCompression>, ) -> SpiceBuilder<SetImageCompression<S>>
where S::ImageCompression: IsUnset,

Optional (Some / Option setters).

Configure image compression (lossless). Default is auto_glz.

Source

pub fn jpeg_wan_compression( self, value: AutoNeverAlways, ) -> SpiceBuilder<SetJpegWanCompression<S>>
where S::JpegWanCompression: IsUnset,

Optional (Some / Option setters).

Configure wan image compression (lossy for slow links). Default is auto.

Source

pub fn maybe_jpeg_wan_compression( self, value: Option<AutoNeverAlways>, ) -> SpiceBuilder<SetJpegWanCompression<S>>
where S::JpegWanCompression: IsUnset,

Optional (Some / Option setters).

Configure wan image compression (lossy for slow links). Default is auto.

Source

pub fn zlib_glz_wan_compression( self, value: AutoNeverAlways, ) -> SpiceBuilder<SetZlibGlzWanCompression<S>>
where S::ZlibGlzWanCompression: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_zlib_glz_wan_compression( self, value: Option<AutoNeverAlways>, ) -> SpiceBuilder<SetZlibGlzWanCompression<S>>
where S::ZlibGlzWanCompression: IsUnset,

Optional (Some / Option setters).

Source

pub fn streaming_video( self, value: OffAllFilter, ) -> SpiceBuilder<SetStreamingVideo<S>>
where S::StreamingVideo: IsUnset,

Optional (Some / Option setters).

Configure video stream detection. Default is off.

Source

pub fn maybe_streaming_video( self, value: Option<OffAllFilter>, ) -> SpiceBuilder<SetStreamingVideo<S>>
where S::StreamingVideo: IsUnset,

Optional (Some / Option setters).

Configure video stream detection. Default is off.

Source

pub fn agent_mouse( self, value: OnOffDefaultOn, ) -> SpiceBuilder<SetAgentMouse<S>>
where S::AgentMouse: IsUnset,

Optional (Some / Option setters).

Enable/disable passing mouse events via vdagent. Default is on.

Source

pub fn maybe_agent_mouse( self, value: Option<OnOffDefaultOn>, ) -> SpiceBuilder<SetAgentMouse<S>>
where S::AgentMouse: IsUnset,

Optional (Some / Option setters).

Enable/disable passing mouse events via vdagent. Default is on.

Source

pub fn playback_compression( self, value: OnOffDefaultOn, ) -> SpiceBuilder<SetPlaybackCompression<S>>
where S::PlaybackCompression: IsUnset,

Optional (Some / Option setters).

Enable/disable audio stream compression (using celt 0.5.1). Default is on.

Source

pub fn maybe_playback_compression( self, value: Option<OnOffDefaultOn>, ) -> SpiceBuilder<SetPlaybackCompression<S>>
where S::PlaybackCompression: IsUnset,

Optional (Some / Option setters).

Enable/disable audio stream compression (using celt 0.5.1). Default is on.

Source

pub fn seamless_migration( self, value: OnOffDefaultOff, ) -> SpiceBuilder<SetSeamlessMigration<S>>
where S::SeamlessMigration: IsUnset,

Optional (Some / Option setters).

Enable/disable spice seamless migration. Default is off.

Source

pub fn maybe_seamless_migration( self, value: Option<OnOffDefaultOff>, ) -> SpiceBuilder<SetSeamlessMigration<S>>
where S::SeamlessMigration: IsUnset,

Optional (Some / Option setters).

Enable/disable spice seamless migration. Default is off.

Source

pub fn gl(self, value: OnOffDefaultOn) -> SpiceBuilder<SetGl<S>>
where S::Gl: IsUnset,

Optional (Some / Option setters).

Enable/disable OpenGL context. Default is off.

Source

pub fn maybe_gl(self, value: Option<OnOffDefaultOn>) -> SpiceBuilder<SetGl<S>>
where S::Gl: IsUnset,

Optional (Some / Option setters).

Enable/disable OpenGL context. Default is off.

Source

pub fn rendernode(self, value: PathBuf) -> SpiceBuilder<SetRendernode<S>>
where S::Rendernode: IsUnset,

Optional (Some / Option setters).

DRM render node for OpenGL rendering. If not specified, it will pick the first available. (Since 2.9)

Source

pub fn maybe_rendernode( self, value: Option<PathBuf>, ) -> SpiceBuilder<SetRendernode<S>>
where S::Rendernode: IsUnset,

Optional (Some / Option setters).

DRM render node for OpenGL rendering. If not specified, it will pick the first available. (Since 2.9)

Auto Trait Implementations§

§

impl<S> Freeze for SpiceBuilder<S>

§

impl<S> RefUnwindSafe for SpiceBuilder<S>

§

impl<S> Send for SpiceBuilder<S>

§

impl<S> Sync for SpiceBuilder<S>

§

impl<S> Unpin for SpiceBuilder<S>

§

impl<S> UnwindSafe for SpiceBuilder<S>

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.