EdgeInProgress

Struct EdgeInProgress 

Source
pub struct EdgeInProgress {
    pub start: PositionedSocket,
    pub end_pos: Pos2,
    pub end_socket: Option<(SocketKind, Vec2)>,
}

Fields§

§start: PositionedSocket

The socket at the start end of the edge.

§end_pos: Pos2

The end position of the edge in progress.

If there is no socket within the interaction radius, this will be the pointer position. Otherwise, this will be the position of the closest socket who’s SocketKind is opposite to start.kind.

§end_socket: Option<(SocketKind, Vec2)>

The closest socket who’s SocketKind is opposite to start.kind.

This is None in the case that there are no sockets within the interaction radius.

Implementations§

Source§

impl EdgeInProgress

Source

pub fn bezier_cubic(&self) -> Cubic

Source

pub fn show(&self, ui: &Ui)

Short-hand for painting the in-progress edge with some reasonable defaults.

If you require custom styling of the in-progress edge, use EdgeInProgress::bezier_cubic or the individual fields to paint it however you wish.

Auto Trait Implementations§

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.