pub struct UserDataUnregistered {
pub uuid: [u8; 16],
pub data: Vec<u8>,
}Expand description
SEI type 5: user-data unregistered.
Carries a 16-byte UUID (RFC 4122) followed by arbitrary application data.
Fields§
§uuid: [u8; 16]128-bit UUID identifying the data format.
data: Vec<u8>Arbitrary application payload.
Implementations§
Source§impl UserDataUnregistered
impl UserDataUnregistered
Sourcepub fn with_nil_uuid(data: Vec<u8>) -> Self
pub fn with_nil_uuid(data: Vec<u8>) -> Self
Create with a nil UUID (all zeros) — useful for tests.
Sourcepub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn to_bytes(&self) -> Vec<u8> ⓘ
Serialise into raw bytes: 16-byte UUID followed by payload.
Sourcepub fn from_bytes(raw: &[u8]) -> CodecResult<Self>
pub fn from_bytes(raw: &[u8]) -> CodecResult<Self>
Parse from raw bytes.
Trait Implementations§
Source§impl Clone for UserDataUnregistered
impl Clone for UserDataUnregistered
Source§fn clone(&self) -> UserDataUnregistered
fn clone(&self) -> UserDataUnregistered
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 UserDataUnregistered
impl Debug for UserDataUnregistered
Source§impl PartialEq for UserDataUnregistered
impl PartialEq for UserDataUnregistered
impl Eq for UserDataUnregistered
impl StructuralPartialEq for UserDataUnregistered
Auto Trait Implementations§
impl Freeze for UserDataUnregistered
impl RefUnwindSafe for UserDataUnregistered
impl Send for UserDataUnregistered
impl Sync for UserDataUnregistered
impl Unpin for UserDataUnregistered
impl UnsafeUnpin for UserDataUnregistered
impl UnwindSafe for UserDataUnregistered
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more