[][src]Enum yy_boss::SerializedData

pub enum SerializedData {
    Value {
        data: String,
    },
    Filepath {
        data: PathBuf,
    },
    DefaultValue,
}

The data which is passed in as part of a Command. Each tag represents a different way to pass data into the given Resource.

NB: the type of data which is passed in is determined by the containing Command.

Variants

Value

The data itself, represented in some valid utf8 format. Scripts, yyfiles, and most resources will likely be passed in with this tag.

Errors

It is an error to try to pass in any binary data which cannot be represented in utf8 format. To pass in images and other similar files, prefer using Filepath.

Fields of Value

data: String
Filepath

A path to the data iself, from some relevant directory. Symbolic links will not be followed.

Anything, including gml and yy files, can be passed in with this tag, though its use is primarily for binary files, such as images and sound files.

Fields of Filepath

data: PathBuf
DefaultValue

A default for the type of data provided, which the YypBoss will generate for users.

For example, to create a new Script, a user would want the Script's AssociatedData, which is the gml file, to be blank. This will generate such an empty string. In a more complex example, if a user is making a new Object, and is fine with default settings, included an autogenerated name, this tag will do that. Since all data can be edited afterwards, this can provide a convenient way to generate new objects.

Trait Implementations

impl Clone for SerializedData[src]

impl Debug for SerializedData[src]

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

impl Eq for SerializedData[src]

impl PartialEq<SerializedData> for SerializedData[src]

impl Serialize for SerializedData[src]

impl StructuralEq for SerializedData[src]

impl StructuralPartialEq for SerializedData[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: for<'de> 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,