[][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 a corresponding ContextHandle.

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

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 share_port(&mut self, port: &mut Port) -> PortID[src]

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

pub fn get_port_mut(&mut self, port_id: PortID) -> Option<&mut Port>[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]

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

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

Trait Implementations

impl PartialOrd<Context> for Context[src]

#[must_use] fn lt(&self, other: &Rhs) -> bool1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use] fn le(&self, other: &Rhs) -> bool1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use] fn gt(&self, other: &Rhs) -> bool1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use] fn ge(&self, other: &Rhs) -> bool1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl PartialEq<Context> for Context[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl Eq for Context[src]

impl Debug for Context[src]

Auto Trait Implementations

impl Unpin for Context

impl Send for Context

impl Sync for Context

impl RefUnwindSafe for Context

impl UnwindSafe for Context

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<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