[][src]Struct purezen::message::object::connection::Connection

pub struct Connection {
    pub first: Id,
    pub second: Index,
}

Entries in our connections table. Named Connection to match the Zg name until the translation is finished.

Fields

first: Id

Identifier for the target object.

Named first for historical reasons: in Zg this was modeled as a C++ std::pair

second: Index

Index into the connection array.

Named second for historical reasons: in Zg this was modeled as a C++ std::pair

Methods

impl Connection[src]

pub fn new(object_id: Id, index: Index) -> Self[src]

Create a new Connection

pub fn object_id(&self) -> Id[src]

Get the object's ID

pub fn object<'ctx>(&self, context: &'ctx mut Context) -> &'ctx Object[src]

Get a reference to the connected object from the given allocator

pub fn object_mut<'ctx>(&self, context: &'ctx mut Context) -> &'ctx mut Object[src]

Get a mutable reference to the connected object from the given allocator

pub fn index(&self) -> Index[src]

Get the connection index

Trait Implementations

impl Clone for Connection[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for Connection[src]

impl PartialEq<Connection> for Connection[src]

impl Eq for Connection[src]

impl Debug for Connection[src]

Auto Trait Implementations

impl Send for Connection

impl Sync for Connection

Blanket Implementations

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> Same for T[src]

type Output = T

Should always be Self