Expand description
Session is responsible for communicating with HAPI
The Engine promises
to be thread-safe when accessing a single Session from multiple threads.
hapi-rs relies on this promise and the Session struct holds only an Arc pointer to the session,
and does not protect the session with Mutex, although there is a parking_lot::ReentrantMutex
private member which is used internally in a few cases where API calls must be sequential.
When the last instance of the Session is about to get dropped, it’ll be cleaned up
(if SessionOptions::cleanup was set) and automatically closed.
The Engine process (pipe or socket) can be auto-terminated as well if told so when starting the server: See start_engine_pipe_server and start_engine_socket_server
quick_session terminates the server by default. This is useful for quick one-off jobs.
Re-exports§
pub use crate::asset::AssetLibrary;pub use crate::node::HoudiniNode;pub use crate::node::ManagerNode;pub use crate::node::ManagerType;pub use crate::node::NodeHandle;pub use crate::node::NodeType;pub use crate::node::Transform;pub use crate::parameter::Parameter;pub use crate::stringhandle::StringArray;
Structs§
- Error type returned by all APIs
 - Builder struct for
Session::node_builderAPI - Configurations for sessions
 - Session options passed to session create functions like
connect_to_pipe - A build for SessionOptions.
 - Options to configure a Thrift server being started from HARC.
 
Enums§
- By which means the session communicates with the server.
 - Result of async cook operation
Session::cook 
Traits§
- Trait bound for
Session::get_server_var()andSession::set_server_var() 
Functions§
- Connect to the engine process via a pipe file. If
timeoutis Some, function will try to connect to the server multiple times every 100ms untiltimeoutis reached. Note: Default SessionOptions create a blocking session, non-threaded session, useSessionOptionsBuilderto configure this. - Connect to the engine process via a Unix socket
 - Create in-process session
 - A quick drop-in session, useful for on-off jobs It starts a single-threaded shared memory server and initialize a session with default options
 - Spawn a new pipe Engine process and return its PID
 - Spawn a new socket Engine server and return its PID
 - Start an interactive Houdini session with engine server embedded.
 - Spawn a new Engine server utilizing shared memory to transfer data.