Skip to main content

Record

Struct Record 

Source
pub struct Record {
Show 15 fields pub version: String, pub producer: Option<String>, pub variant: Variant, pub score: usize, pub available_moves: Option<usize>, pub terminal: Option<bool>, pub bbox: Option<[i16; 4]>, pub saved_at: Option<String>, pub description: Option<String>, pub author: Option<String>, pub source: Option<String>, pub transcribed_by: Option<String>, pub tags: Vec<String>, pub solver: Option<Solver>, pub moves: Vec<RecordMove>,
}
Expand description

A complete MSR record: the move list plus self-describing metadata.

Only version, variant and moves are essential; everything else is optional provenance, omitted when empty. Unknown fields are ignored on read, so the format is forward-compatible.

Fields§

§version: String

Format version, major.minor (e.g. "0.1"). A bare integer (legacy pre-0.1 files wrote 1) is accepted on read as its decimal string.

§producer: Option<String>

Program that wrote the file, e.g. "morpion-solitaire/0.1.0".

§variant: Variant

Game variant.

§score: usize

Number of moves (equals moves.len(); stored for readability).

§available_moves: Option<usize>

Legal moves still available at the final position (0 ⇔ terminal).

§terminal: Option<bool>

Whether the final position is terminal (no legal move remains).

§bbox: Option<[i16; 4]>

Bounding box of all placed points: [min_x, min_y, max_x, max_y].

§saved_at: Option<String>

Save time as an ISO-8601 UTC string (e.g. "2026-06-14T10:30:00Z").

§description: Option<String>

Free-text human description.

§author: Option<String>

Who produced or owns the game (person, team, handle).

§source: Option<String>

Where the record originally came from: a provenance URL or citation (e.g. the original record site, or the Pentasol file it was imported from).

§transcribed_by: Option<String>

Who transcribed the game into MSR form (curator/project), as distinct from source (where the game itself originates) and author (who set the record). E.g. "morpion-solitaire.io".

§tags: Vec<String>

Free-form labels (e.g. "world-record", "candidate", "verified").

§solver: Option<Solver>

Machine-search provenance, present only when a solver produced the game. Absent for human / hand-played / transcribed records.

§moves: Vec<RecordMove>

The moves, in play order.

Implementations§

Source§

impl Record

Source

pub fn new(variant: Variant, moves: Vec<RecordMove>) -> Record

A minimal record for variant and moves (version 1, score set, metadata empty). Fill the public metadata fields as needed.

Trait Implementations§

Source§

impl Clone for Record

Source§

fn clone(&self) -> Record

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Record

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Record

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Record

Source§

fn eq(&self, other: &Record) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Record

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Record

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.