Struct floem_peniko::Blob
source · pub struct Blob<T> { /* private fields */ }
Expand description
Shared data with an associated unique identifier.
Implementations§
source§impl<T> Blob<T>
impl<T> Blob<T>
sourcepub fn new(data: Arc<dyn AsRef<[T]> + Send + Sync>) -> Self
pub fn new(data: Arc<dyn AsRef<[T]> + Send + Sync>) -> Self
Creates a new blob from the given data and generates a unique identifier.
sourcepub fn from_raw_parts(data: Arc<dyn AsRef<[T]> + Send + Sync>, id: u64) -> Self
pub fn from_raw_parts(data: Arc<dyn AsRef<[T]> + Send + Sync>, id: u64) -> Self
Creates a new blob from the given data and identifier.
Note that while this function is not unsafe, usage of this in combination
with new
(or with identifiers that are not uniquely associated with the given data)
can lead to inconsistencies.
This is primarily for libraries that wish to interop with vello but are unable to depend on our resource types.
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for Blob<T>
impl<T> Send for Blob<T>
impl<T> Sync for Blob<T>
impl<T> Unpin for Blob<T>
impl<T> !UnwindSafe for Blob<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