pub struct VirtualPsbFixed {
header: PsbHeader,
resources: Vec<Vec<u8>>,
extra: Vec<Vec<u8>>,
root: PsbObjectFixed,
}
Available on crate feature
emote-psb
only.Expand description
Represents a fixed version of a virtual PSB.
Fields§
§header: PsbHeader
§resources: Vec<Vec<u8>>
§extra: Vec<Vec<u8>>
§root: PsbObjectFixed
Implementations§
Source§impl VirtualPsbFixed
impl VirtualPsbFixed
Sourcepub fn new(
header: PsbHeader,
resources: Vec<Vec<u8>>,
extra: Vec<Vec<u8>>,
root: PsbObjectFixed,
) -> Self
pub fn new( header: PsbHeader, resources: Vec<Vec<u8>>, extra: Vec<Vec<u8>>, root: PsbObjectFixed, ) -> Self
Creates a new fixed virtual PSB.
Sourcepub fn resources_mut(&mut self) -> &mut Vec<Vec<u8>>
pub fn resources_mut(&mut self) -> &mut Vec<Vec<u8>>
Returns a mutable reference to the resources of the PSB.
Sourcepub fn extra_mut(&mut self) -> &mut Vec<Vec<u8>>
pub fn extra_mut(&mut self) -> &mut Vec<Vec<u8>>
Returns a mutable reference to the extra resources of the PSB.
Sourcepub fn root(&self) -> &PsbObjectFixed
pub fn root(&self) -> &PsbObjectFixed
Returns a reference to the root object of the PSB.
Sourcepub fn root_mut(&mut self) -> &mut PsbObjectFixed
pub fn root_mut(&mut self) -> &mut PsbObjectFixed
Returns a mutable reference to the root object of the PSB.
Sourcepub fn set_root(&mut self, root: PsbObjectFixed)
pub fn set_root(&mut self, root: PsbObjectFixed)
Sets the root of the PSB.
Sourcepub fn unwrap(self) -> (PsbHeader, Vec<Vec<u8>>, Vec<Vec<u8>>, PsbObjectFixed)
pub fn unwrap(self) -> (PsbHeader, Vec<Vec<u8>>, Vec<Vec<u8>>, PsbObjectFixed)
Unwraps the PSB into its components.
Sourcepub fn to_psb(self) -> VirtualPsb
pub fn to_psb(self) -> VirtualPsb
Converts this fixed PSB to a virtual PSB.
Sourcepub fn from_json(&mut self, obj: &JsonValue) -> Result<(), Error>
Available on crate feature json
only.
pub fn from_json(&mut self, obj: &JsonValue) -> Result<(), Error>
json
only.Converts json object to a fixed PSB.
pub fn set_data(&mut self, data: VirtualPsbFixedData)
Trait Implementations§
Source§impl Clone for VirtualPsbFixed
impl Clone for VirtualPsbFixed
Source§fn clone(&self) -> VirtualPsbFixed
fn clone(&self) -> VirtualPsbFixed
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for VirtualPsbFixed
impl Debug for VirtualPsbFixed
Auto Trait Implementations§
impl Freeze for VirtualPsbFixed
impl RefUnwindSafe for VirtualPsbFixed
impl Send for VirtualPsbFixed
impl Sync for VirtualPsbFixed
impl Unpin for VirtualPsbFixed
impl UnwindSafe for VirtualPsbFixed
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
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>
Converts
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>
Converts
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