pub struct CardScriptParser { /* private fields */ }Expand description
Line-by-line parser for Forge card script files.
Direct port of Java CardRules.Reader.parseLine().
Implementations§
Source§impl CardScriptParser
impl CardScriptParser
pub fn new() -> Self
pub fn reset(&mut self)
Sourcepub fn parse<'a, I: IntoIterator<Item = &'a str>>(
&mut self,
lines: I,
filename: Option<&str>,
) -> Result<CardRules, String>
pub fn parse<'a, I: IntoIterator<Item = &'a str>>( &mut self, lines: I, filename: Option<&str>, ) -> Result<CardRules, String>
Parse all lines from a card script and produce a CardRules.
Sourcepub fn parse_line(&mut self, line: &str)
pub fn parse_line(&mut self, line: &str)
Parse a single line of a card script.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CardScriptParser
impl RefUnwindSafe for CardScriptParser
impl Send for CardScriptParser
impl Sync for CardScriptParser
impl Unpin for CardScriptParser
impl UnsafeUnpin for CardScriptParser
impl UnwindSafe for CardScriptParser
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.