pub struct RawResource { /* private fields */ }Expand description
A zero-copy buffer resource representing “Hilirisasi Data” (Downstreaming Data).
This struct wraps bytes::Bytes to provide efficient, reference-counted
access to contiguous memory without unnecessary copying.
Implementations§
Source§impl RawResource
impl RawResource
Sourcepub fn refine(data: Vec<u8>) -> Result<Self, LogisticsError>
pub fn refine(data: Vec<u8>) -> Result<Self, LogisticsError>
HILIRISASI DATA: Refines raw data into a downstreamable resource.
Consumes a Vec<u8> into a Bytes object (zero-copy if possible).
§Errors
Returns an error if the input data is empty.
Trait Implementations§
Source§impl Clone for RawResource
impl Clone for RawResource
Source§fn clone(&self) -> RawResource
fn clone(&self) -> RawResource
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 RawResource
impl Debug for RawResource
Source§impl PartialEq for RawResource
impl PartialEq for RawResource
impl Eq for RawResource
impl Send for RawResource
impl StructuralPartialEq for RawResource
impl Sync for RawResource
Auto Trait Implementations§
impl !Freeze for RawResource
impl RefUnwindSafe for RawResource
impl Unpin for RawResource
impl UnwindSafe for RawResource
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