pub struct GpuLayout { /* private fields */ }Expand description
GPU-accelerated force-directed graph layout.
Implementations§
Source§impl GpuLayout
impl GpuLayout
Sourcepub async fn new(config: LayoutConfig) -> Result<Self>
pub async fn new(config: LayoutConfig) -> Result<Self>
Create a new GPU layout engine.
Sourcepub fn init(&mut self, positions: Vec<Position>, edges: Vec<Edge>) -> Result<()>
pub fn init(&mut self, positions: Vec<Position>, edges: Vec<Edge>) -> Result<()>
Initialize the layout with graph data.
Sourcepub fn state(&self) -> LayoutState
pub fn state(&self) -> LayoutState
Get current state.
Sourcepub fn step(&mut self) -> Result<&[Position]>
pub fn step(&mut self) -> Result<&[Position]>
Run one iteration of the layout algorithm (native - blocking). Returns the updated positions.
Sourcepub fn set_config(&mut self, config: LayoutConfig)
pub fn set_config(&mut self, config: LayoutConfig)
Update configuration.
Auto Trait Implementations§
impl Freeze for GpuLayout
impl !RefUnwindSafe for GpuLayout
impl Send for GpuLayout
impl Sync for GpuLayout
impl Unpin for GpuLayout
impl UnsafeUnpin for GpuLayout
impl !UnwindSafe for GpuLayout
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more