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:
parent
5da913cc5d
commit
5c10ef1a0c
2 changed files with 50 additions and 10 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue