Trait restructure::RegexStruct [] [src]

pub trait RegexStruct {
    fn as_regex(&self) -> Ref<Regex>;
    fn find(&self, text: &str) -> Self;
}

This trait allows you to match struct fields with regexp

Required Methods

fn as_regex(&self) -> Ref<Regex>

This function returns the Regex representation of the struct

fn find(&self, text: &str) -> Self

This function takes a Slice, find Captures in it and assigns it to the appropriate struct fields

Implementors