[][src]Struct deno_cli::state::ThreadSafeState

pub struct ThreadSafeState(_);

Isolate cannot be passed between threads but ThreadSafeState can. ThreadSafeState satisfies Send and Sync. So any state that needs to be accessed outside the main V8 thread should be inside ThreadSafeState.

Methods

impl ThreadSafeState[src]

pub fn dispatch(
    &self,
    op_id: OpId,
    control: &[u8],
    zero_copy: Option<PinnedBuf>
) -> CoreOp
[src]

impl ThreadSafeState[src]

pub fn new(
    flags: DenoFlags,
    argv_rest: Vec<String>,
    progress: Progress,
    include_deno_namespace: bool
) -> Result<Self, ErrBox>
[src]

pub fn fetch_compiled_module(
    &self,
    module_specifier: &ModuleSpecifier
) -> impl Future<Item = CompiledModule, Error = ErrBox>
[src]

pub fn main_module(&self) -> Option<ModuleSpecifier>[src]

Read main module from argv

pub fn check_read(&self, filename: &str) -> Result<(), ErrBox>[src]

pub fn check_write(&self, filename: &str) -> Result<(), ErrBox>[src]

pub fn check_env(&self) -> Result<(), ErrBox>[src]

pub fn check_net(&self, host_and_port: &str) -> Result<(), ErrBox>[src]

pub fn check_net_url(&self, url: &Url) -> Result<(), ErrBox>[src]

pub fn check_run(&self) -> Result<(), ErrBox>[src]

pub fn check_dyn_import(
    &self,
    module_specifier: &ModuleSpecifier
) -> Result<(), ErrBox>
[src]

pub fn metrics_op_dispatched(
    &self,
    bytes_sent_control: usize,
    bytes_sent_data: usize
)
[src]

pub fn metrics_op_completed(&self, bytes_received: usize)[src]

Methods from Deref<Target = Arc<State>>

Trait Implementations

impl Clone for ThreadSafeState[src]

impl Deref for ThreadSafeState[src]

type Target = Arc<State>

The resulting type after dereferencing.

impl Loader for ThreadSafeState[src]

fn load(&self, module_specifier: &ModuleSpecifier) -> Box<SourceCodeInfoFuture>[src]

Given an absolute url, load its source code.

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err

impl<T, F> ComparatorFunction<Option<T>> for F where
    F: ComparatorFunction<T>, 
[src]