pub struct EntryObject {
pub kind: Option<Kind>,
pub value: Value,
pub comment: Option<String>,
pub key: Option<String>,
pub event: Option<String>,
pub subtitle: Option<String>,
}Expand description
An entry’s object form: { "type": ..., "value": ..., "comment": ..., ... }.
Fields§
§kind: Option<Kind>What the entry is; by default what its value is (string, number, bool).
value: ValueThe text, path, color, number or flag.
comment: Option<String>A note for whoever edits the file — never shipped.
key: Option<String>Texts: the translation key instead of the default one.
event: Option<String>Sounds: the sound event name.
subtitle: Option<String>Sounds: the subtitle’s translation key.
Trait Implementations§
Source§impl Schema for EntryObject
impl Schema for EntryObject
Source§fn encode(&self, __yog_w: &mut Writer)
fn encode(&self, __yog_w: &mut Writer)
Writes itself in the binary form, straight —
Schema::write’s
value encoded, unless the type knows better (derived ones do).Source§fn decode(__yog_d: &mut Decoder<'_>) -> Option<EntryObject>
fn decode(__yog_d: &mut Decoder<'_>) -> Option<EntryObject>
Reads itself from the binary form, straight;
None when it isn’t
what Schema::encode writes — then read_bytes reads the slow
way, which says what’s wrong. Through a value unless the type knows
better (derived ones do).Source§fn pack(&self, __yog_p: &mut Packer)
fn pack(&self, __yog_p: &mut Packer)
Packs itself into a frame (
crate::frame): its binary form as
bytes, unless the type packs itself (derived ones and plain types do).Source§fn unpack(__yog_u: &mut Unpacker<'_>) -> Option<EntryObject>
fn unpack(__yog_u: &mut Unpacker<'_>) -> Option<EntryObject>
Reads itself out of a frame;
None if the bytes aren’t what
Schema::pack writes.Source§fn read(v: &ValueRef<'_>, cx: &mut Reader<'_>) -> Option<EntryObject>
fn read(v: &ValueRef<'_>, cx: &mut Reader<'_>) -> Option<EntryObject>
Reads
v. Problems go to cx at its current path; None when the
value couldn’t be read (the problem is in cx).Source§fn absent() -> Option<Self>
fn absent() -> Option<Self>
The value of a field that isn’t there —
None: the field is required.Source§fn pack_list(items: &[Self], p: &mut Packer)
fn pack_list(items: &[Self], p: &mut Packer)
A list of these packed: a count, then each one (floats raw).
Source§fn encode_list(items: &[Self], w: &mut Writer)
fn encode_list(items: &[Self], w: &mut Writer)
A list of these written straight (numbers pack theirs).
Auto Trait Implementations§
impl Freeze for EntryObject
impl RefUnwindSafe for EntryObject
impl Send for EntryObject
impl Sync for EntryObject
impl Unpin for EntryObject
impl UnsafeUnpin for EntryObject
impl UnwindSafe for EntryObject
Blanket Implementations§
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