pub struct Data {
pub clients: Clients<ClientInfo>,
pub files: Files<FileInfo>,
}
Expand description
Aggregates client and file info.
Fields
clients: Clients<ClientInfo>
Map from client indexes to client information.
files: Files<FileInfo>
Map from file indexes to file information.
Implementations
sourceimpl Data
impl Data
sourcepub fn add_client<S: Into<String>>(&mut self, name: S) -> Client
pub fn add_client<S: Into<String>>(&mut self, name: S) -> Client
Adds a client.
Does not add the client again if it’s already there (by name).
sourcepub fn add_client_to_file(&mut self, client: Client, file: File)
pub fn add_client_to_file(&mut self, client: Client, file: File)
Adds a client to a file.
sourcepub fn client_clusters(&self) -> Vec<(ClientSet, FileSet)>
pub fn client_clusters(&self) -> Vec<(ClientSet, FileSet)>
Returns the client equivalence classes.
Two clients are in the same equivalence class if they are associated to the same file, transitively.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Data
impl Send for Data
impl Sync for Data
impl Unpin for Data
impl UnwindSafe for Data
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more