Skip to main content

Edge

Struct Edge 

Source
pub struct Edge { /* private fields */ }
Expand description

Fluent builder for a single edge declaration.

Implementations§

Source§

impl Edge

Source

pub fn new(idx: usize) -> Self

Start an edge builder for edge index idx.

The index is the stable edge identifier used in descriptors. It must be unique among real (non-ingress) edges.

Source

pub fn ty<T: 'static>(self) -> Self

Set the edge queue type using a real Rust type T.

Source

pub fn payload<T: 'static>(self) -> Self

Set the edge payload type using a Rust type T.

Source

pub fn manager_ty<M: 'static>(self) -> Self

Set the memory manager type for this edge using a real Rust type M.

Every edge must specify a manager type. For no_std graphs, use StaticMemoryManager<P, DEPTH> where DEPTH matches the queue’s max_items. For std concurrent graphs, use ConcurrentMemoryManager<P>.

Source

pub fn from(self, node: usize, port: usize) -> Self

Set the upstream (node_index, port_index) for this edge.

Source

pub fn to(self, node: usize, port: usize) -> Self

Set the downstream (node_index, port_index) for this edge.

Source

pub fn policy(self, p: EdgePolicy) -> Self

Supply a concrete EdgePolicy value (converted internally).

Source

pub fn name(self, s: Option<&'static str>) -> Self

Set the optional edge name using a Rust &'static str (or None).

Auto Trait Implementations§

§

impl Freeze for Edge

§

impl RefUnwindSafe for Edge

§

impl !Send for Edge

§

impl !Sync for Edge

§

impl Unpin for Edge

§

impl UnsafeUnpin for Edge

§

impl UnwindSafe for Edge

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> 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, 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.