pub struct Resource {
pub key: ResourceKey,
pub address: ResourcePath,
pub archetype: ResourceArchetype,
pub state: DataSet<BinSrc>,
pub owner: Option<UserKey>,
}
Fields§
§key: ResourceKey
§address: ResourcePath
§archetype: ResourceArchetype
§state: DataSet<BinSrc>
§owner: Option<UserKey>
Implementations§
Source§impl Resource
impl Resource
pub fn new( key: ResourceKey, address: ResourcePath, archetype: ResourceArchetype, state_src: DataSet<BinSrc>, ) -> Resource
pub fn key(&self) -> ResourceKey
pub fn address(&self) -> ResourcePath
pub fn resource_type(&self) -> ResourceType
pub fn state_src(&self) -> DataSet<BinSrc>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Resource
impl<'de> Deserialize<'de> for Resource
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Resource> for ResourceStub
impl From<Resource> for ResourceStub
Auto Trait Implementations§
impl Freeze for Resource
impl RefUnwindSafe for Resource
impl Send for Resource
impl Sync for Resource
impl Unpin for Resource
impl UnwindSafe for Resource
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