strck

Trait IntoCk

source
pub trait IntoCk: Sized + AsRef<str> {
    // Required method
    fn ck<I: Invariant>(&self) -> Result<&Ck<I>, I::Error>;
}
Expand description

Conversion into a Ck.

Required Methods§

source

fn ck<I: Invariant>(&self) -> Result<&Ck<I>, I::Error>

Returns a validated Ck borrowing from self.

§Examples

Creating an Rust ident containing this:

use strck_ident::{IntoCk, rust::Ident};

let this_ident: &Ident = "this".ck().unwrap();

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T: AsRef<str>> IntoCk for T