Union rkyv::string::repr::ArchivedStringRepr[][src]

pub union ArchivedStringRepr {
    // some fields omitted
}
Expand description

An archived string representation that can inline short strings.

Implementations

Returns whether the representation is inline.

Returns the offset of the representation.

Safety

The internal representation must be out-of-line.

Returns a pointer to the bytes of the string.

Returns a mutable pointer to the bytes of the string.

Returns the length of the string.

Returns whether the string is empty.

Returns a pointer to the string as a str.

Returns a slice of the bytes of the string.

Returns a mutable slice of the bytes of the string.

Returns a reference to the string as a str.

Returns a mutable reference to the string as a str.

Emplaces a new inline representation for the given str.

Safety

  • The length of str must be less than or equal to INLINE_CAPACITY.
  • out must point to a valid location to write the inline representation.

Rmplaces a new out-of-line representation for the given str.

Safety

  • The length of str must be greater than INLINE_CAPACITY.
  • pos must be the location of the representation within the archive.
  • target must be the location of the serialized bytes of the string.
  • out must point to a valid location to write the out-of-line representation.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

The archived version of the pointer metadata for this type.

Converts some archived metadata to the pointer metadata for itself.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Deserializes using the given deserializer

Performs the conversion.

Performs the conversion.

Gets the layout of the type.

The type for metadata in pointers and references to Self.

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.