pub enum MaybeOwned<'a, T> {
    Owned(T),
    Borrowed(&'a T),
}
Expand description

Helper type to allow passing something that may potentially be owned, but could also be borrowed

Variants

Owned(T)

Borrowed(&'a T)

Implementations

Allows the borrowing of an owned value or passes out the borrowed value

Trait Implementations

Formats the value using the given formatter. 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.

Converts a value into a Spanned value

Converts a value into a Spanned value, using an unknown Span

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.