[][src]Function cynic::selection_set::fail

pub fn fail<'a, V>(err: impl Into<String>) -> SelectionSet<'static, V, ()>

Creates a SelectionSet that always fails to decode.

This is handy when used with SelectionSet::and_then where you want to give a custom error message in some case.

See the SelectionSet::and_then docs for an example.