pub struct StreamingInfo {
pub offset: u64,
pub size: u64,
pub path: String,
}Expand description
Where an object’s streamed data is.
Fields§
§offset: u64Where the data starts in the file, in bytes.
size: u64The data’s size in bytes.
path: StringThe resource file as the object names it: a plain file name, or archive:/<name>/<name>.
Implementations§
Source§impl StreamingInfo
impl StreamingInfo
Sourcepub fn of(v: &Value) -> Result<Option<StreamingInfo>>
pub fn of(v: &Value) -> Result<Option<StreamingInfo>>
From a decoded StreamingInfo struct; None when it names no data (empty path or size 0).
Source§impl StreamingInfo
impl StreamingInfo
Sourcepub fn node_in<'b>(&self, bundle: &'b Bundle) -> Result<&'b BundleNode>
pub fn node_in<'b>(&self, bundle: &'b Bundle) -> Result<&'b BundleNode>
The stream node of bundle that the path names: the node that is no SerializedFile and whose path ends with
the same last segment, compared without regard to case (the path is archive:/<name>/<name> for a bundled
file). The data must lie inside the node; no such node, or two, is an error.
Sourcepub fn read_bundled(&self, bundle: &Bundle) -> Result<Vec<u8>>
pub fn read_bundled(&self, bundle: &Bundle) -> Result<Vec<u8>>
Read the data from the node of bundle that StreamingInfo::node_in names.
Trait Implementations§
Source§impl Clone for StreamingInfo
impl Clone for StreamingInfo
Source§impl Debug for StreamingInfo
impl Debug for StreamingInfo
impl Eq for StreamingInfo
Source§impl PartialEq for StreamingInfo
impl PartialEq for StreamingInfo
impl StructuralPartialEq for StreamingInfo
Auto Trait Implementations§
impl Freeze for StreamingInfo
impl RefUnwindSafe for StreamingInfo
impl Send for StreamingInfo
impl Sync for StreamingInfo
impl Unpin for StreamingInfo
impl UnsafeUnpin for StreamingInfo
impl UnwindSafe for StreamingInfo
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.