falco_event::fields

Trait FromBytes

source
pub trait FromBytes<'a>: Sized {
    // Required method
    fn from_bytes(buf: &mut &'a [u8]) -> FromBytesResult<Self>;

    // Provided method
    fn from_maybe_bytes(buf: Option<&mut &'a [u8]>) -> FromBytesResult<Self> { ... }
}
Expand description

Deserialize a field from a byte buffer

Required Methods§

source

fn from_bytes(buf: &mut &'a [u8]) -> FromBytesResult<Self>

Read the binary representation of a field and return the parsed representation

Note: the argument is a mutable reference to an immutable slice. While the contents of the slice cannot be modified, the slice itself can. Every call to from_bytes consumes a number of bytes from the beginning of the slice.

Provided Methods§

source

fn from_maybe_bytes(buf: Option<&mut &'a [u8]>) -> FromBytesResult<Self>

Read the binary representation of a field from a buffer that may or may not exist

The default implementation returns an error when the buffer does not exist, but the blanket impl for Option<T> effectively returns Ok(None)

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl FromBytes<'_> for (Ipv4Addr, Port)

source§

fn from_bytes(buf: &mut &[u8]) -> FromBytesResult<Self>

source§

impl FromBytes<'_> for (Ipv6Addr, Port)

source§

fn from_bytes(buf: &mut &[u8]) -> FromBytesResult<Self>

source§

impl FromBytes<'_> for bool

source§

fn from_bytes(buf: &mut &[u8]) -> FromBytesResult<Self>

source§

impl FromBytes<'_> for i8

source§

fn from_bytes(buf: &mut &[u8]) -> FromBytesResult<Self>
where Self: Sized,

source§

impl FromBytes<'_> for i16

source§

fn from_bytes(buf: &mut &[u8]) -> FromBytesResult<Self>
where Self: Sized,

source§

impl FromBytes<'_> for i32

source§

fn from_bytes(buf: &mut &[u8]) -> FromBytesResult<Self>
where Self: Sized,

source§

impl FromBytes<'_> for i64

source§

fn from_bytes(buf: &mut &[u8]) -> FromBytesResult<Self>
where Self: Sized,

source§

impl FromBytes<'_> for u8

source§

fn from_bytes(buf: &mut &[u8]) -> FromBytesResult<Self>
where Self: Sized,

source§

impl FromBytes<'_> for u16

source§

fn from_bytes(buf: &mut &[u8]) -> FromBytesResult<Self>
where Self: Sized,

source§

impl FromBytes<'_> for u32

source§

fn from_bytes(buf: &mut &[u8]) -> FromBytesResult<Self>
where Self: Sized,

source§

impl FromBytes<'_> for u64

source§

fn from_bytes(buf: &mut &[u8]) -> FromBytesResult<Self>
where Self: Sized,

source§

impl<'a> FromBytes<'a> for &'a CStr

source§

fn from_bytes(buf: &mut &'a [u8]) -> FromBytesResult<Self>

source§

impl<'a> FromBytes<'a> for &'a [u8]

source§

fn from_bytes(buf: &mut &'a [u8]) -> FromBytesResult<Self>

source§

impl<'a> FromBytes<'a> for Vec<&'a CStr>

source§

fn from_bytes(buf: &mut &'a [u8]) -> FromBytesResult<Self>

source§

impl<'a> FromBytes<'a> for Vec<(&'a CStr, &'a CStr)>

source§

fn from_bytes(buf: &mut &'a [u8]) -> FromBytesResult<Self>

source§

impl<'a, T> FromBytes<'a> for Option<T>
where T: Sized + FromBytes<'a> + 'a,

source§

fn from_bytes(buf: &mut &'a [u8]) -> FromBytesResult<Self>

source§

fn from_maybe_bytes(buf: Option<&mut &'a [u8]>) -> FromBytesResult<Self>

Implementors§

source§

impl FromBytes<'_> for PT_ENUMFLAGS8_fcntl_commands

source§

impl FromBytes<'_> for PT_ENUMFLAGS8_lseek_whence

source§

impl FromBytes<'_> for PT_ENUMFLAGS8_rlimit_resources

source§

impl FromBytes<'_> for PT_ENUMFLAGS8_shutdown_how

source§

impl FromBytes<'_> for PT_ENUMFLAGS8_sockopt_levels

source§

impl FromBytes<'_> for PT_ENUMFLAGS8_sockopt_options

source§

impl FromBytes<'_> for PT_ENUMFLAGS16_io_uring_register_opcodes

source§

impl FromBytes<'_> for PT_ENUMFLAGS16_ptrace_requests

source§

impl FromBytes<'_> for PT_ENUMFLAGS32_bpf_commands

source§

impl FromBytes<'_> for PT_ENUMFLAGS32_fsconfig_cmds

source§

impl FromBytes<'_> for PT_ENUMFLAGS32_prctl_options

source§

impl FromBytes<'_> for PT_ENUMFLAGS32_socket_families

source§

impl FromBytes<'_> for IpAddr

source§

impl FromBytes<'_> for PT_FLAGS8_quotactl_dqi_flags

source§

impl FromBytes<'_> for PT_FLAGS8_quotactl_quota_fmts

source§

impl FromBytes<'_> for PT_FLAGS8_quotactl_types

source§

impl FromBytes<'_> for PT_FLAGS16_creat_flags

source§

impl FromBytes<'_> for PT_FLAGS16_file_flags

source§

impl FromBytes<'_> for PT_FLAGS16_futex_operations

source§

impl FromBytes<'_> for PT_FLAGS16_quotactl_cmds

source§

impl FromBytes<'_> for PT_FLAGS16_semctl_commands

source§

impl FromBytes<'_> for PT_FLAGS16_semop_flags

source§

impl FromBytes<'_> for PT_FLAGS32_access_flags

source§

impl FromBytes<'_> for PT_FLAGS32_clone_flags

source§

impl FromBytes<'_> for PT_FLAGS32_delete_module_flags

source§

impl FromBytes<'_> for PT_FLAGS32_epoll_create1_flags

source§

impl FromBytes<'_> for PT_FLAGS32_execve_flags

source§

impl FromBytes<'_> for PT_FLAGS32_execveat_flags

source§

impl FromBytes<'_> for PT_FLAGS32_fchownat_flags

source§

impl FromBytes<'_> for PT_FLAGS32_file_flags

source§

impl FromBytes<'_> for PT_FLAGS32_finit_module_flags

source§

impl FromBytes<'_> for PT_FLAGS32_flock_flags

source§

impl FromBytes<'_> for PT_FLAGS32_io_uring_enter_flags

source§

impl FromBytes<'_> for PT_FLAGS32_io_uring_setup_feats

source§

impl FromBytes<'_> for PT_FLAGS32_io_uring_setup_flags

source§

impl FromBytes<'_> for PT_FLAGS32_linkat_flags

source§

impl FromBytes<'_> for PT_FLAGS32_memfd_create_flags

source§

impl FromBytes<'_> for PT_FLAGS32_mlock2_flags

source§

impl FromBytes<'_> for PT_FLAGS32_mlockall_flags

source§

impl FromBytes<'_> for PT_FLAGS32_mmap_flags

source§

impl FromBytes<'_> for PT_FLAGS32_mount_flags

source§

impl FromBytes<'_> for PT_FLAGS32_newfstatat_flags

source§

impl FromBytes<'_> for PT_FLAGS32_openat2_flags

source§

impl FromBytes<'_> for PT_FLAGS32_pf_flags

source§

impl FromBytes<'_> for PT_FLAGS32_pidfd_open_flags

source§

impl FromBytes<'_> for PT_FLAGS32_prot_flags

source§

impl FromBytes<'_> for PT_FLAGS32_renameat2_flags

source§

impl FromBytes<'_> for PT_FLAGS32_semget_flags

source§

impl FromBytes<'_> for PT_FLAGS32_splice_flags

source§

impl FromBytes<'_> for PT_FLAGS32_umount_flags

source§

impl FromBytes<'_> for PT_FLAGS32_unlinkat_flags

source§

impl FromBytes<'_> for PT_MODE_chmod_mode

source§

impl FromBytes<'_> for PT_MODE_mknod_mode

source§

impl FromBytes<'_> for SystemTime

source§

impl FromBytes<'_> for Bool

source§

impl FromBytes<'_> for SyscallResult

source§

impl FromBytes<'_> for Fd

source§

impl FromBytes<'_> for FdList

source§

impl FromBytes<'_> for Gid

source§

impl FromBytes<'_> for IpNet

source§

impl FromBytes<'_> for Ipv4Addr

source§

impl FromBytes<'_> for Ipv4Net

source§

impl FromBytes<'_> for Ipv6Addr

source§

impl FromBytes<'_> for Ipv6Net

source§

impl FromBytes<'_> for Pid

source§

impl FromBytes<'_> for Port

source§

impl FromBytes<'_> for Duration

source§

impl FromBytes<'_> for SigSet

source§

impl FromBytes<'_> for SigType

source§

impl FromBytes<'_> for SockFamily

source§

impl FromBytes<'_> for SyscallId

source§

impl FromBytes<'_> for Uid

source§

impl<'a> FromBytes<'a> for &'a Path

source§

impl<'a> FromBytes<'a> for PT_DYN_bpf_dynamic_param

source§

impl<'a> FromBytes<'a> for PT_DYN_ptrace_dynamic_param

source§

impl<'a> FromBytes<'a> for PT_DYN_sockopt_dynamic_param<'a>

source§

impl<'a> FromBytes<'a> for SockAddr<'a>

source§

impl<'a> FromBytes<'a> for SockTuple<'a>

source§

impl<'a> FromBytes<'a> for RelativePath<'a>