1
0
Fork 0
mirror of https://codeberg.org/demostf/parser.git synced 2026-06-04 02:24:12 +02:00

more usable name types

This commit is contained in:
Robin Appelman 2022-04-10 17:03:38 +02:00
commit 5c10ef1a0c
2 changed files with 50 additions and 10 deletions

View file

@ -12,6 +12,7 @@ use std::borrow::Cow;
use std::cmp::min;
use std::convert::TryFrom;
use std::iter::once;
use std::ops::Deref;
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
#[derive(
@ -127,6 +128,20 @@ impl PartialEq<&str> for SendTableName {
}
}
impl AsRef<str> for SendTableName {
fn as_ref(&self) -> &str {
self.0.as_ref()
}
}
impl Deref for SendTableName {
type Target = str;
fn deref(&self) -> &Self::Target {
self.0.deref()
}
}
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ParseSendTable {