Struct ferritin_molviewspec::molviewspec::nodes::Node

source ·
pub struct Node {
    pub kind: KindT,
    pub params: Option<NodeParams>,
    pub children: Option<Vec<Node>>,
}
Expand description

Node

This is the core datastructure for generating MSVJ files. Each node type can have a type, params, and children.

Methods derived from the Python API found here

Fields§

§kind: KindT§params: Option<NodeParams>§children: Option<Vec<Node>>

Implementations§

source§

impl Node

source

pub fn new(kind: KindT, params: Option<NodeParams>) -> Node

source

pub fn add_child(&mut self, node: Node)

source

pub fn get_kind(&self) -> &KindT

source

pub fn download(&mut self, url: &str) -> Option<&mut Node>

Create the download node

source

pub fn parse(&mut self, params: ParseParams) -> Option<&mut Node>

Parse a Download Node

source

pub fn model_structure()

Create a structure for the deposited coordinates. :param model_index: 0-based model index in case multiple NMR frames are present :param block_index: 0-based block index in case multiple mmCIF or SDF data blocks are present :param block_header: Reference a specific mmCIF or SDF data block by its block header :return: a builder that handles operations at structure level

source

pub fn assembly_structure( &mut self, params: StructureParams, ) -> Option<&mut Node>

Parse a Download Node

source

pub fn symmetry_structure( &mut self, params: StructureParams, ) -> Option<&mut Node>

Symmetry Structure

source

pub fn symmetry_mates_structure( &mut self, params: StructureParams, ) -> Option<&mut Node>

Parse a Download Node

source

pub fn component(&mut self, selector: ComponentSelector) -> Option<&mut Node>

Create a Component

source

pub fn component_from_uri()

source

pub fn component_from_source()

source

pub fn label_from_uri()

source

pub fn label_from_source()

source

pub fn tooltip_from_uri()

source

pub fn tooltip_from_source()

source

pub fn transform(&mut self, params: TransformParams) -> Option<&mut Node>

source

pub fn _is_rotation_matrix()

source

pub fn representation( &mut self, representation_type: RepresentationTypeT, ) -> Option<&mut Node>

Add a representation for this component. :param type: the type of representation, defaults to ‘cartoon’ :return: a builder that handles operations at representation level

source

pub fn label(&mut self, label: String) -> Option<&mut Node>

source

pub fn tooltip()

source

pub fn focus()

source

pub fn color_from_source()

source

pub fn color_from_uri()

source

pub fn color( &mut self, color: ColorT, selector: ComponentSelector, ) -> Option<&mut Node>

source

pub fn sphere()

source

pub fn line()

Trait Implementations§

source§

impl Clone for Node

source§

fn clone(&self) -> Node

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Node

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Node

source§

fn default() -> Node

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Node

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Node

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Node

§

impl RefUnwindSafe for Node

§

impl Send for Node

§

impl Sync for Node

§

impl Unpin for Node

§

impl UnwindSafe for Node

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> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T