<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="API documentation for the Rust `UART` struct in crate `os`."><title>UART in os::drivers::chardev - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><linkrel="stylesheet"href="../../../static.files/normalize-76eba96aa4d2e634.css"><linkrel="stylesheet"href="../../../static.files/rustdoc-fa3bb1812debf86c.css"><metaname="rustdoc-vars"data-root-path="../../../"data-static-root-path="../../../static.files/"data-current-crate="os"data-themes=""data-resource-suffix=""data-rustdoc-version="1.75.0-nightly (bf9a1c8a1 2023-10-08)"data-channel="nightly"data-search-js="search-5f5ec5419eadd0c9.js"data-settings-js="settings-74424d7eec62a23e.js"><scriptsrc="../../../static.files/storage-fec3eaa3851e447d.js"></script><scriptdefersrc="sidebar-items.js"></script><scriptdefersrc="../../../static.files/main-c5bd66d33317d69f.js"></script><noscript><linkrel="stylesheet"href="../../../static.files/noscript-5d8b3c7633ad77ba.css"></noscript><linkrel="alternate icon"type="image/png"href="../../../static.files/favicon-16x16-8b506e7a72182f1c.png"><linkrel="alternate icon"type="image/png"href="../../../static.files/favicon-32x32-422f7d1d52889060.png"><linkrel="icon"type="image/svg+xml"href="../../../static.files/favicon-2c020d218678b618.svg"></head><bodyclass="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="mobile-topbar"><buttonclass="sidebar-menu-toggle">☰</button><aclass="logo-container"href="../../../os/index.html"><imgclass="rust-logo"src="../../../static.files/rust-logo-151179464ae7ed46.svg"alt="logo"></a></nav><navclass="sidebar"><aclass="logo-container"href="../../../os/index.html"><imgclass="rust-logo"src="../../../static.files/rust-logo-151179464ae7ed46.svg"alt="logo"></a><h2class="location"><ahref="#">UART</a></h2><divclass="sidebar-elems"><section><h3><ahref="#fields">Fields</a></h3><ulclass="block"><li><ahref="#structfield.__private_field">__private_field</a></li></ul><h3><ahref="#trait-implementations">Trait Implementations</a></h3><ulclass="block"><li><ahref="#impl-Deref-for-UART">Deref</a></li><li><ahref="#impl-LazyStatic-for-UART">LazyStatic</a></li></ul><h3><ahref="#synthetic-implementations">Auto Trait Implementations</a></h3><ulclass="block"><li><ahref="#impl-RefUnwindSafe-for-UART">RefUnwindSafe</a></li><li><ahref="#impl-Send-for-UART">Send</a></li><li><ahref="#impl-Sync-for-UART">Sync</a></li><li><ahref="#impl-Unpin-for-UART">Unpin</a></li><li><ahref="#impl-UnwindSafe-for-UART">UnwindSafe</a></li></ul><h3><ahref="#blanket-implementations">Blanket Implementations</a></h3><ulclass="block"><li><ahref="#impl-Any-for-UART">Any</a></li><li><ahref="#impl-Az-for-UART">Az</a></li><li><ahref="#impl-Borrow%3CT%3E-for-UART">Borrow<T></a></li><li><ahref="#impl-BorrowMut%3CT%3E-for-UART">BorrowMut<T></a></li><li><ahref="#impl-CastFrom%3CSrc%3E-for-UART">CastFrom<Src></a></li><li><ahref="#impl-CheckedAs-for-UART">CheckedAs</a></li><li><ahref="#impl-CheckedCastFrom%3CSrc%3E-for-UART">Check
<code><ahref="https://doc.rust-lang.org/nightly/core/convert/trait.From.html"title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
T: <aclass="trait"href="https://docs.rs/az/~1.2/az/trait.SaturatingCast.html"title="trait az::SaturatingCast">SaturatingCast</a><Dst>,</span></h4></section></summary><divclass='docblock'>Casts the value.</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-SaturatingCastFrom%3CSrc%3E-for-UART"class="impl"><aclass="src rightside"href="https://docs.rs/az/~1.2/src/az/lib.rs.html#402">source</a><ahref="#impl-SaturatingCastFrom%3CSrc%3E-for-UART"class="anchor">§</a><h3class="code-header">impl<Src, Dst><aclass="trait"href="https://docs.rs/az/~1.2/az/trait.SaturatingCastFrom.html"title="trait az::SaturatingCastFrom">SaturatingCastFrom</a><Src> for Dst<spanclass="where fmt-newline">where
Src: <aclass="trait"href="https://docs.rs/az/~1.2/az/trait.SaturatingCast.html"title="trait az::SaturatingCast">SaturatingCast</a><Dst>,</span></h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.saturating_cast_from"class="method trait-impl"><aclass="src rightside"href="https://docs.rs/az/~1.2/src/az/lib.rs.html#405">source</a><ahref="#method.saturating_cast_from"class="anchor">§</a><h4class="code-header">fn <ahref="https://docs.rs/az/~1.2/az/trait.SaturatingCastFrom.html#tymethod.saturating_cast_from"class="fn">saturating_cast_from</a>(src: Src) -> Dst</h4></section></summary><divclass='docblock'>Casts the value.</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryFrom%3CU%3E-for-UART"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#804">source</a><ahref="#impl-TryFrom%3CU%3E-for-UART"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U> for T<spanclass="where fmt-newline">where
U: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><T>,</span></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error-1"class="associatedtype trait-impl"><ahref="#associatedtype.Error-1"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error"class="associatedtype">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html"title="enum core::convert::Infallible">Infallible</a></h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_from"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#811">source</a><ahref="#method.try_from"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from"class="fn">try_from</a>(value: U) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><T, <T as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="associatedtype"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-TryInto%3CU%3E-for-UART"class="impl"><aclass="src rightside"href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#789">source</a><ahref="#impl-TryInto%3CU%3E-for-UART"class="anchor">§</a><h3class="code-header">impl<T, U><aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html"title="trait core::convert::TryInto">TryInto</a><U> for T<spanclass="where fmt-newline">where
U: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>,</span></h3></section></summary><divclass="impl-items"><detailsclass="toggle"open><summary><sectionid="associatedtype.Error"class="associatedtype trait-impl"><ahref="#associatedtype.Error"class="anchor">§</a><h4class="code-header">type <ahref="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error"class="associatedtype">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><divclass='docblock'>The type returned in the event of a conversion error.</div></details><detailsclass="toggle method-toggle"open><summary><sectionid="method.try_into"class="method trait-impl"><aclass="src rightside"href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#796">source</a><ahref="#method.try_into"class="anchor">§</a><h4class="code-header">fn <ahref="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into"class="fn">try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><U, <U as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="associatedtype"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><divclass='docblock'>Performs the conversion.</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-UnwrappedAs-for-UART"class="impl"><aclass="src rightside"href="https://docs.rs/az/~1.2/src/az/lib.rs.html#977">source</a><ahref="#impl-UnwrappedAs-for-UART"class="anchor">§</a><h3class="code-header">impl<T><aclass="trait"href="https://docs.rs/az/~1.2/az/trait.UnwrappedAs.html"title="trait az::UnwrappedAs">UnwrappedAs</a> for T</h3></section></summary><divclass="impl-items"><detailsclass="toggle method-toggle"open><summary><sectionid="method.unwrapped_as"class="method trait-impl"><aclass="src rightside"href="https://docs.rs/az/~1.2/src/az/lib.rs.html#979-981">source</a><ahref="#method.unwrapped_as"class="anchor">§</a><h4class="code-header">fn <ahref="https://docs.rs/az/~1.2/az/trait.UnwrappedAs.html#tymethod.unwrapped_as"class="fn">unwrapped_as</a><Dst>(self) -> Dst<spanclass="where fmt-newline">where
T: <aclass="trait"href="https://docs.rs/az/~1.2/az/trait.UnwrappedCast.html"title="trait az::UnwrappedCast">UnwrappedCast</a><Dst>,</span></h4></section></summary><divclass='docblock'>Casts the value.</div></details></div></details><detailsclass="toggle implementors-toggle"><summary><sectionid="impl-UnwrappedCastFrom%3CSrc%3E-for-UART"class="impl"><aclass="src rightside"href="https://docs.rs/az/~1.2/src/az/lib.rs.html#526">source</a><ahref="#impl-UnwrappedCastFrom%3CSrc%3E-for-UART"class="anchor">§</a><h3class="code-header">impl<Src, Dst><aclass="trait"href="https://docs.rs/az/~1.2/az/trait.UnwrappedCastFrom.html"title="trait az::UnwrappedCastFrom">UnwrappedCastFrom</a><Src> for Dst<spanclass="where fmt-newline">where