Struct gns3::GNS3Server [−][src]
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]
&mut self,
project_id: impl AsRef<str>
) -> Result<GNS3Project, Error>
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]
&mut self,
project_name: impl AsRef<str>
) -> Result<GNS3Project, Error>
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]
&self,
name: impl AsRef<str>,
template_id: impl AsRef<str>
) -> Result<GNS3Node, Error>
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]
&self,
node_id: impl AsRef<str>,
name: Option<String>,
port: Option<u32>
) -> Result<GNS3Node, Error>
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
pub fn create_link(
&self,
node_a: &GNS3Node,
iface_a: usize,
node_b: &GNS3Node,
iface_b: usize
) -> Result<GNS3Link, Error>[src]
&self,
node_a: &GNS3Node,
iface_a: usize,
node_b: &GNS3Node,
iface_b: usize
) -> Result<GNS3Link, Error>
Create a new link. The interface is used as an index into the interfaces of the corresponding node.
pub fn get_links(&self) -> Result<Vec<GNS3Link>, Error>[src]
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]
&self,
link: impl AsRef<str>
) -> Result<GNS3Link, Error>
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]
&mut self,
project_id: impl AsRef<str>
) -> Result<(), Error>
Delete an existing project
Trait Implementations
impl Clone for GNS3Server[src]
fn clone(&self) -> GNS3Server[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for GNS3Server[src]
impl PartialEq<GNS3Server> for GNS3Server[src]
fn eq(&self, other: &GNS3Server) -> bool[src]
fn ne(&self, other: &GNS3Server) -> bool[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> WithSubscriber for T[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>, [src]
S: Into<Dispatch>,