pub struct File<'a> {
pub schema: Schema<'a>,
pub path: &'a Path,
pub root_type: Vec<RootType<'a>>,
pub file_identifier: Option<FileIdentifier<'a>>,
pub file_extension: Option<FileExtension<'a>>,
}Expand description
A file containing a flatbuffer schema.
Fields§
§schema: Schema<'a>The flatbuffer schema.
path: &'a PathThe path to the file.
root_type: Vec<RootType<'a>>A list of root types declared in the file.
file_identifier: Option<FileIdentifier<'a>>An optional file identifier. See FileIdentifier.
file_extension: Option<FileExtension<'a>>An optional file extension. See FileExtension.
Implementations§
Source§impl<'a> File<'a>
impl<'a> File<'a>
Sourcepub fn builder() -> FileBuilder<'a, ((), (), (), (), ())>
pub fn builder() -> FileBuilder<'a, ((), (), (), (), ())>
Create a builder for building File.
On the builder, call .schema(...), .path(...), .root_type(...)(optional), .file_identifier(...)(optional), .file_extension(...)(optional) to set the values of the fields (they accept Into values).
Finally, call .build() to create the instance of File.
Trait Implementations§
Source§impl<'a> From<(Schema<'a>, &'a Path, Vec<RootType<'a>>, Option<FileIdentifier<'a>>, Option<FileExtension<'a>>)> for File<'a>
impl<'a> From<(Schema<'a>, &'a Path, Vec<RootType<'a>>, Option<FileIdentifier<'a>>, Option<FileExtension<'a>>)> for File<'a>
impl<'a> StructuralPartialEq for File<'a>
Auto Trait Implementations§
impl<'a> Freeze for File<'a>
impl<'a> RefUnwindSafe for File<'a>
impl<'a> Send for File<'a>
impl<'a> Sync for File<'a>
impl<'a> Unpin for File<'a>
impl<'a> UnwindSafe for File<'a>
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