var searchIndex = {}; searchIndex["slack_hook"] = {"doc":"Library to send messages to slack rooms\nsupports entire messaging API, including attachments and fields\nalso support for built-in colors as well as any hex colors","items":[[3,"Slack","slack_hook","Handles sending messages to slack",null,null],[3,"SlackText","","Representation of any text sent through slack\nthe text must be processed to escape specific characters",null,null],[3,"SlackLink","","Representation of a link sent in slack",null,null],[12,"url","","URL for link",0,null],[12,"text","","Anchor text for link",0,null],[3,"Payload","","Payload to send to slack\nhttps://api.slack.com/incoming-webhooks\nhttps://api.slack.com/methods/chat.postMessage",null,null],[12,"text","","text to send\ndespite `text` stated as required, it does not seem to be",1,null],[12,"channel","","channel to send payload to\nnote: if not provided, this will default to channel\nsetup in slack",1,null],[12,"username","","username override",1,null],[12,"icon_url","","specific url for icon",1,null],[12,"icon_emoji","","emjoi for icon\nhttps://api.slack.com/methods/emoji.list",1,null],[12,"attachments","","attachments to send",1,null],[12,"unfurl_links","","whether slack will try to fetch links and create an attachment\nhttps://api.slack.com/docs/unfurling",1,null],[12,"link_names","","find and link channel names and usernames",1,null],[3,"Attachment","","Slack allows for attachments to be added to messages. See\nhttps://api.slack.com/docs/attachments for more information.",null,null],[12,"fallback","","Required text for attachment.\nSlack will use this text to display on devices that don't support markup.",2,null],[12,"text","","Optional text for other devices, markup supported",2,null],[12,"pretext","","Optional text that appears above attachment",2,null],[12,"color","","Color of attachment",2,null],[12,"fields","","Fields are defined as an array, and hashes contained within it will be\ndisplayed in a table inside the message attachment.",2,null],[3,"Field","","Fields are defined as an array, and hashes contained within it will\nbe displayed in a table inside the message attachment.",null,null],[12,"title","","Shown as a bold heading above the value text.\nIt cannot contain markup and will be escaped for you.",3,null],[12,"value","","The text value of the field. It may contain standard message markup\nand must be escaped as normal. May be multi-line.",3,null],[12,"short","","An optional flag indicating whether the value is short enough to be\ndisplayed side-by-side with other values.",3,null],[3,"SlackError","","main Slack library error",null,null],[12,"kind","","kind of error",4,null],[12,"desc","","description of error",4,null],[3,"HexColor","","The `HexColor` string can be one of:",null,null],[4,"PayloadTemplate","","Templates to support common payload use cases",null,null],[13,"Complete","","Specify the entire payload",5,null],[12,"text","slack_hook::PayloadTemplate","Text to send",5,null],[12,"channel","","Channel to send payload to\nnote: if not provided, this will default to channel\nsetup in slack",5,null],[12,"username","","Username override",5,null],[12,"icon_url","","Specific url for icon",5,null],[12,"icon_emoji","","Emjoi for icon\nhttps://api.slack.com/methods/emoji.list",5,null],[12,"attachments","","Attachments to send",5,null],[12,"unfurl_links","","Whether slack will try to fetch links and create an attachment\nhttps://api.slack.com/docs/unfurling",5,null],[12,"link_names","","Find and link channel names and usernames",5,null],[13,"Message","slack_hook","Simple payload with just a message",5,null],[12,"text","slack_hook::PayloadTemplate","Text to send",5,null],[13,"Attachment","slack_hook","Attachment-only payload",5,null],[12,"attachment","slack_hook::PayloadTemplate","Provide a single attachment",5,null],[4,"AttachmentTemplate","slack_hook","Attachment template to simplify constructing attachments\nfor common use cases.",null,null],[13,"Complete","","Specify all attributes of attachment",6,null],[12,"fallback","slack_hook::AttachmentTemplate","Required text for attachment.\nSlack will use this text to display on devices that don't support markup.",6,null],[12,"text","","Optional primary text of attachment",6,null],[12,"pretext","","Optional text that appears above attachment",6,null],[12,"color","","Color string can be any hex code starting with #",6,null],[12,"fields","","Fields are defined as an array, and hashes contained within it will\nbe displayed in a table inside the message attachment.",6,null],[13,"Text","slack_hook","Provide only text and color for attachment\nother values will be defaulted",6,null],[12,"text","slack_hook::AttachmentTemplate","Text to send",6,null],[12,"color","","Color string can be any hex code starting with #",6,null],[4,"ErrorKind","slack_hook","Different kinds of errors handled",null,null],[13,"ErrSlackResp","","slack response failed",7,null],[13,"ErrUtf8","","slack response should be in utf8",7,null],[13,"ErrFromHex","","couldn't convert value to Hex",7,null],[13,"ErrHexColor","","failed other hex color validations for input",7,null],[13,"ErrEncoder","","failed to encode payload",7,null],[13,"ErrCurl","","curl error",7,null],[4,"SlackColor","","Default slack colors built-in to the API\nSee: https://api.slack.com/docs/attachments",null,null],[13,"Good","","green",8,null],[13,"Warning","","orange",8,null],[13,"Danger","","red",8,null],[11,"fmt","","",7,null],[11,"clone","","",7,null],[11,"fmt","","",4,null],[11,"from","","",4,{"inputs":[{"name":"utf8error"}],"output":{"name":"slackerror"}}],[11,"from","","",4,{"inputs":[{"name":"encodererror"}],"output":{"name":"slackerror"}}],[11,"from","","",4,{"inputs":[{"name":"error"}],"output":{"name":"slackerror"}}],[11,"from","","",4,{"inputs":[{"name":"fromhexerror"}],"output":{"name":"slackerror"}}],[11,"from","","",4,null],[11,"fmt","","",4,null],[11,"description","","",4,null],[11,"cause","","",4,null],[11,"fmt","","",8,null],[11,"clone","","",8,null],[11,"to_string","","",8,null],[11,"as_ref","","",8,null],[11,"fmt","","",9,null],[11,"to_json","","",9,null],[11,"encode","","",9,null],[11,"fmt","","",1,null],[11,"encode","","",1,null],[11,"fmt","","",5,null],[11,"new","","Construct a new Payload from a template",1,{"inputs":[{"name":"payloadtemplate"}],"output":{"name":"payload"}}],[11,"fmt","","",2,null],[11,"encode","","",2,null],[11,"fmt","","",6,null],[11,"new","","Construct new attachment based on template provided",2,{"inputs":[{"name":"attachmenttemplate"}],"output":{"name":"slackresult"}}],[11,"fmt","","",3,null],[11,"encode","","",3,null],[11,"new","","Construct a new field",3,{"inputs":[{"name":"str"},{"name":"str"},{"name":"option"}],"output":{"name":"field"}}],[11,"fmt","","",10,null],[11,"new","","Construct a new instance of slack for a specific\nincoming url endopoint",10,{"inputs":[{"name":"str"}],"output":{"name":"slack"}}],[11,"send","","Send payload to slack service",10,null],[11,"new","","Construct slack text",11,{"inputs":[{"name":"str"}],"output":{"name":"slacktext"}}],[11,"fmt","","",11,null],[11,"encode","","",11,null],[11,"new","","Construct new SlackLink with string slices",0,{"inputs":[{"name":"str"},{"name":"str"}],"output":{"name":"slacklink"}}],[11,"fmt","","",0,null],[11,"encode","","",0,null],[6,"SlackResult","","Result alias to save typing",null,null]],"paths":[[3,"SlackLink"],[3,"Payload"],[3,"Attachment"],[3,"Field"],[3,"SlackError"],[4,"PayloadTemplate"],[4,"AttachmentTemplate"],[4,"ErrorKind"],[4,"SlackColor"],[3,"HexColor"],[3,"Slack"],[3,"SlackText"]]}; initSearch(searchIndex);