Skip to main content

LayoutEngine

Struct LayoutEngine 

Source
pub struct LayoutEngine<Vertex, Edge, Context> { /* private fields */ }

Implementations§

Source§

impl<Vertex, Edge, Context> LayoutEngine<Vertex, Edge, Context>
where Context: Default,

Source

pub fn new( graph_loading_fn: GraphLoadingFn<Vertex, Edge, Context>, forces: Vec<Force<Vertex, Edge, Context>>, position_update_fn: PositionUpdateFn<Vertex, Context>, ) -> Self

Trait Implementations§

Source§

impl<Vertex, Edge, Context> LayoutAlgorithm for LayoutEngine<Vertex, Edge, Context>
where Vertex: AsVec2, Context: Default, Edge: AsEdge,

Source§

fn load_graph(&mut self, graph: &Graph)

Source§

fn iterate(&mut self)

Source§

fn get_positions(&self) -> Vec<Vec2>

Source§

fn get_edges(&self) -> Vec<Edge>

Auto Trait Implementations§

§

impl<Vertex, Edge, Context> Freeze for LayoutEngine<Vertex, Edge, Context>
where Context: Freeze,

§

impl<Vertex, Edge, Context> RefUnwindSafe for LayoutEngine<Vertex, Edge, Context>
where Context: RefUnwindSafe, Vertex: RefUnwindSafe, Edge: RefUnwindSafe,

§

impl<Vertex, Edge, Context> Send for LayoutEngine<Vertex, Edge, Context>
where Context: Send, Vertex: Send, Edge: Send,

§

impl<Vertex, Edge, Context> Sync for LayoutEngine<Vertex, Edge, Context>
where Context: Sync, Vertex: Sync, Edge: Sync,

§

impl<Vertex, Edge, Context> Unpin for LayoutEngine<Vertex, Edge, Context>
where Context: Unpin, Vertex: Unpin, Edge: Unpin,

§

impl<Vertex, Edge, Context> UnsafeUnpin for LayoutEngine<Vertex, Edge, Context>
where Context: UnsafeUnpin,

§

impl<Vertex, Edge, Context> UnwindSafe for LayoutEngine<Vertex, Edge, Context>
where Context: UnwindSafe, Vertex: UnwindSafe, Edge: UnwindSafe,

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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.