[][src]Struct aces::Context

pub struct Context { /* fields omitted */ }

A representation of shared state.

This is an umbrella type which, currently, includes a collection of Atoms and two symbol tables, one for structure names, and another for node names.

For usage, see ContextHandle type, Contextual trait and InContext struct.

Methods

impl Context[src]

pub fn new_toplevel<S: AsRef<str>>(
    name: S,
    origin: ContentOrigin
) -> ContextHandle
[src]

Creates a new toplevel Context instance and returns the corresponding ContextHandle.

Calling this method, or its variant, new_interactive(), is the only public way of creating toplevel Context instances.

pub fn new_interactive<S: AsRef<str>>(name: S) -> ContextHandle[src]

Creates a new toplevel Context instance, sets content origin to ContentOrigin::Interactive and returns the corresponding ContextHandle.

This is a specialized variant of the new_toplevel() method.

pub fn reset(&mut self, new_origin: ContentOrigin)[src]

pub fn new_derived<S: AsRef<str>>(
    name: S,
    parent: &ContextHandle
) -> ContextHandle
[src]

Creates a new derived Context instance and returns a corresponding ContextHandle.

Calling this method is the only public way of creating derived Context instances.

pub fn is_toplevel(&self) -> bool[src]

pub fn is_derived(&self) -> bool[src]

pub fn get_name(&self) -> &str[src]

pub fn share_node_name<S: AsRef<str>>(&mut self, node_name: S) -> NodeID[src]

pub fn get_node_name(&self, node_id: NodeID) -> Option<&str>[src]

pub fn get_node_id<S: AsRef<str>>(&self, node_name: S) -> Option<NodeID>[src]

pub fn is_port(&self, atom_id: AtomID) -> bool[src]

pub fn is_split(&self, atom_id: AtomID) -> bool[src]

pub fn is_fork(&self, atom_id: AtomID) -> bool[src]

pub fn is_join(&self, atom_id: AtomID) -> bool[src]

pub fn share_port(&mut self, port: &mut Port) -> PortID[src]

pub fn share_fork(&mut self, fork: &mut Fork) -> ForkID[src]

pub fn share_join(&mut self, join: &mut Join) -> JoinID[src]

pub fn get_port(&self, port_id: PortID) -> Option<&Port>[src]

pub fn get_split(&self, atom_id: AtomID) -> Option<&Split>[src]

pub fn get_fork(&self, fork_id: ForkID) -> Option<&Fork>[src]

pub fn get_join(&self, join_id: JoinID) -> Option<&Join>[src]

pub fn get_antiport_id(&self, port_id: PortID) -> Option<PortID>[src]

impl Context[src]

pub fn with<'a, T: Contextual>(&'a self, thing: &'a T) -> InContext<'a, T>[src]

pub fn with_mut<'a, T: Contextual>(
    &'a self,
    thing: &'a mut T
) -> InContextMut<'a, T>
[src]

Trait Implementations

impl Eq for Context[src]

impl PartialOrd<Context> for Context[src]

impl PartialEq<Context> for Context[src]

impl Debug for Context[src]

Auto Trait Implementations

impl Send for Context

impl Unpin for Context

impl Sync for Context

impl UnwindSafe for Context

impl RefUnwindSafe for Context

Blanket Implementations

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<Reference, Outer, OuterFieldType, Inner> HasPart<Nested<Outer, Inner>> for Reference where
    Inner: Part,
    Outer: Part<PartType = Field<OuterFieldType>>,
    OuterFieldType: HasPart<Inner, RawTarget = OuterFieldType> + PartialRefTarget + ?Sized,
    Reference: HasPart<Outer> + ?Sized