debian_analyzer::editor

Trait Marshallable

Source
pub trait Marshallable {
    // Required methods
    fn from_bytes(content: &[u8]) -> Self;
    fn empty() -> Self;
    fn to_bytes(&self) -> Option<Vec<u8>>;
}
Expand description

A trait for types that can be edited

Required Methods§

Source

fn from_bytes(content: &[u8]) -> Self

Parse the contents of a file

Source

fn empty() -> Self

Create an empty instance

Source

fn to_bytes(&self) -> Option<Vec<u8>>

Serialize the contents of a file

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Marshallable for Deb822

Source§

fn from_bytes(content: &[u8]) -> Self

Source§

fn empty() -> Self

Source§

fn to_bytes(&self) -> Option<Vec<u8>>

Source§

impl Marshallable for ChangeLog

Source§

fn from_bytes(content: &[u8]) -> Self

Source§

fn empty() -> Self

Source§

fn to_bytes(&self) -> Option<Vec<u8>>

Source§

impl Marshallable for Control

Source§

fn from_bytes(content: &[u8]) -> Self

Source§

fn empty() -> Self

Source§

fn to_bytes(&self) -> Option<Vec<u8>>

Source§

impl Marshallable for Control

Source§

fn from_bytes(content: &[u8]) -> Self

Source§

fn empty() -> Self

Source§

fn to_bytes(&self) -> Option<Vec<u8>>

Source§

fn from_bytes(content: &[u8]) -> Self

Source§

fn empty() -> Self

Source§

fn to_bytes(&self) -> Option<Vec<u8>>

Source§

impl Marshallable for Makefile

Source§

fn from_bytes(content: &[u8]) -> Self

Source§

fn empty() -> Self

Source§

fn to_bytes(&self) -> Option<Vec<u8>>

Implementors§