[−][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 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]
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 share_port(&mut self, port: &mut Port) -> PortID
[src]
pub fn share_link(&mut self, link: &mut Link) -> LinkID
[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_link(&self, link_id: LinkID) -> Option<&Link>
[src]
pub fn get_link_mut(&mut self, link_id: LinkID) -> Option<&mut Link>
[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>
pub fn with_docked<'a, T: Contextual>(
&'a self,
face: Face,
thing: &'a T
) -> InContext<'a, T>
[src]
&'a self,
face: Face,
thing: &'a T
) -> InContext<'a, T>
pub fn with_docked_mut<'a, T: Contextual>(
&'a self,
face: Face,
thing: &'a mut T
) -> InContextMut<'a, T>
[src]
&'a self,
face: Face,
thing: &'a mut T
) -> InContextMut<'a, T>
Trait Implementations
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]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.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) -> bool
1.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) -> bool
1.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]
fn eq(&self, other: &Self) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.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]
U: From<T>,
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