pub struct ScriptContent<T> {
pub path: String,
pub name: String,
pub data: Result<Option<T>, Box<dyn Error>>,
}Expand description
One loaded source unit, as ScriptContentProvider::unpack_load returns
it.
data carries the load error rather than failing the whole batch, so one
bad file does not hide the rest.
Fields§
§path: StringPath the content was loaded from.
name: StringName to refer to this unit by, often the same as the path.
data: Result<Option<T>, Box<dyn Error>>The parsed content, nothing to load, or the error that stopped it.
Auto Trait Implementations§
impl<T> !RefUnwindSafe for ScriptContent<T>
impl<T> !Send for ScriptContent<T>
impl<T> !Sync for ScriptContent<T>
impl<T> !UnwindSafe for ScriptContent<T>
impl<T> Freeze for ScriptContent<T>
impl<T> Unpin for ScriptContent<T>
impl<T> UnsafeUnpin for ScriptContent<T>
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