[][src]Enum tydi::logical::Direction

pub enum Direction {
    Forward,
    Reverse,
}

Direction of a stream.

Reference

Variants

Forward

Forward indicates that the child stream flows in the same direction as its parent, complementing the data of its parent in some way.

Reverse

Reverse indicates that the child stream acts as a response channel for the parent stream. If there is no parent stream, Forward indicates that the stream flows in the natural source to sink direction of the logical stream, while Reverse indicates a control channel in the opposite direction. The latter may occur for instance when doing random read access to a memory; the first stream carrying the read commands then flows in the sink to source direction.

Trait Implementations

impl Clone for Direction[src]

impl Copy for Direction[src]

impl Debug for Direction[src]

impl Default for Direction[src]

impl Eq for Direction[src]

impl FromStr for Direction[src]

type Err = Error

The associated error which can be returned from parsing.

impl PartialEq<Direction> for Direction[src]

impl Reverse for Direction[src]

fn reverse(&mut self)[src]

Reverse this direction.

Examples

use tydi::{Reverse, Reversed, logical::Direction};

let mut forward = Direction::Forward;
let mut reverse = Direction::Reverse;

forward.reverse();
assert_eq!(forward, reverse);

forward.reverse();
assert_eq!(forward, reverse.reversed());

impl StructuralEq for Direction[src]

impl StructuralPartialEq for Direction[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.