n class="ident">TimedOut</span>,
}

<span class="kw">fn</span> <span class="ident">read_with_timeout</span><span class="op">&lt;</span><span class="ident">S</span>, <span class="ident">T</span><span class="op">&gt;</span>(
    <span class="ident">serial</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">S</span>,
    <span class="ident">timer</span>: <span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">T</span>,
    <span class="ident">timeou