[#boost-urls-grammar-literal_rule] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/grammar.adoc[grammar]::literal_rule :relfileprefix: ../../../ :mrdocs: Match a string literal exactly == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/grammar/literal_rule.hpp#L44[boost/url/grammar/literal_rule.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class literal_rule; ---- == Types [cols=1] |=== | Name | xref:boost/urls/grammar/literal_rule/value_type.adoc[`value_type`] |=== == Member Functions [cols=1] |=== | Name | xref:boost/urls/grammar/literal_rule/2constructor.adoc[`literal_rule`] [.small]#[constructor]# | xref:boost/urls/grammar/literal_rule/parse.adoc[`parse`] |=== == Description If there is no more input, or if the end of the input is reached, and a prefix of the literal matches exactly, the error returned is xref:boost/urls/grammar/error.adoc[error::need_more]. === Value Type [,cpp] ---- using value_type = core::string_view; ---- === Example Rules are used with the function xref:boost/urls/grammar/literal_rule/parse.adoc[parse]. [,cpp] ---- system::result< core::string_view > rv = parse( "HTTP", literal_rule( "HTTP" ) ); ---- == See Also xref:boost/urls/grammar/delim_rule-01.adoc[delim_rule], xref:boost/urls/grammar/literal_rule/parse.adoc[parse]. [.small]#Created with https://www.mrdocs.com[MrDocs]#