PageSourceSearch

https://mojolang.org/assets/js/5676b373.c823801e.js

js mojolang.org collected 2026-10-01 12:01:42 UTC 4,954 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkmodular_fe=self.webpackChunkmodular_fe||[]).push([["16275"],{36088(e,t,r){r.r(t),r.d(t,{metadata:()=>i,default:()=>h,frontMatter:()=>o,contentTitle:()=>c,toc:()=>l,assets:()=>d});var i=JSON.parse('{"id":"docs/std/collections/dict/EmptyDictError","title":"EmptyDictError","description":"A custom error type for when a `Dict` is empty.","source":"@site/docs/docs/std/collections/dict/EmptyDictError.md","sourceDirName":"docs/std/collections/dict","slug":"/docs/std/collections/dict/EmptyDictError","permalink":"/nightly/docs/std/collections/dict/EmptyDictError","draft":false,"unlisted":false,"editUrl":"https://github.com/modular/modular/edit/main/Mojo/docs/site/std/collections/dict/EmptyDictError.md","tags":[],"version":"current","frontMatter":{"title":"EmptyDictError","version":"1.2.0.dev0","slug":"EmptyDictError","type":"struct","namespace":"std.collections.dict","lang":"mojo","show_stability_marker":null,"description":"A custom error type for when a `Dict` is empty."},"sidebar":"stdSidebar","previous":{"title":"DictKeyError","permalink":"/nightly/docs/std/collections/dict/DictKeyError"},"next":{"title":"StringDict","permalink":"/nightly/docs/std/collections/dict/StringDict"}}'),s=r(74848),n=r(28453);let o={title:"EmptyDictError",version:"1.2.0.dev0",slug:"EmptyDictError",type:"struct",namespace:"std.collections.dict",lang:"mojo",show_stability_marker:null,description:"A custom error type for when a `Dict` is empty."},c,d={},l=[{value:"Implemented traits",id:"implemented-traits",level:2},{value:"Methods",id:"methods",level:2},{value:"<code>write_to</code>",id:"write_to",level:3},{value:"<code>write_repr_to</code>",id:"write_repr_to",level:3}];function a(e){let t={a:"a",b:"b",code:"code",div:"div",h2:"h2",h3:"h3",li:"li",p:"p",section:"section",strong:"strong",ul:"ul",...(0,n.R)(),...e.components};return(0,s.jsxs)(t.section,{className:"mojo-docs",children:["\n",(0,s.jsxs)(t.div,{className:"mojo-function-sig",children:["\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.code,{children:"struct EmptyDictError"})}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["A custom error type for when a ",(0,s.jsx)(t.code,{children:"Dict"})," is empty."]}),"\n",(0,s.jsx)(t.h2,{id:"implemented-traits",children:"Implemented traits"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"../../../../../docs/std/traits/anytype/AnyType",children:(0,s.jsx)(t.code,{children:"AnyType"})}),",\n",(0,s.jsx)(t.a,{href:"../../../../../docs/std/traits/copyable/Copyable",children:(0,s.jsx)(t.code,{children:"Copyable"})}),",\n",(0,s.jsx)(t.a,{href:"../../../../../docs/std/traits/deinitable/Deinitable",children:(0,s.jsx)(t.code,{children:"Deinitable"})}),",\n",(0,s.jsx)(t.a,{href:"../../../../../docs/std/traits/copyable/ImplicitlyCopyable",children:(0,s.jsx)(t.code,{children:"ImplicitlyCopyable"})}),",\n",(0,s.jsx)(t.a,{href:"../../../../../docs/std/traits/movable/Movable",children:(0,s.jsx)(t.code,{children:"Movable"})}),",\n",(0,s.jsx)(t.a,{href:"../../../../../docs/std/format/Writable",children:(0,s.jsx)(t.code,{children:"Writable"})})]}),"\n",(0,s.jsx)(t.h2,{id:"methods",children:"Methods"}),"\n",(0,s.jsx)(t.h3,{id:"write_to",children:(0,s.jsx)(t.code,{children:"write_to"})}),"\n",(0,s.jsxs)(t.div,{className:"mojo-function-detail",children:["\n",(0,s.jsxs)(t.div,{className:"mojo-function-sig",children:["\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.code,{children:"def write_to(self, mut writer: T)"})}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"Write the error to the writer."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Args:"})}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["\u200B",(0,s.jsx)(t.b,{children:"writer"})," (",(0,s.jsx)(t.code,{children:"T"}),"): The writer to write to."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"write_repr_to",children:(0,s.jsx)(t.code,{children:"write_repr_to"})}),"\n",(0,s.jsxs)(t.div,{className:"mojo-function-detail",children:["\n",(0,s.jsxs)(t.div,{className:"mojo-function-sig",children:["\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.code,{children:"def write_repr_to(self, mut writer: T)"})}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"Write the error to the writer."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Args:"})}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["\u200B",(0,s.jsx)(t.b,{children:"writer"})," (",(0,s.jsx)(t.code,{children:"T"}),"): The writer to write to."]}),"\n"]}),"\n"]}),"\n"]})}function h(e={}){let{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},28453(e,t,r){r.d(t,{R:()=>o,x:()=>c});var i=r(96540);let s={},n=i.createContext(s);function o(e){let t=i.useContext(n);return i.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),i.createElement(n.Provider,{value:t},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.