syslog_rs/sync/syslog_stream.rs
1/*-
2 * syslog-rs - a syslog client translated from libc to rust
3 *
4 * Copyright 2025 Aleksandr Morozov
5 *
6 * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by
7 * the European Commission - subsequent versions of the EUPL (the "Licence").
8 *
9 * You may not use this work except in compliance with the Licence.
10 *
11 * You may obtain a copy of the Licence at:
12 *
13 * https://joinup.ec.europa.eu/software/page/eupl
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT
17 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
18 * Licence for the specific language governing permissions and limitations
19 * under the Licence.
20 */
21
22/// This file contains an inplemetation of interface (trait)
23/// which generalizes a `StreamableSyslog`.
24
25use crate::Priority;
26
27pub trait SyslogStream: core::fmt::Write
28{
29 /// Replaces PRI with new and returns old (replaced)
30 fn update_pri(&mut self, new_pri: Priority) -> Priority;
31}