Trait SocketAdapter

Source
pub trait SocketAdapter {
    type SocketId: Id;

    // Required methods
    fn id(&self) -> Self::SocketId;
    fn ui(&self) -> SocketUI;
}
Expand description

An adapter that represent a socket of a graph.

Required Associated Types§

Source

type SocketId: Id

An identifier used to identify a socket over the graph.

Required Methods§

Source

fn id(&self) -> Self::SocketId

The unique identifier of this socket.

Source

fn ui(&self) -> SocketUI

Defines how the socket should be rendered.

Implementations on Foreign Types§

Source§

impl<'a, T: SocketAdapter + ?Sized> SocketAdapter for &'a T

Source§

type SocketId = <T as SocketAdapter>::SocketId

Source§

fn id(&self) -> Self::SocketId

Source§

fn ui(&self) -> SocketUI

Source§

impl<'a, T: SocketAdapter + ?Sized> SocketAdapter for &'a mut T

Source§

type SocketId = <T as SocketAdapter>::SocketId

Source§

fn id(&self) -> Self::SocketId

Source§

fn ui(&self) -> SocketUI

Implementors§