rbatis-codegen 4.6.5

The Rust SQL Toolkit and ORM Library. An async, pure Rust SQL crate featuring compile-time Dynamic SQL gen system
Documentation
use rbs::Value;
use crate::ops::StrMethods;

impl StrMethods for Value {
    fn contains_str(self, s: &str) -> bool {
        self.as_str().unwrap_or_default().contains(s)
    }

    fn starts_with(self, other: &str) -> bool {
        self.as_str().unwrap_or_default().starts_with(other)
    }

    fn ends_with(self, other: &str) -> bool {
        self.as_str().unwrap_or_default().ends_with(other)
    }
}

impl StrMethods for &Value {
    fn contains_str(self, s: &str) -> bool {
        self.as_str().unwrap_or_default().contains(s)
    }

    fn starts_with(self, other: &str) -> bool {
        self.as_str().unwrap_or_default().starts_with(other)
    }

    fn ends_with(self, other: &str) -> bool {
        self.as_str().unwrap_or_default().ends_with(other)
    }
}

impl StrMethods for &&Value {
    fn contains_str(self, s: &str) -> bool {
        self.as_str().unwrap_or_default().contains(s)
    }

    fn starts_with(self, other: &str) -> bool {
        self.as_str().unwrap_or_default().starts_with(other)
    }

    fn ends_with(self, other: &str) -> bool {
        self.as_str().unwrap_or_default().ends_with(other)
    }
}