Struct gmime::PartIter [−]
pub struct PartIter(_);
A MIME part iterator.
Methods
impl PartIter[src]
impl PartIterpub fn new<P: IsA<Object>>(toplevel: &P) -> PartIter[src]
pub fn new<P: IsA<Object>>(toplevel: &P) -> PartIterCreates a new PartIter for iterating over toplevel's subparts.
toplevel
a Object to use as the toplevel
Returns
a newly allocated PartIter which should be freed
using PartIter::free when finished with it.
pub fn clone(&mut self) -> Option<PartIter>[src]
pub fn clone(&mut self) -> Option<PartIter>pub fn get_current(&mut self) -> Option<Object>[src]
pub fn get_current(&mut self) -> Option<Object>Gets the Object at the current PartIter position.
Returns
the current Object or None if the
state of self is invalid.
pub fn get_parent(&mut self) -> Option<Object>[src]
pub fn get_parent(&mut self) -> Option<Object>Gets the parent of the Object at the current PartIter
position.
Returns
the parent Object or None if the
state of self is invalid.
pub fn get_path(&mut self) -> Option<String>[src]
pub fn get_path(&mut self) -> Option<String>Gets the path of the current Object in the MIME structure
used to initialize self.
Returns
a newly allocated string representation of the path to the
Object at the current PartIter position.
pub fn get_toplevel(&mut self) -> Option<Object>[src]
pub fn get_toplevel(&mut self) -> Option<Object>pub fn is_valid(&mut self) -> bool[src]
pub fn is_valid(&mut self) -> boolpub fn jump_to(&mut self, path: &str) -> bool[src]
pub fn jump_to(&mut self, path: &str) -> boolUpdates the state of self to point to the Object specified
by path.
path
a string representing the path to jump to
Returns
true if the Object specified by path exists or
false otherwise.
pub fn next(&mut self) -> bool[src]
pub fn next(&mut self) -> boolAdvances to the next part in the MIME structure used to initialize
self.
Returns
true if successful or false otherwise.
pub fn prev(&mut self) -> bool[src]
pub fn prev(&mut self) -> boolRewinds to the previous part in the MIME structure used to
initialize self.
Returns
true if successful or false otherwise.
pub fn remove(&mut self) -> bool[src]
pub fn remove(&mut self) -> boolRemoves the Object at the current position from its
parent. If successful, self is advanced to the next position
(since the current position will become invalid).
Returns
true if the part at the current position was removed or
false otherwise.
pub fn replace<P: IsA<Object>>(&mut self, replacement: &P) -> bool[src]
pub fn replace<P: IsA<Object>>(&mut self, replacement: &P) -> boolReplaces the Object at the current position with replacement.
replacement
a Object
Returns
true if the part at the current position was replaced or
false otherwise.
pub fn reset(&mut self)[src]
pub fn reset(&mut self)Resets the state of self to its initial state.
Trait Implementations
impl Clone for PartIter
impl Clone for PartIterfn clone(&self) -> PartIter
fn clone(&self) -> PartIterReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Debug for PartIter
impl Debug for PartIterfn fmt(&self, __arg_0: &mut Formatter) -> Result
fn fmt(&self, __arg_0: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl StaticType for PartIter
impl StaticType for PartIterfn static_type() -> Type
fn static_type() -> TypeReturns the type identifier of Self.