Struct graphannis::update::GraphUpdate
source · pub struct GraphUpdate { /* private fields */ }
Expand description
A list of changes to apply to an graph.
Implementations§
source§impl GraphUpdate
impl GraphUpdate
sourcepub fn new() -> GraphUpdate
pub fn new() -> GraphUpdate
Create a new empty list of updates.
sourcepub fn add_event(
&mut self,
event: UpdateEvent
) -> Result<(), GraphAnnisCoreError>
pub fn add_event( &mut self, event: UpdateEvent ) -> Result<(), GraphAnnisCoreError>
Add the given event to the update list.
sourcepub fn iter(&self) -> Result<GraphUpdateIterator, GraphAnnisCoreError>
pub fn iter(&self) -> Result<GraphUpdateIterator, GraphAnnisCoreError>
Get all changes
sourcepub fn is_empty(&self) -> Result<bool, GraphAnnisCoreError>
pub fn is_empty(&self) -> Result<bool, GraphAnnisCoreError>
Returns true
if the update list is empty.
pub fn len(&self) -> Result<usize, GraphAnnisCoreError>
Trait Implementations§
source§impl Default for GraphUpdate
impl Default for GraphUpdate
source§fn default() -> GraphUpdate
fn default() -> GraphUpdate
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for GraphUpdate
impl<'de> Deserialize<'de> for GraphUpdate
source§fn deserialize<D>(
deserializer: D
) -> Result<GraphUpdate, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<GraphUpdate, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for GraphUpdate
impl Serialize for GraphUpdate
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl !Freeze for GraphUpdate
impl RefUnwindSafe for GraphUpdate
impl Send for GraphUpdate
impl Sync for GraphUpdate
impl Unpin for GraphUpdate
impl UnwindSafe for GraphUpdate
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more