[−][src]Struct aces::Context
A representation of shared state.
This is an umbrella type which, currently, includes a collection
of Atom
s 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]
name: S,
origin: ContentOrigin
) -> ContextHandle
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]
name: S,
parent: &ContextHandle
) -> ContextHandle
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_link(&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_link(&mut self, link: &mut Link) -> LinkID
[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_link(&self, link_id: LinkID) -> Option<&Link>
[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]
&'a self,
thing: &'a mut T
) -> InContextMut<'a, T>
Trait Implementations
impl Eq for Context
[src]
impl PartialOrd<Context> for Context
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[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]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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,
Inner: Part,
Outer: Part<PartType = Field<OuterFieldType>>,
OuterFieldType: HasPart<Inner, RawTarget = OuterFieldType> + PartialRefTarget + ?Sized,
Reference: HasPart<Outer> + ?Sized,
unsafe fn part_ptr(
ptr: *const <Reference as PartialRefTarget>::RawTarget
) -> <<Inner as Part>::PartType as PartType>::Ptr
ptr: *const <Reference as PartialRefTarget>::RawTarget
) -> <<Inner as Part>::PartType as PartType>::Ptr
unsafe fn part_ptr_mut(
ptr: *mut <Reference as PartialRefTarget>::RawTarget
) -> <<Inner as Part>::PartType as PartType>::PtrMut
ptr: *mut <Reference as PartialRefTarget>::RawTarget
) -> <<Inner as Part>::PartType as PartType>::PtrMut