Struct flow_record::Serializer

source ·
pub struct Serializer<W: Write> { /* private fields */ }

Implementations§

source§

impl<W> DfirSerializer<W>
where W: Write,

source

pub fn new(writer: W) -> Self

Examples found in repository?
examples/bodyfile2msgpack.rs (line 10)
6
7
8
9
10
11
12
13
fn main() {
    let sample_line = "0|/Users/Administrator ($FILE_NAME)|93552-48-2|d/drwxrwxrwx|0|0|92|1577092511|1577092511|1577092511|-1";
    let bf_line = Bodyfile3Line::try_from(sample_line).unwrap();
    let record = PosixFileRecord::try_from(&bf_line).unwrap();
    let mut ser = Serializer::new(stdout());

    ser.serialize(&record).unwrap();
}
source

pub fn without_header(self) -> Self

source

pub fn serialize<R>(&mut self, record: &R) -> Result<(), Error>
where R: Record,

Examples found in repository?
examples/bodyfile2msgpack.rs (line 12)
6
7
8
9
10
11
12
13
fn main() {
    let sample_line = "0|/Users/Administrator ($FILE_NAME)|93552-48-2|d/drwxrwxrwx|0|0|92|1577092511|1577092511|1577092511|-1";
    let bf_line = Bodyfile3Line::try_from(sample_line).unwrap();
    let record = PosixFileRecord::try_from(&bf_line).unwrap();
    let mut ser = Serializer::new(stdout());

    ser.serialize(&record).unwrap();
}
source

pub fn print_magic(&mut self) -> Result<(), Error>

Auto Trait Implementations§

§

impl<W> Freeze for DfirSerializer<W>
where W: Freeze,

§

impl<W> RefUnwindSafe for DfirSerializer<W>
where W: RefUnwindSafe,

§

impl<W> Send for DfirSerializer<W>
where W: Send,

§

impl<W> Sync for DfirSerializer<W>
where W: Sync,

§

impl<W> Unpin for DfirSerializer<W>
where W: Unpin,

§

impl<W> UnwindSafe for DfirSerializer<W>
where W: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.