Struct flowcore::model::io::IO

source ·
pub struct IO { /* private fields */ }
Expand description

IO contains information about the Input or Output of a Function or Flow

Implementations§

source§

impl IO

source

pub fn new<R: Into<Route>>(datatypes: Vec<DataType>, route: R) -> Self

Create a new IO with a specific datatype and at a specific Route

source

pub fn new_named<R: Into<Route>, N: Into<Name>>( datatypes: Vec<DataType>, route: R, name: N ) -> Self

Create a new IO with a specific datatype and at a specific Route and a Name

source

pub fn flow_io(&self) -> bool

Is this IO an input or an output of a Flow?

source

pub fn function_io(&self) -> bool

Is this IO an input or an output of a Function?

source

pub fn io_type(&self) -> &IOType

Return a reference to the IOType of this IO

source

pub fn set_io_type(&mut self, io_type: IOType)

Set the IO type

source

pub fn datatypes(&self) -> &Vec<DataType>

Return a reference to the data type this IO generates or accepts

source

pub fn set_route(&mut self, route: &Route, io_type: &IOType)

Set the route where this IO resides in the flow hierarchy

source

pub fn set_datatypes(&mut self, datatypes: &[DataType])

Set the datatypes of this IO

source

pub fn get_initializer(&self) -> &Option<InputInitializer>

Get a reference to the input initializer of this IO

source

pub fn get_flow_initializer(&self) -> &Option<InputInitializer>

Get a reference to the flow propagated input initializer of this IO

source

pub fn set_initializer( &mut self, function_initializer: Option<InputInitializer> ) -> Result<()>

Set the input initializer of this IO

source

pub fn set_flow_initializer( &mut self, flow_initializer: Option<InputInitializer> ) -> Result<()>

Set the flow input initializer of this IO

Trait Implementations§

source§

impl Clone for IO

source§

fn clone(&self) -> IO

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 IO

source§

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

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

impl Default for IO

source§

fn default() -> IO

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

impl<'de> Deserialize<'de> for IO

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 Display for IO

source§

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

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

impl From<&IO> for Input

source§

fn from(io: &IO) -> Self

Converts to this type from the input type.
source§

impl HasDataTypes for IO

source§

fn datatypes(&self) -> &Vec<DataType>

Return a reference to the datatype of the object implementing this trait
source§

impl HasName for IO

source§

fn name(&self) -> &Name

Return a reference to the name of the struct implementing this trait
source§

fn alias(&self) -> &Name

Return a reference to the alias (also a Name type) of the struct implementing this trait
source§

impl HasRoute for IO

source§

fn route(&self) -> &Route

Return a reference to the Route of the struct that implements this trait
source§

fn route_mut(&mut self) -> &mut Route

Return a mutable reference to the Route of the struct that implements this trait
source§

impl Serialize for IO

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
source§

impl Validate for IO

source§

fn validate(&self) -> Result<()>

Validate that a deserialized model data structure is valid for use

Auto Trait Implementations§

§

impl RefUnwindSafe for IO

§

impl Send for IO

§

impl Sync for IO

§

impl Unpin for IO

§

impl UnwindSafe for IO

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere T: Clone,

§

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> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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 Twhere T: for<'de> Deserialize<'de>,