[][src]Struct filmreel::cut::Register

pub struct Register { /* fields omitted */ }

Holds Cut Variables and their corresonding values stored in a series of key/value pairs.

Cut Register

Methods

impl Register[src]

pub fn new(json_string: &str) -> Result<Register, FrError>[src]

Creates a new Register object running post deserialization validations

pub fn to_string_pretty(&self) -> String[src]

Pretty json formatting for Frame serialization

pub fn get_key_value(&self, key: &str) -> Option<(&String, &String)>[src]

Gets a reference to the string slice value for the given var name.

Cut Variable

pub fn get(&self, key: &str) -> Option<&String>[src]

Gets a reference to the string slice value for the given var name.

Cut Variable

pub fn iter(&self) -> Iter<String, String>[src]

An iterator visiting all Cut Variables in arbitrary order.

pub fn contains_key(&self, key: &str) -> bool[src]

Returns a boolean indicating whether Register.vars contains a given key.

Cut Variable

pub fn read_match(&self, json_string: &str) -> Result<Vec<Match>, FrError>[src]

Returns a vector of Match enums enums found in the string provided for use in cut operations.

Read Operation

pub fn read_operation(
    &self,
    mat: Match,
    json_string: &mut String
) -> Result<(), FrError>
[src]

Replaces a byte range in a given string with the range given in the ::Match provided.

Read Operation

pub fn write_match(
    var_name: &str,
    frame_str: &str,
    payload_str: &String
) -> Result<Option<String>, FrError>
[src]

Takes a response payload value writes to the Cut Register

pub fn write_operation(
    &mut self,
    key: &str,
    val: String
) -> Result<Option<String>, FrError>
[src]

Trait Implementations

impl Clone for Register[src]

impl Debug for Register[src]

impl Default for Register[src]

impl<'de> Deserialize<'de> for Register[src]

impl PartialEq<Register> for Register[src]

impl Serialize for Register[src]

impl StructuralPartialEq for Register[src]

Auto Trait Implementations

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> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

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