Enum yy_boss::SerializedData[][src]

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

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.