Struct gns3::GNS3Server[][src]

pub struct GNS3Server { /* fields omitted */ }

GNS3 Server Handle

Implementations

impl GNS3Server[src]

pub fn new(address: impl AsRef<str>, port: u32) -> Result<Self, Error>[src]

Create a new instance of a server handler

pub fn version(&self) -> &str[src]

Get the version

pub fn get_projects(&self) -> Result<Vec<GNS3Project>, Error>[src]

Returns all project informations

pub fn open_project(
    &mut self,
    project_id: impl AsRef<str>
) -> Result<GNS3Project, Error>
[src]

Opens a project, and returns the new information

pub fn close_project(&mut self) -> Result<GNS3Project, Error>[src]

Opens a project, and returns the new information

pub fn create_project(
    &mut self,
    project_name: impl AsRef<str>
) -> Result<GNS3Project, Error>
[src]

Create a new project with the given name, and open it

pub fn get_templates(&self) -> Result<Vec<GNS3Template>, Error>[src]

Returns all available templates

pub fn create_node(
    &self,
    name: impl AsRef<str>,
    template_id: impl AsRef<str>
) -> Result<GNS3Node, Error>
[src]

Create a new node from a template

pub fn create_vpcs(&self, name: impl AsRef<str>) -> Result<GNS3Node, Error>[src]

Create a new VPCS on the local compute

pub fn modify_node(
    &self,
    node_id: impl AsRef<str>,
    name: Option<String>,
    port: Option<u32>
) -> Result<GNS3Node, Error>
[src]

Modify the name or the port ID of a node

pub fn get_nodes(&self) -> Result<Vec<GNS3Node>, Error>[src]

Return all nodes in the project

Create a new link. The interface is used as an index into the interfaces of the corresponding node.

Return all links in the project

pub fn start_capture(&self, link: impl AsRef<str>) -> Result<GNS3Link, Error>[src]

Start the capture on a specific link

pub fn stop_capture(&self, link: impl AsRef<str>) -> Result<GNS3Link, Error>[src]

Stop the capture on a specific link

pub fn clear_capture_file(
    &self,
    link: impl AsRef<str>
) -> Result<GNS3Link, Error>
[src]

Stop the capture on a specific link

pub fn start_all_nodes(&self) -> Result<(), Error>[src]

Start all nodes in the project

pub fn stop_all_nodes(&self) -> Result<(), Error>[src]

Stop all nodes in the project

pub fn start_node(&self, node_id: impl AsRef<str>) -> Result<GNS3Node, Error>[src]

Start a specific node

pub fn stop_node(&self, node_id: impl AsRef<str>) -> Result<GNS3Node, Error>[src]

Stop a specific node

pub fn delete_project(
    &mut self,
    project_id: impl AsRef<str>
) -> Result<(), Error>
[src]

Delete an existing project

Trait Implementations

impl Clone for GNS3Server[src]

impl Debug for GNS3Server[src]

impl PartialEq<GNS3Server> for GNS3Server[src]

impl StructuralPartialEq for GNS3Server[src]

Auto Trait Implementations

impl RefUnwindSafe for GNS3Server[src]

impl Send for GNS3Server[src]

impl Sync for GNS3Server[src]

impl Unpin for GNS3Server[src]

impl UnwindSafe for GNS3Server[src]

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<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument 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.

impl<T> WithSubscriber for T[src]