pub enum PsbValueFixed {
Show 17 variants
None,
Null,
Bool(bool),
Number(PsbNumber),
IntArray(PsbUintArray),
String(PsbString),
List(PsbListFixed),
Object(PsbObjectFixed),
Resource(PsbResourceRef),
ExtraResource(PsbExtraRef),
CompilerNumber,
CompilerString,
CompilerResource,
CompilerDecimal,
CompilerArray,
CompilerBool,
CompilerBinaryTree,
}
emote-psb
only.Expand description
Represents of a PSB value.
Variants§
None
No value.
Null
Represents a null value.
Bool(bool)
Represents a boolean value.
Number(PsbNumber)
Represents a number value.
IntArray(PsbUintArray)
Represents an array of integers.
String(PsbString)
Represents a string value.
List(PsbListFixed)
Represents a list of PSB values.
Object(PsbObjectFixed)
Represents an object with key-value pairs.
Resource(PsbResourceRef)
Represents a resource reference.
ExtraResource(PsbExtraRef)
Represents an extra resource reference.
CompilerNumber
Represents a compiler number.
CompilerString
Represents a compiler string.
CompilerResource
Represents a compiler resource.
CompilerDecimal
Represents a compiler decimal.
CompilerArray
Represents a compiler array.
CompilerBool
Represents a compiler boolean.
CompilerBinaryTree
Represents a compiler binary tree.
Implementations§
Source§impl PsbValueFixed
impl PsbValueFixed
Sourcepub fn is_string_or_null(&self) -> bool
pub fn is_string_or_null(&self) -> bool
Returns true if this value is a string or null.
Sourcepub fn set_string(&mut self, value: String)
pub fn set_string(&mut self, value: String)
Sets the value of this PSB value to a new string.
Sourcepub fn entries(&self) -> ObjectIter<'_> ⓘ
pub fn entries(&self) -> ObjectIter<'_> ⓘ
Returns a iterator over the entries of an object.
Sourcepub fn entries_mut(&mut self) -> ObjectIterMut<'_> ⓘ
pub fn entries_mut(&mut self) -> ObjectIterMut<'_> ⓘ
Returns a mutable iterator over the entries of an object.
Sourcepub fn members_mut(&mut self) -> ListIterMut<'_> ⓘ
pub fn members_mut(&mut self) -> ListIterMut<'_> ⓘ
Returns a mutable iterator over the members of a list.
Sourcepub fn resource_id(&self) -> Option<u64>
pub fn resource_id(&self) -> Option<u64>
Returns the resource ID if this value is a resource reference.
Trait Implementations§
Source§impl Clone for PsbValueFixed
impl Clone for PsbValueFixed
Source§impl Debug for PsbValueFixed
impl Debug for PsbValueFixed
Source§impl<'de> Deserialize<'de> for PsbValueFixed
impl<'de> Deserialize<'de> for PsbValueFixed
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<'a> Index<&'a String> for PsbValueFixed
impl<'a> Index<&'a String> for PsbValueFixed
Source§impl<'a> Index<&'a str> for PsbValueFixed
impl<'a> Index<&'a str> for PsbValueFixed
Source§impl Index<String> for PsbValueFixed
impl Index<String> for PsbValueFixed
Source§impl Index<usize> for PsbValueFixed
impl Index<usize> for PsbValueFixed
Source§impl IndexMut<&String> for PsbValueFixed
impl IndexMut<&String> for PsbValueFixed
Source§impl IndexMut<&str> for PsbValueFixed
impl IndexMut<&str> for PsbValueFixed
Source§impl IndexMut<String> for PsbValueFixed
impl IndexMut<String> for PsbValueFixed
Source§impl IndexMut<usize> for PsbValueFixed
impl IndexMut<usize> for PsbValueFixed
Source§impl<'a> PartialEq<&'a str> for PsbValueFixed
impl<'a> PartialEq<&'a str> for PsbValueFixed
Source§impl PartialEq<String> for PsbValueFixed
impl PartialEq<String> for PsbValueFixed
Source§impl PartialEq<str> for PsbValueFixed
impl PartialEq<str> for PsbValueFixed
Auto Trait Implementations§
impl Freeze for PsbValueFixed
impl RefUnwindSafe for PsbValueFixed
impl Send for PsbValueFixed
impl Sync for PsbValueFixed
impl Unpin for PsbValueFixed
impl UnwindSafe for PsbValueFixed
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more