Struct RawEnvironment

Source
pub struct RawEnvironment<T, CC, SC, VC> { /* private fields */ }

Implementations§

Source§

impl<T, CC, SC, VC> RawEnvironment<T, CC, SC, VC>

Source

pub fn has_symbol(&self, symbol: &str) -> bool

Source§

impl<T, CC, SC, VC> RawEnvironment<T, CC, SC, VC>

Source

pub fn merge( left: RawEnvironment<T, CC, SC, VC>, right: RawEnvironment<T, CC, SC, VC>, using: fn(VC, VC) -> VC, ) -> RawEnvironment<T, CC, SC, VC>

Source§

impl<T, CC, SC, VC> RawEnvironment<T, CC, SC, VC>
where T: VarInfo,

Source

pub fn new() -> RawEnvironment<T, CC, SC, VC>

Source

pub fn add_variable_block(&mut self)

Source

pub fn remove_variable_block(&mut self)

Source

pub fn add_variable(&mut self, variable_name: &str, content: VC)

Source

pub fn has_variable(&self, symbol: &str) -> bool

Source

pub fn get_variable(&self, symbol: &str) -> Option<&VC>

Source

pub fn get_mut_variable(&mut self, symbol: &str) -> Option<&mut VC>

Source

pub fn get_variable_res( &self, symbol: &str, ) -> Result<&VC, CircomEnvironmentError>

Source

pub fn remove_variable(&mut self, symbol: &str)

Source

pub fn get_variable_or_break(&self, symbol: &str, file: &str, line: u32) -> &VC

Source

pub fn get_mut_variable_mut( &mut self, symbol: &str, ) -> Result<&mut VC, CircomEnvironmentError>

Source

pub fn get_mut_variable_or_break( &mut self, symbol: &str, file: &str, line: u32, ) -> &mut VC

Source§

impl<T, CC, SC, VC> RawEnvironment<T, CC, SC, VC>
where T: ComponentInfo,

Source

pub fn add_component(&mut self, component_name: &str, content: CC)

Source

pub fn remove_component(&mut self, component_name: &str)

Source

pub fn has_component(&self, symbol: &str) -> bool

Source

pub fn get_component(&self, symbol: &str) -> Option<&CC>

Source

pub fn get_mut_component(&mut self, symbol: &str) -> Option<&mut CC>

Source

pub fn get_component_res( &self, symbol: &str, ) -> Result<&CC, CircomEnvironmentError>

Source

pub fn get_component_or_break(&self, symbol: &str, file: &str, line: u32) -> &CC

Source

pub fn get_mut_component_res( &mut self, symbol: &str, ) -> Result<&mut CC, CircomEnvironmentError>

Source

pub fn get_mut_component_or_break( &mut self, symbol: &str, file: &str, line: u32, ) -> &mut CC

Source

pub fn get_components_ref(&self) -> &HashMap<String, CC>

Source§

impl<T, CC, SC, VC> RawEnvironment<T, CC, SC, VC>
where T: SignalInfo,

Source

pub fn add_input(&mut self, input_name: &str, content: SC)

Source

pub fn remove_input(&mut self, input_name: &str)

Source

pub fn add_output(&mut self, output_name: &str, content: SC)

Source

pub fn remove_output(&mut self, output_name: &str)

Source

pub fn add_intermediate(&mut self, intermediate_name: &str, content: SC)

Source

pub fn remove_intermediate(&mut self, intermediate_name: &str)

Source

pub fn has_input(&self, symbol: &str) -> bool

Source

pub fn has_output(&self, symbol: &str) -> bool

Source

pub fn has_intermediate(&self, symbol: &str) -> bool

Source

pub fn has_signal(&self, symbol: &str) -> bool

Source

pub fn get_input(&self, symbol: &str) -> Option<&SC>

Source

pub fn get_mut_input(&mut self, symbol: &str) -> Option<&mut SC>

Source

