<!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 `Cookie` struct in crate `actix_web`."><metaname="keywords"content="rust, rustlang, rust-lang, Cookie"><title>actix_web::http::Cookie - Rust</title><linkrel="stylesheet"type="text/css"href="../../normalize.css"><linkrel="stylesheet"type="text/css"href="../../rustdoc.css"id="mainThemeStyle"><linkrel="stylesheet"type="text/css"href="../../dark.css"><linkrel="stylesheet"type="text/css"href="../../light.css"id="themeStyle"><scriptsrc="../../storage.js"></script></head><bodyclass="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="sidebar"><divclass="sidebar-menu">☰</div><pclass='location'>Struct Cookie</p><divclass="sidebar-elems"><divclass="block items"><aclass="sidebar-title"href="#methods">Methods</a><divclass="sidebar-links"><ahref="#method.new">new</a><ahref="#method.named">named</a><ahref="#method.build">build</a><ahref="#method.parse">parse</a><ahref="#method.parse_encoded">parse_encoded</a><ahref="#method.encoded">encoded</a><ahref="#method.into_owned">into_owned</a><ahref="#method.name">name</a><ahref="#method.value">value</a><ahref="#method.name_value">name_value</a><ahref="#method.http_only">http_only</a><ahref="#method.secure">secure</a><ahref="#method.same_site">same_site</a><ahref="#method.max_age">max_age</a><ahref="#method.path">path</a><ahref="#method.domain">domain</a><ahref="#method.expires">expires</a><ahref="#method.set_name">set_name</a><ahref="#method.set_value">set_value</a><ahref="#method.set_http_only">set_http_only</a><ahref="#method.set_secure">set_secure</a><ahref="#method.set_same_site">set_same_site</a><ahref="#method.set_max_age">set_max_age</a><ahref="#method.set_path">set_path</a><ahref="#method.set_domain">set_domain</a><ahref="#method.set_expires">set_expires</a><ahref="#method.make_permanent">make_permanent</a><ahref="#method.name_raw">name_raw</a><ahref="#method.value_raw">value_raw</a><ahref="#method.path_raw">path_raw</a><ahref="#method.domain_raw">domain_raw</a></div><aclass="sidebar-title"href="#implementations">Trait Implementations</a><divclass="sidebar-links"><ahref="#impl-Display">Display</a><ahref="#impl-PartialEq%3CCookie%3C%27b%3E%3E">PartialEq<Cookie<'b>></a><ahref="#impl-Clone">Clone</a><ahref="#impl-FromStr">FromStr</a><ahref="#impl-Debug">Debug</a></div><aclass="sidebar-title"href="#synthetic-implementations">Auto Trait Implementations</a><divclass="sidebar-links"><ahref="#impl-Send">Send</a><ahref="#impl-Sync">Sync</a></div></div><pclass='location'><ahref='../index.html'>actix_web</a>::<wbr><ahref='index.html'>http</a></p><script>window.sidebarCurrent={name:'Cookie',ty:'struct',relpath:''};</script><scriptdefersrc="sidebar-items.js"></script></div></nav><divclass="theme-picker"><buttonid="theme-picker"aria-label="Pick another theme!"><imgsrc="../../brush.svg"width="18"alt="Pick another theme!"></button><divid="theme-choices"></div></div><scriptsrc="../../theme.js"></script><navclass="sub"><formclass="search-form js-only"><divclass="search-container"><inputclass="search-input"name="search"autocomplete="off"placeholder="Click or press ‘S’ to search, ‘?’ for more options…"type="search"><aid="settings-menu"href="../../settings.html"><imgsrc="../../wheel.svg"width="18"alt="Change settings"></a></div></form></nav><sectionid="main"class="content"><h1class='fqn'><spanclass='in-band'>Struct <ahref='../index.html'>actix_web</a>::<wbr><ahref='index.html'>http</a>::<wbr><aclass="struct"href=''>Cookie</a></span><spanclass='out-of-band'><spanid='render-detail'><aid="toggle-all-docs"href="javascript:void(0)"title="collapse all docs">[<spanclass='inner'>−</span>]</a></span><aclass='srclink'href='
<h3id='impl'class='impl'><spanclass='in-band'><tableclass='table-display'><tbody><tr><td><code>impl <aclass="struct"href="../../actix_web/http/struct.Cookie.html"title="struct actix_web::http::Cookie">Cookie</a><'static></code><ahref='#impl'class='anchor'></a></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#185-248'title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><divclass='impl-items'><h4id='method.new'class="method"><spanid='new.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.new'class='fnname'>new</a><N, V>(name: N, value: V) -><aclass="struct"href="../../actix_web/http/struct.Cookie.html"title="struct actix_web::http::Cookie">Cookie</a><'static><spanclass="where fmt-newline">where<br> N: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="enum"href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html"title="enum alloc::borrow::Cow">Cow</a><'static, <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>>,<br> V: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="enum"href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html"title="enum alloc::borrow::Cow">Cow</a><'static, <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>>, </span></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#196-212'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Creates a new <code>Cookie</code> with the given name and value.</p>
</div><h4id='method.named'class="method"><spanid='named.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.named'class='fnname'>named</a><N>(name: N) -><aclass="struct"href="../../actix_web/http/struct.Cookie.html"title="struct actix_web::http::Cookie">Cookie</a><'static><spanclass="where fmt-newline">where<br> N: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="enum"href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html"title="enum alloc::borrow::Cow">Cow</a><'static, <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>>, </span></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#225-229'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Creates a new <code>Cookie</code> with the given name and an empty value.</p>
</div><h4id='method.build'class="method"><spanid='build.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.build'class='fnname'>build</a><N, V>(name: N, value: V) -><aclass="struct"href="../../actix_web/http/struct.CookieBuilder.html"title="struct actix_web::http::CookieBuilder">CookieBuilder</a><spanclass="where fmt-newline">where<br> N: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="enum"href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html"title="enum alloc::borrow::Cow">Cow</a><'static, <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>>,<br> V: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="enum"href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html"title="enum alloc::borrow::Cow">Cow</a><'static, <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>>, </span></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#242-247'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Creates a new <code>CookieBuilder</code> instance from the given key and value
</div></div><h3id='impl-1'class='impl'><spanclass='in-band'><tableclass='table-display'><tbody><tr><td><code>impl<'c><aclass="struct"href="../../actix_web/http/struct.Cookie.html"title="struct actix_web::http::Cookie">Cookie</a><'c></code><ahref='#impl-1'class='anchor'></a></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#250-906'title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><divclass='impl-items'><h4id='method.parse'class="method"><spanid='parse.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.parse'class='fnname'>parse</a><S>(s: S) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="../../actix_web/http/struct.Cookie.html"title="struct actix_web::http::Cookie">Cookie</a><'c>, <aclass="enum"href="../../actix_web/error/enum.CookieParseError.html"title="enum actix_web::error::CookieParseError">ParseError</a>><spanclass="where fmt-newline">where<br> S: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="enum"href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html"title="enum alloc::borrow::Cow">Cow</a><'c, <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>>, </span></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#263-267'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses a <code>Cookie</code> from the given HTTP cookie header value string. Does
</div><h4id='method.parse_encoded'class="method"><spanid='parse_encoded.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.parse_encoded'class='fnname'>parse_encoded</a><S>(s: S) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="../../actix_web/http/struct.Cookie.html"title="struct actix_web::http::Cookie">Cookie</a><'c>, <aclass="enum"href="../../actix_web/error/enum.CookieParseError.html"title="enum actix_web::error::CookieParseError">ParseError</a>><spanclass="where fmt-newline">where<br> S: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="enum"href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html"title="enum alloc::borrow::Cow">Cow</a><'c, <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>>, </span></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#286-290'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses a <code>Cookie</code> from the given HTTP cookie header value string where
</div><h4id='method.encoded'class="method"><spanid='encoded.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.encoded'class='fnname'>encoded</a>(&'a self) -><aclass="struct"href="https://docs.rs/cookie/0.11/cookie/struct.EncodedCookie.html"title="struct cookie::EncodedCookie">EncodedCookie</a><'a, 'c></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#308-310'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Wraps <code>self</code> in an <code>EncodedCookie</code>: a cost-free wrapper around <code>Cookie</code>
</div><h4id='method.into_owned'class="method"><spanid='into_owned.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.into_owned'class='fnname'>into_owned</a>(self) -><aclass="struct"href="../../actix_web/http/struct.Cookie.html"title="struct actix_web::http::Cookie">Cookie</a><'static></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#324-337'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Converts <code>self</code> into a <code>Cookie</code> with a static lifetime. This method
</div><h4id='method.name'class="method"><spanid='name.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.name'class='fnname'>name</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#350-352'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Returns the name of <code>self</code>.</p>
</div><h4id='method.value'class="method"><spanid='value.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.value'class='fnname'>value</a>(&self) ->&<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#365-367'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Returns the value of <code>self</code>.</p>
</div><h4id='method.name_value'class="method"><spanid='name_value.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.name_value'class='fnname'>name_value</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a>&<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>, &<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#380-382'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Returns the name and value of <code>self</code> as a tuple of <code>(name, value)</code>.</p>
</div><h4id='method.same_site'class="method"><spanid='same_site.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.same_site'class='fnname'>same_site</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="enum"href="https://docs.rs/cookie/0.11/cookie/draft/enum.SameSite.html"title="enum cookie::draft::SameSite">SameSite</a>></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#459-461'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Returns the <code>SameSite</code> attribute of this cookie if one was specified.</p>
</div><h4id='method.max_age'class="method"><spanid='max_age.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.max_age'class='fnname'>max_age</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="https://doc.rust-lang.org/time/time/duration/struct.Duration.html"title="struct time::duration::Duration">Duration</a>></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#477-479'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Returns the specified max-age of the cookie if one was specified.</p>
</div><h4id='method.path'class="method"><spanid='path.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.path'class='fnname'>path</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#498-503'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Returns the <code>Path</code> of the cookie if one was specified.</p>
</div><h4id='method.domain'class="method"><spanid='domain.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.domain'class='fnname'>domain</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#519-524'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Returns the <code>Domain</code> of the cookie if one was specified.</p>
</div><h4id='method.expires'class="method"><spanid='expires.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.expires'class='fnname'>expires</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><<aclass="struct"href="https://doc.rust-lang.org/time/time/struct.Tm.html"title="struct time::Tm">Tm</a>></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#542-544'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Returns the <code>Expires</code> time of the cookie if one was specified.</p>
</div><h4id='method.set_name'class="method"><spanid='set_name.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.set_name'class='fnname'>set_name</a><N>(&mut self, name: N) <spanclass="where fmt-newline">where<br> N: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="enum"href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html"title="enum alloc::borrow::Cow">Cow</a><'static, <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>>, </span></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#559-561'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Sets the name of <code>self</code> to <code>name</code>.</p>
</div><h4id='method.set_value'class="method"><spanid='set_value.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.set_value'class='fnname'>set_value</a><V>(&mut self, value: V) <spanclass="where fmt-newline">where<br> V: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="enum"href="https://doc.rust-lang.org/nightly/alloc/borrow/enum.Cow.html"title="enum alloc::borrow::Cow">Cow</a><'static, <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>>, </span></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#576-578'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Sets the value of <code>self</code> to <code>value</code>.</p>
</div><h4id='method.set_http_only'class="method"><spanid='set_http_only.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.set_http_only'class='fnname'>set_http_only</a>(&mut self, value: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#594-596'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Sets the value of <code>http_only</code> in <code>self</code> to <code>value</code>.</p>
</div><h4id='method.set_secure'class="method"><spanid='set_secure.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.set_secure'class='fnname'>set_secure</a>(&mut self, value: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#612-614'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Sets the value of <code>secure</code> in <code>self</code> to <code>value</code>.</p>
</div><h4id='method.set_same_site'class="method"><spanid='set_same_site.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.set_same_site'class='fnname'>set_same_site</a>(&mut self, value: <aclass="enum"href="https://docs.rs/cookie/0.11/cookie/draft/enum.SameSite.html"title="enum cookie::draft::SameSite">SameSite</a>)</code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#630-632'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Sets the value of <code>same_site</code> in <code>self</code> to <code>value</code>.</p>
</div><h4id='method.set_max_age'class="method"><spanid='set_max_age.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.set_max_age'class='fnname'>set_max_age</a>(&mut self, value: <aclass="struct"href="https://doc.rust-lang.org/time/time/duration/struct.Duration.html"title="struct time::duration::Duration">Duration</a>)</code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#654-656'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Sets the value of <code>max_age</code> in <code>self</code> to <code>value</code>.</p>
</div><h4id='method.set_expires'class="method"><spanid='set_expires.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.set_expires'class='fnname'>set_expires</a>(&mut self, time: <aclass="struct"href="https://doc.rust-lang.org/time/time/struct.Tm.html"title="struct time::Tm">Tm</a>)</code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#714-716'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Sets the expires field of <code>self</code> to <code>time</code>.</p>
</div><h4id='method.make_permanent'class="method"><spanid='make_permanent.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.make_permanent'class='fnname'>make_permanent</a>(&mut self)</code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#740-744'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Makes <code>self</code> a "permanent" cookie by extending its expiration and max
</div><h4id='method.name_raw'class="method"><spanid='name_raw.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.name_raw'class='fnname'>name_raw</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&'c <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#805-808'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Returns the name of <code>self</code> as a string slice of the raw string <code>self</code>
</div><h4id='method.value_raw'class="method"><spanid='value_raw.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.value_raw'class='fnname'>value_raw</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&'c <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#835-838'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Returns the value of <code>self</code> as a string slice of the raw string <code>self</code>
</div><h4id='method.path_raw'class="method"><spanid='path_raw.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.path_raw'class='fnname'>path_raw</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&'c <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#866-871'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Returns the <code>Path</code> of <code>self</code> as a string slice of the raw string <code>self</code>
</div><h4id='method.domain_raw'class="method"><spanid='domain_raw.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>pub fn <ahref='#method.domain_raw'class='fnname'>domain_raw</a>(&self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&'c <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#900-905'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Returns the <code>Domain</code> of <code>self</code> as a string slice of the raw string
</div></div><h3id='impl-PartialEq%3CCookie%3C%27b%3E%3E'class='impl'><spanclass='in-band'><tableclass='table-display'><tbody><tr><td><code>impl<'a, 'b><aclass="trait"href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html"title="trait core::cmp::PartialEq">PartialEq</a><<aclass="struct"href="../../actix_web/http/struct.Cookie.html"title="struct actix_web::http::Cookie">Cookie</a><'b>> for <aclass="struct"href="../../actix_web/http/struct.Cookie.html"title="struct actix_web::http::Cookie">Cookie</a><'a></code><ahref='#impl-PartialEq%3CCookie%3C%27b%3E%3E'class='anchor'></a></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#970-997'title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><divclass='impl-items'><h4id='method.eq'class="method"><spanid='eq.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq'class='fnname'>eq</a>(&self, other: &<aclass="struct"href="../../actix_web/http/struct.Cookie.html"title="struct actix_web::http::Cookie">Cookie</a><'b>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#971-996'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <ahref="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div>fn <ahref='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne'class='fnname'>ne</a>(&self, other: <aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>Rhs) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><divclass='since'title='Stable since Rust version 1.0.0'>1.0.0</div><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#126'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>This method tests for <code>!=</code>.</p>
</div></div><h3id='impl-Clone'class='impl'><spanclass='in-band'><tableclass='table-display'><tbody><tr><td><code>impl<'c><aclass="trait"href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html"title="trait core::clone::Clone">Clone</a> for <aclass="struct"href="../../actix_web/http/struct.Cookie.html"title="struct actix_web::http::Cookie">Cookie</a><'c></code><ahref='#impl-Clone'class='anchor'></a></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#160'title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><divclass='impl-items'><h4id='method.clone'class="method"><spanid='clone.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone'class='fnname'>clone</a>(&self) -><aclass="struct"href="../../actix_web/http/struct.Cookie.html"title="struct actix_web::http::Cookie">Cookie</a><'c></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#160'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Returns a copy of the value. <ahref="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone">Read more</a></p>
</div><h4id='method.from_str'class="method"><spanid='from_str.v'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#tymethod.from_str'class='fnname'>from_str</a>(s: &<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="struct"href="../../actix_web/http/struct.Cookie.html"title="struct actix_web::http::Cookie">Cookie</a><'static>, <aclass="enum"href="../../actix_web/error/enum.CookieParseError.html"title="enum actix_web::error::CookieParseError">ParseError</a>></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#965-967'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Parses a string <code>s</code> to return a value of this type. <ahref="https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#tymethod.from_str">Read more</a></p>
</div></div><h3id='impl-Debug'class='impl'><spanclass='in-band'><tableclass='table-display'><tbody><tr><td><code>impl<'c><aclass="trait"href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html"title="trait core::fmt::Debug">Debug</a> for <aclass="struct"href="../../actix_web/http/struct.Cookie.html"title="struct actix_web::http::Cookie">Cookie</a><'c></code><ahref='#impl-Debug'class='anchor'></a></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#160'title='goto source code'>[src]</a></span></td></tr></tbody></table></h3><divclass='impl-items'><h4id='method.fmt-1'class="method"><spanid='fmt.v-1'class='invisible'><tableclass='table-display'><tbody><tr><td><code>fn <ahref='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt'class='fnname'>fmt</a>(&self, f: &mut <aclass="struct"href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html"title="struct core::fmt::Formatter">Formatter</a>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><<aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <aclass="struct"href="https://doc.rust-lang.org/nightly/core/fmt/struct.Error.html"title="struct core::fmt::Error">Error</a>></code></span></td><td><spanclass='out-of-band'><divclass='ghost'></div><aclass='srclink'href='https://docs.rs/cookie/0.11/src/cookie/lib.rs.html#160'title='goto source code'>[src]</a></td></tr></tbody></table></span></h4><divclass='docblock'><p>Formats the value using the given formatter. <ahref="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
Auto Trait Implementations<ahref='#synthetic-implementations'class='anchor'></a>
</h2>
<divid='synthetic-implementations-list'>
<h3id='impl-Send'class='impl'><spanclass='in-band'><tableclass='table-display'><tbody><tr><td><code>impl<'c><aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html"title="trait core::marker::Send">Send</a> for <aclass="struct"href="../../actix_web/http/struct.Cookie.html"title="struct actix_web::http::Cookie">Cookie</a><'c></code><ahref='#impl-Send'class='anchor'></a></span></td><td><spanclass='out-of-band'></span></td></tr></tbody></table></h3><divclass='impl-items'></div><h3id='impl-Sync'class='impl'><spanclass='in-band'><tableclass='table-display'><tbody><tr><td><code>impl<'c><aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html"title="trait core::marker::Sync">Sync</a> for <aclass="struct"href="../../actix_web/http/struct.Cookie.html"title="struct actix_web::http::Cookie">Cookie</a><'c></code><ahref='#impl-Sync'class='anchor'></a></span></td><td><spanclass='out-of-band'></span></td></tr></tbody></table></h3><divclass='impl-items'></div></div></section><sectionid="search"class="content hidden"></section><sectionclass="footer"></section><asideid="help"class="hidden"><div><h1class="hidden">Help</h1><divclass="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><divclass="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g. <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g. <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g. <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath="../../";window.currentCrate="actix_web";</script><scriptsrc="../../aliases.js"></script><scriptsrc="../../main.js"></script><scriptdefersrc="../../search-index.js"></script></body></html>