Addr

Enum Addr 

Source
pub enum Addr {
    Task(Id),
    Remote(ConnId, Id),
}
Expand description

Where a task is: in this heap, or on the far side of one of this node’s links. A host peer is not here - ('host name) is an ordinary cons, a name the program writes, while a task address is a capability the runtime mints.

Opaque because crossing a link Task(3) must arrive as Remote(conn, 3) (crate::link::across), and a tagged cons is a shape a program can build as data, so the rewrite could not tell an address from something like one.

Variants§

§

Task(Id)

§

Remote(ConnId, Id)

Implementations§

Source§

impl Addr

Source

pub const NAME: &'static str = "addr"

Source

pub fn val(self) -> Val

Source

pub fn of(v: &Val) -> Option<&Addr>

Trait Implementations§

Source§

impl Clone for Addr

Source§

fn clone(&self) -> Addr

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

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Addr

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Addr

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Not a form the reader accepts, deliberately: an address cannot be written down, so its printed form does not pretend to be source.

Source§

impl HostType for Addr

Source§

fn type_name(&self) -> &'static str

Wire tag and registry key, stable across processes. Table indices are process-local, names are not.
Source§

fn eq_atom(&self, other: &dyn HostType) -> bool

Implementations downcast and return false on a foreign type rather than comparing tags.
Source§

fn encode(&self, out: &mut Vec<u8>)

Source§

fn as_any(&self) -> &dyn Any

Source§

impl PartialEq for Addr

Source§

fn eq(&self, other: &Addr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Addr

Auto Trait Implementations§

§

impl Freeze for Addr

§

impl RefUnwindSafe for Addr

§

impl Send for Addr

§

impl Sync for Addr

§

impl Unpin for Addr

§

impl UnwindSafe for Addr

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
§

impl<T> ToSmolStr for T
where T: Display + ?Sized,

§

fn to_smolstr(&self) -> SmolStr

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.