Skip to main content

LocalMap

Struct LocalMap 

Source
pub struct LocalMap { /* private fields */ }

Implementations§

Source§

impl LocalMap

Source

pub fn new() -> Self

Source

pub fn insert( &mut self, hash: Hash, tags_hash: Hash, mangle_hash: Hash, topology: Vec<Hash>, data: Vec<u8>, ) -> Result<()>

Source

pub fn referenced_by( &self, hash: Hash, ) -> Option<impl use<> + Iterator<Item = Hash>>

Source

pub fn remove( &mut self, hash: Hash, ) -> Result<(), impl use<> + Iterator<Item = Hash>>

Source

pub fn get(&self, hash: Hash) -> Option<(&[Hash], &[u8])>

Source

pub fn contains(&self, hash: Hash) -> bool

Source

pub fn to_resolve(&self) -> Arc<dyn Resolve>

Source

pub fn is_empty(&self) -> bool

Source

pub fn len(&self) -> usize

Trait Implementations§

Source§

impl Clone for LocalMap

Source§

fn clone(&self) -> LocalMap

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for LocalMap

Source§

fn default() -> LocalMap

Returns the “default value” for a type. Read more
Source§

impl Resolve for LocalMap

Source§

fn resolve<'a>( &'a self, address: Address, this: &'a Arc<dyn Resolve>, ) -> FailFuture<'a, ByteNode>

Resolve the address. For an Object, this is what gets used as PointInput.
Source§

fn resolve_data(&self, address: Address) -> FailFuture<'_, Vec<u8>>

Source§

fn try_resolve_local( &self, address: Address, this: &Arc<dyn Resolve>, ) -> Result<Option<ByteNode>>

Source§

fn resolve_extension( &self, address: Address, typeid: TypeId, ) -> Result<&(dyn Any + 'static), Error>

Get a dynamic extension for a specific Address.
Source§

fn extension(&self, typeid: TypeId) -> Result<&(dyn Any + 'static), Error>

Get a dynamic extension.
Source§

fn topology_hash(&self) -> Option<Hash>

Source§

fn into_topovec(self: Arc<Self>) -> Option<Vec<Arc<dyn Singular>>>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsAny for T

Source§

fn any_ref(&self) -> &(dyn Any + 'static)
where T: 'static,

Get a shared RTTI reference.
Source§

fn any_mut(&mut self) -> &mut (dyn Any + 'static)
where T: 'static,

Get an exclusive RTTI reference.
Source§

fn any_box(self: Box<T>) -> Box<dyn Any>
where T: 'static,

Get an RTTI Box.
Source§

fn any_arc(self: Arc<T>) -> Arc<dyn Any>
where T: 'static,

Get an RTTI Arc.
Source§

fn any_arc_sync(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
where T: 'static + Send + Sync,

Get an RTTI Arc which is also Send.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T, Extra> ExtraFor<T> for Extra
where T: for<'a> Parse<Input<'a, Extra>>, Extra: Clone,

Source§

fn parse(&self, data: &[u8], resolve: &Arc<dyn Resolve>) -> Result<T, Error>

Source§

fn parse_checked( &self, hash: Hash, data: &[u8], resolve: &Arc<dyn Resolve>, ) -> Result<T, Error>
where T: FullHash,

Self::parse, then check that FullHash::full_hash matches.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.