Skip to content

Commit

Permalink
Merge pull request #24 from museun/expose-parse
Browse files Browse the repository at this point in the history
expose the Parse trait
  • Loading branch information
museun committed Apr 9, 2023
2 parents 6f072a2 + 94e2ed3 commit e13e3b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,7 @@ use typed_messages::TypedMessageMarker;
mod message;

mod parse;
use parse::Parse;
pub use parse::{parse, parse_as, parse_many, ParseResult};
pub use parse::{parse, parse_as, parse_many, Parse, ParseResult};

mod into_static;
pub use into_static::IntoStatic;
Expand Down
2 changes: 2 additions & 0 deletions src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ use crate::{typed_messages::TypedMessageMarker, Error};
pub trait Parse<'a>: Sized {
/// Output of the parse method
type Output;

/// Tries to parse a string into some type
fn parse(input: &mut &'a str) -> Self::Output;
}

Expand Down

0 comments on commit e13e3b1

Please sign in to comment.