Struct nu_pretty_hex::HexConfig[][src]

pub struct HexConfig {
    pub title: bool,
    pub ascii: bool,
    pub width: usize,
    pub group: usize,
    pub chunk: usize,
    pub skip: Option<usize>,
    pub length: Option<usize>,
Expand description

Configuration parameters for hexdump.


title: bool

Write first line header with data length.

ascii: bool

Append ASCII representation column.

width: usize

Source bytes per row. 0 for single row without address prefix.

group: usize

Chunks count per group. 0 for single group (column).

chunk: usize

Source bytes per chunk (word). 0 for single word.

skip: Option<usize>

Bytes from 0 to skip

length: Option<usize>

Length to return


impl HexConfig[src]

pub fn simple() -> Self[src]

Returns configuration for simple_hex, simple_hex_write and fmt::Display implementation.

Trait Implementations

impl Clone for HexConfig[src]

fn clone(&self) -> HexConfig[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for HexConfig[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Default for HexConfig[src]

Default configuration with title, ascii, 16 source bytes width grouped to 4 separate hex bytes. Using in pretty_hex, pretty_hex_write and fmt::Debug implementation.

fn default() -> HexConfig[src]

Returns the “default value” for a type. Read more

impl Copy for HexConfig[src]

Auto Trait Implementations

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

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

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

The type returned in the event of a conversion error.

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

Performs the conversion.