pub struct VortexSession(/* private fields */);Expand description
A Vortex session encapsulates the set of extensible arrays, layouts, compute functions, dtypes, etc. that are available for use in a given context.
It is also the entry-point passed to dynamic libraries to initialize Vortex plugins.
Cloning a session is cheap and shares the backing store: a variable registered through one
clone (via VortexSession::with_some or one of the with_* helpers) is observed by all
clones. To build an independent session, start from VortexSession::empty.
Implementations§
Source§impl VortexSession
impl VortexSession
Sourcepub fn empty() -> Self
pub fn empty() -> Self
Create a new VortexSession with no session state.
Sourcepub fn with<V: VortexSessionVar + Default>(self) -> Self
pub fn with<V: VortexSessionVar + Default>(self) -> Self
Inserts a new session variable of type V with its default value, mutating this session in
place and returning it for chaining.
The change is applied copy-on-write to the shared backing store, so it is observed through every clone of this session.
§Panics
If a variable of that type already exists.
Sourcepub fn with_some<V: VortexSessionVar>(self, var: V) -> Self
pub fn with_some<V: VortexSessionVar>(self, var: V) -> Self
Inserts a new session variable of type V, mutating this session in place and returning it
for chaining.
The change is applied copy-on-write to the shared backing store, so it is observed through every clone of this session.
§Panics
If a variable of that type already exists.
Sourcepub fn allows_unknown(&self) -> bool
pub fn allows_unknown(&self) -> bool
Returns whether unknown plugins should deserialize as foreign placeholders.
Sourcepub fn allow_unknown(self) -> Self
pub fn allow_unknown(self) -> Self
Allow deserializing unknown plugin IDs as non-executable foreign placeholders.
Mutates this session in place and returns it for chaining.
Trait Implementations§
Source§impl Clone for VortexSession
impl Clone for VortexSession
Source§fn clone(&self) -> VortexSession
fn clone(&self) -> VortexSession
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VortexSession
impl Debug for VortexSession
Source§impl SessionExt for VortexSession
impl SessionExt for VortexSession
Source§fn session(&self) -> VortexSession
fn session(&self) -> VortexSession
VortexSession.Source§fn get<V: VortexSessionVar + Default>(&self) -> SessionGuard<'_, V>
fn get<V: VortexSessionVar + Default>(&self) -> SessionGuard<'_, V>
V, inserting a default one if it does not exist. Read moreSource§fn get_opt<V: VortexSessionVar>(&self) -> Option<SessionGuard<'_, V>>
fn get_opt<V: VortexSessionVar>(&self) -> Option<SessionGuard<'_, V>>
V if it exists.Source§fn get_mut<V: VortexSessionVar + Default + Clone>(&self) -> SessionMut<'_, V>
fn get_mut<V: VortexSessionVar + Default + Clone>(&self) -> SessionMut<'_, V>
SessionMut handle for the variable of type V, inserting a
default one first if it does not exist. Read more