Struct mun_hir::fixture::Fixture

source ·
pub struct Fixture {
    pub relative_path: RelativePathBuf,
    pub text: String,
}
Expand description

A Fixture describes an single file in a project workspace. Fixtures can be parsed from a single string with the parse function. Using that function enables users to conveniently describe an entire workspace in a single string.

Fields§

§relative_path: RelativePathBuf

The relative path of this file

§text: String

The text of the file

Implementations§

Parses text which looks like this:

//- /foo.mun
fn hello_world() {
}

//- /bar.mun
fn baz() {
}

into two separate Fixtures one with relative_path ‘foo.mun’ and one with ‘bar.mun’.

Trait Implementations§

Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. 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
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.