pub struct FileInfo {
pub is_append: Option<bool>,
pub observer: Option<Event>,
pub stream: Option<Stream>,
pub attributes: Option<NodeAttributes2>,
/* private fields */
}
Expand description
Auxiliary data for the file representation of a node.
Fields§
§is_append: Option<bool>
True if the file is opened in append mode. In append mode, the seek offset is moved to the end before every write, the two steps performed in an atomic manner.
observer: Option<Event>
An optional event which transmits information about an object’s readability or writability. This event relays information about the underlying object, not the capability granted to client: this event may be signalled “readable” on a connection that does not have the capability to read.
This event will be present if the following conditions are met:
- The
available_operations
on the file connection is not empty. - The filesystem supports signalling readability/writability events.
The FileSignal
values may be observed on this event.
stream: Option<Stream>
An optional stream object, which can be used to read to and write from the file.
Reading and writing the file using the stream object can be up to 20x
faster than reading and writing the file using the Read and Write
operations in the [File
] protocol.
attributes: Option<NodeAttributes2>
Requested attributes for the file. This is only populated if requested.
Trait Implementations§
Source§impl Decode<FileInfo, DefaultFuchsiaResourceDialect> for FileInfo
impl Decode<FileInfo, DefaultFuchsiaResourceDialect> for FileInfo
Source§impl ResourceTypeMarker for FileInfo
impl ResourceTypeMarker for FileInfo
Source§type Borrowed<'a> = &'a mut FileInfo
type Borrowed<'a> = &'a mut FileInfo
Encode<Self>
type cheaply obtainable from &mut Self::Owned
. There are three cases: Read moreSource§fn take_or_borrow<'a>(
value: &'a mut <Self as TypeMarker>::Owned,
) -> Self::Borrowed<'a>
fn take_or_borrow<'a>( value: &'a mut <Self as TypeMarker>::Owned, ) -> Self::Borrowed<'a>
&mut Self::Owned
to Self::Borrowed
. For
HandleBased
types this is “take” (it returns an owned handle and
replaces value
with Handle::invalid
), and for all other types it is
“borrow” (just converts from one reference to another).Source§impl TypeMarker for FileInfo
impl TypeMarker for FileInfo
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.