#[repr(transparent)]
pub struct MaybeNonFixedSize<T: Cast + ?Sized> { /* private fields */ }
Expand description

Type with same representation as GVariant “mX” type where X is any non-fixed size type

This is the type returned by:

gv!("ms").cast(data);
gv!("mmi").cast(data);
gv!("m(ias)").cast(data);

Rust’s built in Option doesn’t have any specified byte representation so we need our own type here.

Maybes are encoded differently depending on if their element type is fixed-sized or not. MaybeFixedSize is used when the contained size is fixed, but it implements the same interface as this type.

Implementations

Convert to a rust native Option type.

Note: this doesn’t copy the data, it returns an option to a reference to the underlying data.

Trait Implementations

Get a static reference to the default value for this type. Read more

Cast slice to type Self. Read more

Formats the value using the given formatter. Read more

Converts to this type from the input type.

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

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

This method tests for !=.

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

This method tests for !=.

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

This method tests for !=.

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)

Uses borrowed data to replace owned data, usually by cloning. 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