Skip to main content

PyFrameData

Struct PyFrameData 

Source
pub struct PyFrameData {
    pub game_id: String,
    pub guid: Option<String>,
    pub state: String,
    pub levels_completed: u32,
    pub win_levels: u32,
    pub available_actions: Vec<u32>,
    pub full_reset: bool,
}
Available on crate feature python only.
Expand description

The current state of a game run returned by reset and step calls.

All fields are read-only once the object is constructed by a :meth:ArcAgiClient.reset or :meth:ArcAgiClient.step call.

ยงSee Also

Fieldsยง

ยงgame_id: String

Game identifier.

ยงguid: Option<String>

Unique run identifier assigned by the server.

ยงstate: String

Current lifecycle state (e.g. "NOT_FINISHED", "WIN").

ยงlevels_completed: u32

Number of levels completed in this run.

ยงwin_levels: u32

Total levels that must be completed to win.

ยงavailable_actions: Vec<u32>

Action IDs the agent may send on the next step.

ยงfull_reset: bool

Whether this response corresponds to a full game reset.

Implementationsยง

Trait Implementationsยง

Sourceยง

impl Clone for PyFrameData

Sourceยง

fn clone(&self) -> PyFrameData

Returns a duplicate of the value. Read more
1.0.0 ยท Sourceยง

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

Performs copy-assignment from source. Read more
Sourceยง

impl Debug for PyFrameData

Sourceยง

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

Formats the value using the given formatter. Read more
Sourceยง

impl<'py> IntoPyObject<'py> for PyFrameData

Sourceยง

type Target = PyFrameData

The Python output type
Sourceยง

type Output = Bound<'py, <PyFrameData as IntoPyObject<'py>>::Target>

The smart pointer type to use. Read more
Sourceยง

type Error = PyErr

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

fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>

Performs the conversion.
Sourceยง

impl PyClass for PyFrameData

Sourceยง

const NAME: &str = "FrameData"

Name of the class. Read more
Sourceยง

type Frozen = True

Whether the pyclass is frozen. Read more
Sourceยง

impl PyClassImpl for PyFrameData

Sourceยง

const MODULE: Option<&str> = ::core::option::Option::None

Module which the class will be associated with. Read more
Sourceยง

const IS_BASETYPE: bool = false

#[pyclass(subclass)]
Sourceยง

const IS_SUBCLASS: bool = false

#[pyclass(extends=โ€ฆ)]
Sourceยง

const IS_MAPPING: bool = false

#[pyclass(mapping)]
Sourceยง

const IS_SEQUENCE: bool = false

#[pyclass(sequence)]
Sourceยง

const IS_IMMUTABLE_TYPE: bool = false

#[pyclass(immutable_type)]
Sourceยง

const RAW_DOC: &'static CStr = /// The current state of a game run returned by reset and step calls. /// /// All fields are read-only once the object is constructed by a /// :meth:`ArcAgiClient.reset` or :meth:`ArcAgiClient.step` call. /// /// # See Also /// /// - [ARC-AGI-3 Reference](https://arcprize.org/arc-agi/3)

Docstring for the class provided on the struct or enum. Read more
Sourceยง

const DOC: &'static CStr

Fully rendered class doc, including the text_signature if a constructor is defined. Read more
Sourceยง

type Layout = <<PyFrameData as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<PyFrameData>

Description of how this class is laid out in memory
Sourceยง

type BaseType = PyAny

Base class
Sourceยง

type ThreadChecker = NoopThreadChecker

This handles following two situations: Read more
Sourceยง

type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::ImmutableChild

Immutable or mutable
Sourceยง

type Dict = PyClassDummySlot

Specify this class has #[pyclass(dict)] or not.
Sourceยง

type WeakRef = PyClassDummySlot

Specify this class has #[pyclass(weakref)] or not.
Sourceยง

type BaseNativeType = PyAny

The closest native ancestor. This is PyAny by default, and when you declare #[pyclass(extends=PyDict)], itโ€™s PyDict.
Sourceยง

fn items_iter() -> PyClassItemsIter

Sourceยง

fn lazy_type_object() -> &'static LazyTypeObject<Self>

Sourceยง

fn dict_offset() -> Option<PyObjectOffset>

Used to provide the dictoffset slot (equivalent to tp_dictoffset)
Sourceยง

fn weaklist_offset() -> Option<PyObjectOffset>

Used to provide the weaklistoffset slot (equivalent to tp_weaklistoffset
Sourceยง

impl PyMethods<PyFrameData> for PyClassImplCollector<PyFrameData>

Sourceยง

fn py_methods(self) -> &'static PyClassItems

Sourceยง

impl PyTypeInfo for PyFrameData

Sourceยง

const NAME: &str = <Self as ::pyo3::PyClass>::NAME

๐Ÿ‘ŽDeprecated since 0.28.0:

prefer using ::type_object(py).name() to get the correct runtime value

Class name.
Sourceยง

const MODULE: Option<&str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE

๐Ÿ‘ŽDeprecated since 0.28.0:

prefer using ::type_object(py).module() to get the correct runtime value

Module name, if any.
Sourceยง

fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject

Returns the PyTypeObject instance for this type.
Sourceยง

fn type_object(py: Python<'_>) -> Bound<'_, PyType>

Returns the safe abstraction over the type object.
Sourceยง

fn is_type_of(object: &Bound<'_, PyAny>) -> bool

Checks if object is an instance of this type or a subclass of this type.
Sourceยง

fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool

Checks if object is an instance of this type.
Sourceยง

impl DerefToPyAny for PyFrameData

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> From<T> for T

Sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

Sourceยง

impl<T> Instrument for T

Sourceยง

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Sourceยง

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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<'py, T> IntoPyObjectExt<'py> for T
where T: IntoPyObject<'py>,

Sourceยง

fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>

Converts self into an owned Python object, dropping type information.
Sourceยง

fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>

Converts self into an owned Python object, dropping type information and unbinding it from the 'py lifetime.
Sourceยง

fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>

Converts self into a Python object. Read more
Sourceยง

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

Sourceยง

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Sourceยง

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Sourceยง

impl<T> PyErrArguments for T
where T: for<'py> IntoPyObject<'py> + Send + Sync,

Sourceยง

fn arguments(self, py: Python<'_>) -> Py<PyAny>

Arguments for exception
Sourceยง

impl<T> PyTypeCheck for T
where T: PyTypeInfo,

Sourceยง

const NAME: &'static str = T::NAME

๐Ÿ‘ŽDeprecated since 0.27.0:

Use ::classinfo_object() instead and format the type name at runtime. Note that using built-in cast features is often better than manual PyTypeCheck usage.

Name of self. This is used in error messages, for example.
Sourceยง

fn type_check(object: &Bound<'_, PyAny>) -> bool

Checks if object is an instance of Self, which may include a subtype. Read more
Sourceยง

fn classinfo_object(py: Python<'_>) -> Bound<'_, PyAny>

Returns the expected type as a possible argument for the isinstance and issubclass function. Read more
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.
Sourceยง

impl<T> WithSubscriber for T

Sourceยง

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Sourceยง

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Sourceยง

impl<T> Ungil for T
where T: Send,