pub struct Environment { /* private fields */ }Expand description
Session execution resources. Workspace is first; future compute/network resources attach through the open type-keyed extension seam.
Implementations§
Source§impl Environment
impl Environment
Sourcepub fn new(head: WorkspaceHead) -> Self
pub fn new(head: WorkspaceHead) -> Self
Create an Environment containing one workspace head and no extensions.
pub fn builder() -> EnvironmentBuilder
pub fn workspace_head(&self) -> &WorkspaceHead
pub fn extension<T: Any + Send + Sync>(&self) -> Option<Arc<T>>
Trait Implementations§
Source§impl Clone for Environment
impl Clone for Environment
Source§fn clone(&self) -> Environment
fn clone(&self) -> Environment
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for Environment
impl !UnwindSafe for Environment
impl Freeze for Environment
impl Send for Environment
impl Sync for Environment
impl Unpin for Environment
impl UnsafeUnpin for Environment
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more