Struct il2_iltags::io::array::VecWriter [−][src]
pub struct VecWriter { /* fields omitted */ }
Implementations
Creates a new empty instance of this struct. The new struct is set as writeable by default.
Creates a new empty instance of this struct with an initial capacity set.
Arguments:
capacity
: The reserved capacity;
Returns the current writing position.
Returns:
- The current offset. It is guaranteed to be at most the total size of the data.
Sets the current writing position.
Arguments:
offset
: The new position. It if is larger than the total length, it will assume the total length;
Returns true if this instance is locked for writing.
Sets the read-only flag.
Arguments:
read_only
: The new value;
Verifies if the it is possible to write into this
VecWriter
.
Returns:
Ok(())
: If it is possible to write;Err(ErrorKind::UnableToWriteData)
: If it is not possible to write;
Trait Implementations
New since 1.4.0.
Writes a byte slice. As this default implementation
calls write()
multiple times, so it is strongly recommended
that each implementation provides a more efficient version for
this method if possible. Read more