[][src]Struct nix_query_tree_viewer::nix_query_tree::NixQueryTree

pub struct NixQueryTree(pub Tree<NixQueryEntry>);

A Tree representing the result from nix store --query --tree.

use indoc::indoc;
use nix_query_tree_viewer::nix_query_tree::NixQueryTree;
use std::str::FromStr;

let raw_tree = indoc!(
        "/nix/store/qy93dp4a3rqyn2mz63fbxjg228hffwyw-hello-2.10
        +---/nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27
        |   +---/nix/store/pnd2kl27sag76h23wa5kl95a76n3k9i3-glibc-2.27 [...]
        +---/nix/store/qy93dp4a3rqyn2mz63fbxjg228hffwyw-hello-2.10 [...]
        "
    );
let nix_query_tree = NixQueryTree::from_str(raw_tree);

assert!(nix_query_tree.is_ok());

Methods

impl NixQueryTree[src]

pub fn path_map(&self) -> NixQueryPathMap[src]

pub fn lookup(&self, path: &Path) -> Option<&NixQueryEntry>[src]

Trait Implementations

impl Clone for NixQueryTree[src]

impl Debug for NixQueryTree[src]

impl Eq for NixQueryTree[src]

impl FromStr for NixQueryTree[src]

type Err = Err<(String, ErrorKind)>

The associated error which can be returned from parsing.

impl PartialEq<NixQueryTree> for NixQueryTree[src]

impl StructuralEq for NixQueryTree[src]

impl StructuralPartialEq for NixQueryTree[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.