More than one file in module
<p>I work on an implementation of the Repository pattern in Rust.</p>

<p>I need to have two (or more) files:</p>

<ul>
<li><code>entity.rs</code> — data descriptions</li>
<li><code>repository.rs</code> — data access methods</li>
<li>...</li>
</ul>

<p>Problem:</p>

<p>One file implies one mod. This means that for a function in <code>repository.rs</code> to have access to struct field from <code>entity.rs</code> it is required that <code>field</code> be <code>pub</code>. Is there some way to avoid this?</p>