Struct sgdata::SGData [] [src]

pub struct SGData(_);

Scattered, gathered, immutable, arc-ed data

A piece of data potentially scattered between multiple parts, which themselves might be slices of shared-ownership underlying data.

SGData is essentially semantic wrapper over Vec<ArcRef<Vec<u8>, [u8]>>

For illustration:

frames:      [    Buf    ][    Buf    ][    Buf    ][    Buf    ]
edges:       |                |    |                      |     |
             |                |    |                      |     |
              \          /\  / \  / \ /\           /\    / \   /
               \        /  ||   ||  | | \         /  \  /   \ /
sgdata parts:      C1[0] C1[1] C2[0] C3[0]   C3[1]   C3[2]  C4[0]

Arbitrary-sized data is being read into frames and edges between logical parts are being found. Then sgdata objects are created, aggregating parts of frames while holding reference-counted shared ownership over frames.

Methods

impl SGData
[src]

[src]

[src]

[src]

[src]

[src]

Total len of all parts

[src]

[src]

[src]

[src]

[src]

[src]

[src]

Convert to linear (single vector) form

If self is empty or already contains only one piece, this is cheap.

If self is scattered between many pices, this requires copying all the data into a new, big chunk.

[src]

Trait Implementations

impl Debug for SGData
[src]

[src]

Formats the value using the given formatter.

impl PartialEq for SGData
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for SGData
[src]

impl Clone for SGData
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more