Struct ssbh_lib::SsbhString[][src]

pub struct SsbhString(_);
Expand description

A 4-byte aligned CString with position determined by a relative offset.

Implementations

Creates the string by reading from bytes until the first null byte.

Converts the underlying buffer to a str. The result will be None if the offset is null or the conversion failed.

Converts the underlying buffer to a String. Empty or null values are converted to empty strings.

Trait Implementations

The type of arguments needed to be supplied in order to read this type, usually a tuple. Read more

Read the type from the reader

Read the type from the reader while assuming no arguments have been passed Read more

Read the type from the reader using the specified arguments

The default arguments to be used when using the read shortcut method. Override this for any type that optionally requries arguments Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Performs the conversion.

Performs the conversion.

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

Serialize this value into the given Serde serializer. Read more

Writes the byte representation of self to writer and update data_ptr as needed to ensure the next relative offset is correctly calculated.

The offset in bytes between successive elements in an array of this type. This should include any alignment or padding. For most types, this is simply the value of std::mem::size_of. Read more

The alignment of the relative_offset for types stored in a RelPtr64.

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 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.