pub trait RelaxedFollowTrait {
    type Inner<'a>: Follow<'a>;

    // Provided method
    unsafe fn follow(
        buf: &[u8],
        loc: usize
    ) -> <<Self as RelaxedFollowTrait>::Inner<'_> as Follow<'_>>::Inner { ... }
}
Expand description

This trait allows a .follow() method that returns a FlatBuffer with the lifetime of the provided byte slice.

Example trait implementation

use flatbuffers_owned::RelaxedFollowTrait;

impl RelaxedFollowTrait for MyFlatBuffer<'_> {
   type Inner<'a> = MyFlatBuffer<'a>;
}

Required Associated Types§

source

type Inner<'a>: Follow<'a>

Provided Methods§

source

unsafe fn follow( buf: &[u8], loc: usize ) -> <<Self as RelaxedFollowTrait>::Inner<'_> as Follow<'_>>::Inner

Safety

This function lacks verification. This method could yield a FlatBuffer with undefined behavior on field reads when corrupted FlatBuffer bytes are passed.

Implementors§