ServerOptions

Struct ServerOptions 

Source
pub struct ServerOptions {
    pub thrift_transport: ThriftTransport,
    pub auto_close: bool,
    pub verbosity: StatusVerbosity,
    pub log_file: Option<CString>,
    pub env_variables: Option<HashMap<OsString, OsString>>,
    pub license_preference: Option<LicensePreference>,
    pub connection_count: i32,
    pub server_ready_timeout: Option<u32>,
    /* private fields */
}

Fields§

§thrift_transport: ThriftTransport§auto_close: bool§verbosity: StatusVerbosity§log_file: Option<CString>§env_variables: Option<HashMap<OsString, OsString>>§license_preference: Option<LicensePreference>§connection_count: i32§server_ready_timeout: Option<u32>

Implementations§

Source§

impl ServerOptions

Source

pub fn shared_memory_with_defaults() -> Self

Create options for a shared-memory transport with a random name.

Source

pub fn pipe_with_defaults() -> Self

Create options for a named pipe transport.

Source

pub fn socket_with_defaults(address: SocketAddrV4) -> Self

Create options for a socket transport.

Source

pub fn with_thrift_transport(self, transport: ThriftTransport) -> Self

Source

pub fn with_connection_timeout(self, timeout: Option<Duration>) -> Self

Set a connection timeout used when establishing Thrift sessions.

Source

pub fn with_license_preference( self, license_preference: LicensePreference, ) -> Self

Set the license preference for the server. For more information, see https://www.sidefx.com/docs/houdini//licensing/system.html Default is No preference, the server decides which license to check out.

Source

pub fn with_log_file(self, file: impl AsRef<Path>) -> Self

Set the log file for the server. BUG: HARS 21.0.685 has a bug where the log file is always created in the working directory

Source

pub fn with_env_variables<'a, I, K, V>(self, variables: I) -> Self
where I: Iterator<Item = &'a (K, V)>, K: Into<OsString> + Clone + 'a, V: Into<OsString> + Clone + 'a,

Set real environment variables before the server starts. Unlike crate::session::Session::set_server_var, where the variables are set in the session after the server starts.

Source

pub fn with_auto_close(self, auto_close: bool) -> Self

Automatically close the server when the last connection drops.

Source

pub fn with_verbosity(self, verbosity: StatusVerbosity) -> Self

Set the verbosity level for the server.

Source

pub fn with_connection_count(self, connection_count: i32) -> Self

Source

pub fn with_server_ready_timeout(self, timeout: u32) -> Self

Set the timeout for the server to be ready in ms This is the timeout for the server to initialize and be ready to accept connections.

Trait Implementations§

Source§

impl Clone for ServerOptions

Source§

fn clone(&self) -> ServerOptions

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ServerOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ServerOptions

Source§

fn default() -> Self

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.