[][src]Struct imaged::DB

pub struct DB(_);

DB wraps the libimaged's Imaged type

Implementations

impl DB[src]

pub fn open<P: AsRef<Path>>(path: P) -> Result<Self, Error>[src]

Open an imaged instance at the given path

pub fn destroy(self) -> Result<(), Error>[src]

Destroy all imgd files at the DB's root

pub fn iter(&self) -> Result<Iter<'_>, Error>[src]

Returns a new image iterator

pub fn iter_keys(&self) -> Result<KeyIter<'_>, Error>[src]

Returns a new key iterator

pub fn get<S: AsRef<str>>(
    &self,
    key: S,
    editable: bool
) -> Result<Handle<'_>, Error>
[src]

Get a key, editable determines whether or not the pixels can be edited

pub fn is_locked(&self, key: &str) -> bool[src]

Check if a key is in use

pub fn file_is_valid(&self, key: &str) -> bool[src]

Check if a key is a valid imgd file

pub fn set<'a, S: AsRef<str>>(
    &'a self,
    key: S,
    image: &Image<'_>
) -> Result<Handle<'a>, Error>
[src]

Set a key

pub fn set_raw<S: AsRef<str>>(
    &self,
    key: S,
    meta: Meta,
    data: Option<*const c_void>
) -> Result<Handle<'_>, Error>
[src]

Set a key using metadata and a pointer to the image data

pub fn remove<S: AsRef<str>>(&self, key: S) -> Result<(), Error>[src]

Remove a key

Trait Implementations

impl Drop for DB[src]

Auto Trait Implementations

impl RefUnwindSafe for DB

impl !Send for DB

impl !Sync for DB

impl Unpin for DB

impl UnwindSafe for DB

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, 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.