pub fn get_input_res(&self, symbol: &str) -> Result<&SC, CircomEnvironmentError>

Source

pub fn get_input_or_break(&self, symbol: &str, file: &str, line: u32) -> &SC

Source

pub fn get_mut_input_res( &mut self, symbol: &str, ) -> Result<&mut SC, CircomEnvironmentError>

Source

pub fn get_mut_input_or_break( &mut self, symbol: &str, file: &str, line: u32, ) -> &mut SC

Source

pub fn get_output(&self, symbol: &str) -> Option<&SC>

Source

pub fn get_mut_output(&mut self, symbol: &str) -> Option<&mut SC>

Source

pub fn get_output_res( &self, symbol: &str, ) -> Result<&SC, CircomEnvironmentError>

Source

pub fn get_output_or_break(&self, symbol: &str, file: &str, line: u32) -> &SC

Source

pub fn get_mut_output_res( &mut self, symbol: &str, ) -> Result<&mut SC, CircomEnvironmentError>

Source

pub fn get_mut_output_or_break( &mut self, symbol: &str, file: &str, line: u32, ) -> &mut SC

Source

pub fn get_intermediate(&self, symbol: &str) -> Option<&SC>

Source

pub fn get_mut_intermediate(&mut self, symbol: &str) -> Option<&mut SC>

Source

pub fn get_intermediate_res( &self, symbol: &str, ) -> Result<&SC, CircomEnvironmentError>

Source

pub fn get_intermediate_or_break( &self, symbol: &str, file: &str, line: u32, ) -> &SC

Source

pub fn get_mut_intermediate_res( &mut self, symbol: &str, ) -> Result<&mut SC, CircomEnvironmentError>

Source

pub fn get_mut_intermediate_or_break( &mut self, symbol: &str, file: &str, line: u32, ) -> &mut SC

Source

pub fn get_signal(&self, symbol: &str) -> Option<&SC>

Source

pub fn get_mut_signal(&mut self, symbol: &str) -> Option<&mut SC>

Source

pub fn get_signal_res( &self, symbol: &str, ) -> Result<&SC, CircomEnvironmentError>

Source

pub fn get_signal_or_break(&self, symbol: &str, file: &str, line: u32) -> &SC

Source

pub fn get_mut_signal_res( &mut self, symbol: &str, ) -> Result<&mut SC, CircomEnvironmentError>

Source

pub fn get_mut_signal_or_break( &mut self, symbol: &str, file: &str, line: u32, ) -> &mut SC

Trait Implementations§

Source§

impl<T: Clone, CC: Clone, SC: Clone, VC: Clone> Clone for RawEnvironment<T, CC, SC, VC>

Source§

fn clone(&self) -> RawEnvironment<T, CC, SC, VC>

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

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

Performs copy-assignment from source. Read more
Source§

impl<T, CC, SC, VC> Default for RawEnvironment<T, CC, SC, VC>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<T, CC, SC, VC> Freeze for RawEnvironment<T, CC, SC, VC>

§

impl<T, CC, SC, VC> RefUnwindSafe for RawEnvironment<T, CC, SC, VC>

§

impl<T, CC, SC, VC> Send for RawEnvironment<T, CC, SC, VC>
where T: Send, CC: Send, SC: Send, VC: Send,

§

impl<T, CC, SC, VC> Sync for RawEnvironment<T, CC, SC, VC>
where T: Sync, CC: Sync, SC: Sync, VC: Sync,

§

impl<T, CC, SC, VC> Unpin for RawEnvironment<T, CC, SC, VC>
where T: Unpin, CC: Unpin, SC: Unpin, VC: Unpin,

§

impl<T, CC, SC, VC> UnwindSafe for RawEnvironment<T, CC, SC, VC>
where CC: UnwindSafe, SC: UnwindSafe, T: UnwindSafe, VC: UnwindSafe,

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.
Source§

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

Source§

fn vzip(self) -> V