Runtime-sink-file-append-mode
Read the current append-mode policy used by a file-backed RuntimeSink. This helper exposes whether future reopen behavior is currently append-oriented on the runtime sink itself.
Interface
pub fn RuntimeSink::file_append_mode(self : RuntimeSink) -> Bool {input
self : RuntimeSink- Runtime sink whose append-mode policy should be inspected.
output
Bool- Current append-mode policy for the file sink.
Explanation
Detailed rules explaining key parameters and behaviors
- Plain
Fileruntime variants report the current append policy from the wrappedFileSink. QueuedFileruntime variants forward the policy from the wrapped innerFileSink.- Non-file runtime variants return
false. - This helper reports runtime file policy, not whether a file is currently writable.
How to Use
Here are some specific examples provided.
When Need Direct Runtime Append-policy Visibility
When diagnostics should show how future reopen behavior is configured on a RuntimeSink:
let append = sink.file_append_mode()In this example, the runtime sink exposes current reopen policy directly.
When Validate Direct Policy Changes
When policy mutation should be observable after a direct setter call:
ignore(sink.file_set_append_mode(true))
ignore(sink.file_append_mode())In this example, callers verify the updated append-mode policy on the runtime sink itself.
Error Case
e.g.:
If the runtime sink is not file-backed, the method returns
false.If callers need the full current file policy rather than just append mode,
file_policy()is the better API.
Notes
Use this helper when append policy is the only file setting you need to inspect.
Pair it with reopen helpers when debugging direct runtime file behavior.